快速比较(*diff*)/同步/备份/镜像文件夹。

directsync的Python项目详细描述


直接同步

PyPI versionMIT Licenseimage

用于比较/同步/镜像文件夹内容的高效且易于使用的实用程序。

demo

Demo gif

用法:

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模式忽略某些文件。
  • 添加测试用例。
  • 添加代码覆盖率。
  • 设置toxTravis CI
  • 添加彩色输出。
  • 使用符号链接处理嵌套结构。
  • 提供与在线存储服务的直接接口。
  • 添加开发人员指南。
  • 添加演示。
  • 添加simulate选项。
  • 添加use-trash选项以发送到回收站,而不是删除/覆盖。
  • 添加cache选项,将先前差异检查的结果缓存到磁盘。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java RFID不完整输出?   java如何构造一个for循环来查找每个数组的第一个索引的总和   java Eclipse AST解析器正在删除我的规则   安卓如何在java中创建“可重写”配置?   java每次我向应用程序添加图像时,它都会崩溃   Java 8流到文件   EntityNotFoundException的java可能原因   java多线程为什么下面的程序表现得如此怪异?   java footprint soap api+mavenjaxb2plugin   java MongoDB锁定,直到找到结果   java重写Jtable选项卡行为转到下一个可编辑单元格   java关于方法和创建另一个方法   java将人脸与图像分离   java复制Spring批处理作业实例   java TextView不会更改为新设置的文本