Diffsyncer
Diffsyncer is a tool to sync files between two directories using QR codes. It can be used to transfer files between two devices without network connection.
Environment Prerequisites
- Python 3.10
For MacOS:
brew install zbar
For Ubuntu:
sudo apt-get install libzbar0
Installation
pip install diffsyncer
Usage
diffsyncer --help
Usage: diffsyncer [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
aeskey Generate AES key
decode Decode QR codes to get git diff patch data
encode Generate QR codes for git diff patch data
serve Run the DiffSyncer server
sync Sync git repository with the decode diff patch data
1. Generate AES key
diffsyncer aeskey
Notice: The AES key file is used to encrypt the data before generating QR codes, please keep it same between the two devices.
2. Generate QR codes for git diff patch data
diffsyncer encode
3. Decode QR codes to get git diff patch data
diffsyncer decode
4. Sync git repository with the decode diff patch data
diffsyncer sync
5. Run the DiffSyncer server
diffsyncer serve
Configuration
Admin password hash can be generate by running the following command:
diffsyncer pass "your password"
Your can change the configuration by creating a .env file in the current directory. The following is the default configuration:
# admin username, optional, default is admin
ADMIN_USER=admin
# admin password, optional, default is admin
ADMIN_PASSWORD=$2b$12$f9l0H6Atq0cZUo5ceuLvx.ZoD0yxYguaI9u7JVJ8Mk9r8STcAGXXO
# path for git repo, optional, default is ./
REPO_DIR=./git/repo/path
# path for output qr codes, optional, default is ./output
OUTPUT_DIR=./path/for/qr-codes/output/
# path for uploaded qr codes, optional
UPLOAD_DIR=./path/for/uploaded/qr-codes
# aes key file for encrypting data, optional, default is ./ase_key.key
ASE_KEY_FILE=./path/to/ase/key/file
# Optional, default is zstd
COMPRESS_METHOD=ztsd
# Optional, data size in bytes stored in each QR code image, default is 800
CHUNK_SIZE=800
License
Metadata
Release files for diffsyncer 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| diffsyncer-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / diffsyncer-1.1.1-py3-none-any.whl
| Download URL | diffsyncer-1.1.1-py3-none-any.whl |
|---|---|
| Size | 2.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
024f8bfe229cb0b786e2e5a0a5763b9ba1142a854e8930c5f201187cd3f82d82
|
|
BLAKE2b-256 checksum How to use checksums |
4c1da51923b146c284b4ece7902eae31ac42f3e74a638acd14e2dae9a50e1289
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.17.1 CPython/3.10.10 Darwin/23.5.0
|