1 个不稳定版本
0.2.0 | 2019年4月3日 |
---|
#1553 in 文件系统
19KB
330 行
Foldiff
一个易于配置的工具,用于获取参考文件夹与其他文件夹之间的差异
以下是当前已实现的特性
- A 中存在而 B 中不存在的文件
- B 中存在而 A 中不存在的文件
- A 和 B 中都存在但不同的文件
使用方法
$ foldiff folder_a folder_b
注意:以下功能目前尚未实现,请使用 ruby 版本。
使用方法 // ----- // //
shell // $ foldiff [--config=config.txt] [-s] [-q] [-f] [-e] reference folders_to_compare //
// // | 长格式 | 短格式 | 描述 | // | ------------------- |:-----:| --------------------------------------------------- | // | --config=filename | | 包含比较规则的文件 | // | --file-output | -f | 将报告写入名为compare_FOLDERNAME.txt的文件 | // | --quiet | -q | 静默模式不将输出打印到终端(如果没有--file-output,实际上没有意义) | // | --skip-empty | -s | 跳过空文件 | // | --show-equals | -e | 显示文件,即使它们没有差异 | // // // 配置文件 // ------------ //// # COMPLETE is a list of file to exclude completely from the comparison // COMPLETE // README.md // other_file_to_exclude // END // // # By default, the file diff isn't showed, the report only informs that it differs from the reference. // # Add a FILE tag to display it : // FILE "ex.txt" END // // # You can alter the behavior for the file by added these options before the END tag // FILE "example.txt" // SORT # sort alphabetically the output // // HIDE_MISSING # hide missing files from the reference folder // HIDE_ADDED # hide the files not in the reference folder // // PARSE ONLY # don't show the diff of the file, just print it // PARSE ALSO # print the file after the diff // // KEEP_LINES 3,-6 # cut the document before making the diff (negative values begins from the end) // // PRE_REGEX "s/^[aze]/aze/" # substitution applied before separating lines (there can be as many as you want !) // REGEX "s/^[aze]/aze/" # substitution applied after separating lines (there can be as many as you want !) // // REGEX 20 "s/a/e/" # apply it twenty times same for PRE_REGEX (not that it may slow down the analysis) // // # Those can also be used along with PARSE to change how the file will be parsed // # (if either PARSE ONLY or PARSE ALSO is set) // PARSE SORT // PARSE KEEP_LINES 3,-6 // PARSE REGEX // PARSE PRE_REGEX // // INCLUDES "word" # keep only lines including *word* after the regex // EQUALS "line" # keep only lines matching exactly *line* after the regex // END //