快速比较(*diff*)/同步/备份/镜像文件夹。
directsync的Python项目详细描述
直接同步
用于比较/同步/镜像文件夹内容的高效且易于使用的实用程序。
demo
用法:
directsync [-h] [-add] [-rm] [-ovr] [-rev] [-mirr] [-trash] [-cache]
[-dry] [-no-bar]
left-path right-path
positional arguments:
left-path The path of the left(source) directory.
right-path The path of the right(destination) directory.
optional arguments:
-h, --help show this help message and exit
-add, --add-missing Copy files from source which are absent in
destination.
-rm, --remove-extra Remove the files from destination which are absent in
source.
-ovr, --overwrite-content
Overwrite the files having same name but different
content.
-rev, --reverse-sync-direction
Use the right folder as source and the left as
destination.
-mirr, --mirror-contents
Make the destination directory exactly same as the
source. Shorthand for `-add -rm -ovr`.
-trash, --use-trash Send to trash/recycle bin while deleting/overwriting.
-cache, --use-cache Whether to use previously cached comparison-check
result from disk.
-dry, --dry-run Just simulate and report the file operations that will
be performed with the current configuration.
-no-bar, --hide-progress-bar
Whether to hide the progress bar or not. Will result
in a huge speedup iff the 2 directories are structured
very differently.
安装:
pip install directsync
todo:
- 添加
preserve-latest
选项:在这两个文件中,应保留具有最新修改日期的文件。 - 为用户提供对文件比较算法的更精细的控制。
- 添加
ignore-pattern
选项,让用户根据提供的regex模式忽略某些文件。 - 添加测试用例。
- 添加代码覆盖率。
- 设置
tox
和Travis CI
。 - 添加彩色输出。
- 使用符号链接处理嵌套结构。
- 提供与在线存储服务的直接接口。
- 添加开发人员指南。
添加演示。添加simulate
选项。添加use-trash
选项以发送到回收站,而不是删除/覆盖。添加cache
选项,将先前差异检查的结果缓存到磁盘。