快速比较(*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类之间并发性不一致的HashMap   插件如何在JavaSwing中使用UIManager和Classloader从外部jar安装外观?   java JasperReports:找不到子报表   在项目中找不到java生成的Javadoc文件   java BigDecimal。multiply()和divide()方法返回十六进制数。为什么?   java统计出现次数并从字符串中删除重复项   调用运算符时发生java NullPointerException   Spring和Hibernate之间的java配置错误   JavaZK将用户重定向回上一页   Javasocket为传出连接指定特定的网络接口   如果拖动到某个区域外,java Make按钮操作将被取消   如何在Eclipse for selenium 3.141.59中添加Java文档链接   java从匹配条件的数组中获取所有索引   docker未连接到RemoteWebDriver的java Gitlab ci selenium测试   java重写run方法   utf 8如何使用java解码UTF8编码的字符串?   java如何从eclipse调试部署在tomcat上的web应用程序?   将字母字符与前面没有百分号的Java正则表达式匹配