mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-09-04 23:26:39 +08:00
feat(docs): add CLI subcommands documentation and file naming strategies
- Introduced new documentation for CLI subcommands: `upload` and `watch`, detailing their usage, flags, and examples. - Added a section on file naming and conflict strategies, explaining how users can customize file names and handle duplicates via `/config` and `/fnametmpl` commands. - Translated the new documentation into Chinese for broader accessibility.
This commit is contained in:
@@ -27,6 +27,45 @@ weight: 3
|
||||
|
||||
此外, 规则中的存储名若使用 "CHOSEN" , 则表示存储到点击按钮选择的存储端的路径下
|
||||
|
||||
你也可以使用 `/rule switch` 来开关规则模式. 关闭规则模式时, 所有文件都将保存到默认存储.
|
||||
|
||||
## 预设规则
|
||||
|
||||
为常见文件类型手动编写正则规则比较繁琐, 因此 Bot 内置了一组预设分类 (视频、图片、音频、文档、压缩包), 可以通过一条命令批量导入:
|
||||
|
||||
```
|
||||
/rule preset <存储名> [基础路径]
|
||||
```
|
||||
|
||||
参数:
|
||||
|
||||
- `存储名`: 目标存储名 (必须存在且你有权访问)
|
||||
- `基础路径`: 可选. 各预设分类的子目录会创建在此路径下; 若不填则直接使用默认分类目录名
|
||||
|
||||
示例:
|
||||
|
||||
```
|
||||
# 导入预设规则到 "MyAlist", 使用默认目录布局
|
||||
/rule preset MyAlist
|
||||
|
||||
# 在自定义基础路径 "downloads/sorted" 下导入预设规则
|
||||
/rule preset MyAlist downloads/sorted
|
||||
```
|
||||
|
||||
此命令会为每个分类创建 `FILENAME-REGEX` 规则, 将匹配的文件路由到 `基础路径` 下对应的子目录:
|
||||
|
||||
| 分类 | 匹配的扩展名 | 默认目录 |
|
||||
|---|---|---|
|
||||
| 视频 | mp4, mkv, ts, avi, flv, mov, webm, wmv, rmvb, m2ts | `视频` |
|
||||
| 图片 | jpg, jpeg, png, gif, webp, bmp | `图片` |
|
||||
| 音频 | mp3, flac, wav, aac, m4a, ogg | `音频` |
|
||||
| 文档 | pdf, doc, docx, xls, xlsx, ppt, pptx, txt, md, csv, epub, mobi, azw3, chm | `文档` |
|
||||
| 压缩包 | zip, rar, 7z, tar, gz, bz2, xz, ... | `压缩包` |
|
||||
|
||||
{{< hint info >}}
|
||||
导入后的预设规则就是普通的 `FILENAME-REGEX` 规则. 你可以像其他规则一样通过 `/rule` 查看或用 `/rule del <id>` 单独删除/编辑它们.
|
||||
{{< /hint >}}
|
||||
|
||||
规则类型:
|
||||
|
||||
## FILENAME-REGEX
|
||||
|
||||
Reference in New Issue
Block a user