Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kenchou committed Sep 3, 2024
1 parent 251f451 commit 54111ee
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -44,22 +44,36 @@ If it is not found, it will then be looked for in the user's home directory.

```yaml
remove: |-
# Any line that starts with '#' is treated as a comment.
# Match the filename exactly.
# Any line that starts with '#' is treated as a comment. # 任何以井号 '#' 开头的行都做为注释
# Match the filename exactly. # 匹配精确的文件名
example_filename.ext
# '*' and '?' are wildcards.
# '*' and '?' are wildcards. # 可以使用通配符
wildcard*
# For more complex matching, use regular expressions.
# Notice: regex must start with "/".
# For more complex matching, use regular expressions. # 更复杂的匹配规则可以使用正则表达式
# Notice: regex must start with "/". # 注意:正则表达式必需以斜杠 '/' 开头. (区别于通配符规则)
/regex_pattern1
/regex_pattern2
remove_hash:
# Sometimes, files may have the same content but different names. # 有时候一些文件具有相同的内容,但是会有不同的名字;
# Or they may have very common names (e.g., 01.jpg). # 或者具有很常用的名字(比如 01.jpg),
# You can use hash matching to delete them. # 可以使用哈希匹配来删除。
# To improve efficiency, this method first matches the file names # 为了提升效率,此方法先匹配文件名,
# and then calculates the hash values. # 再计算哈希值。
# Only if both match will the file be deleted. # 二者都匹配才会删除。
# The file name rules are the same as the `remove` rules # 文件名规则同 `remove` 规则,
# and support wildcards and regular expressions. # 支持通配符和正则表达式。
# Note: It is not recommended to use wildcards like *.jpg, # 注:不建议使用 *.jpg 这样的通配符,
# as this may result in too many files needing hash calculation. # 可能导致需要计算 hash 的文件过多。
"filename_or_wildcard":
- md5hash
- md5hash1
- md5hash2
"/file1|file2":
- md5hash1
- md5hash2
cleanup: |-
# The filename cleaning rules only support regular expressions,
# so there is no need to start with '/'.
# The matched strings will be replaced with an empty string.
# The filename cleaning rules only support regular expressions, # 文件名清理(改名)只支持正则表达式
# so there is no need to start with '/'. # 所以不需要使用斜杠 '/' 开头
# The matched strings will be replaced with an empty string. # 匹配的内容会被替换成空串
regex_pattern1
regex_pattern2
```

0 comments on commit 54111ee

Please sign in to comment.