5 个版本
| 0.2.1 | 2024 年 8 月 14 日 |
|---|---|
| 0.2.0 | 2024 年 8 月 14 日 |
| 0.1.2 | 2024 年 8 月 12 日 |
| 0.1.1 | 2024 年 8 月 11 日 |
| 0.1.0 | 2024 年 8 月 10 日 |
151 在 命令行工具
每月 471 次下载
39KB
955 行
group_files_into_dir
一个基于文件名分组的命令行工具。

安装
从 版本页面 下载二进制文件并将其放入路径目录。
或者使用 cargo 安装
cargo install group_files_into_dir
或者从源代码构建。
git clone https://github.com/craftgear/group_files_into_dirs
cargo build --release
用法
交互模式(默认)
从文件名中提取关键字。分隔符为 ,_-,space 和大括号 ()[]{}。
dir- 文件分组的目录。
group_files_into_dir <dir>
自行指定关键字
keywords- 用于分组文件的单词,以逗号分隔。dir- 文件分组的目录。
group_files_into_dir -k <keywords> <dir>
使用目录名作为关键字
一旦您使用交互模式或特定关键字模式创建了目录,此模式将成为您的日常驱动。
使用 --d 选项,您可以根据目录名称将文件分组到目录中。
假设您在 docs 目录中有 inquiry 目录和 quote 目录。现在,当您将 inquiry_2021-01-01.txt 和 quote_2021-01-01.txt 放入 docs 目录时,您可以使用此模式将它们移动到 inquiry 和 quote 目录。
dir- 文件分组的目录。
group_files_into_dir -d <dir>
示例
# invoke interactive mode (default)
# then ask you to select keywords.
group_files_into_dir ./
# group files in current directory based on keywords "hello" and "world"
# no keyword selection prompt will be shown.
group_files_into_dir -k "hello,world" ./
# now you can occasionally organize files with -d option.
group_files_into_dir -d ./
许可证
MIT 许可证
依赖关系
~12–20MB
~266K SLoC