GithubHelp home page GithubHelp logo

inc44 / thesync Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 71 KB

Synchronize files between a source directory and a destination directory

License: MIT License

Python 100.00%
automation cli command-line-tool conflict-resolution cross-platform data-backup data-integrity file-synchronization linux macos

thesync's Introduction

Introduction

This Python script is designed to synchronize files between a source directory and a destination directory. It's implemented in a single file to simplify deployment and usage.

Features

  • Decision Making: Choose between automatic syncing or manual user decisions for file conflicts.
  • Date Modification Correction: Options to fix date modifications on files either in the source or destination directory.
  • Verification: Verify file integrity through size comparison and optional hash checks.
  • Concurrency: Supports both serial and parallel processing to optimize performance.
  • Customizable Thread Count: Allows specification of the number of threads for parallel processing.

Installation

Download the Python script to your local machine and ensure Python is installed on your system to execute the script, as it's the only external dependency.

Usage

Parameters

  • source_directory: Specifies the source directory from which to sync files.
  • destination_directory: Specifies the target directory to which files will be synced.
  • --decision_maker (-dm): Sets the conflict resolution mode (user for manual resolution or auto for automatic), with auto being the default.
  • --date_modified_fix_source (-dmfs): Chooses the directory (source_directory or destination_directory) whose file modification dates are to be used for synchronization, with destination_directory as the default.
  • --date_modified_fix_enabled (-dmfe): Toggles the date modification fix feature on or off, with it being enabled by default.
  • --verify_steps (-vs): Sets the number of verification steps, with the default set to 0.
  • --verify_hash (-vh): Turns on hash verification for a more thorough integrity check, though it is off by default.
  • --parallel_processing_mode (-ppm): Enables or disables parallel processing, with it being disabled by default or if manual resolution mode is used.
  • --threads_count (-tc): Determines the number of threads to use for parallel processing, with 8 threads as the default.

Commands

Execute the script from the command line, providing the required directories and any optional parameters:

python -O thesync.py <source_directory> <destination_directory> [options]

How It Works

Sync Logic

logic

Sync Conflict Resolution

logic

License

MIT

thesync's People

Contributors

inc44 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.