快速比较(*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根据选择随机设置图标   java如何将Android Studio与本地服务器数据库SQL server 2008连接?   java在点击鼠标后绘制一个椭圆形   java选项窗格相对于其父项的位置   java如何在Android中的switch case中使用String[]输入?   安卓无法从“15.0.1”确定java版本   如果满足特定条件,java是否重置计时器?   java是一个实体类,可以在OOAD中返回其他实体实例吗?   bash将对jar文件| cut | awk和java程序的调用集成到一个统一进程中   Spring安全更新身份验证成功时的最后登录日期   数据库身份验证中基于Java控制台的客户端服务器登录应用程序错误   java Selenium junit测试失败,驱动程序过早获取URL   java LibGdx多点触摸事件混淆   带扫描仪的java打印空间   来自旧版应用程序的java springcloudsleuth头   java如何实现模板设计模式?   java如何比较具有多个值的键的两个映射?   读取时R中的java MemoryError。xlsx