Skip to main content

A small utility for synchronizing a local folder with a remote web repository

Project description

PyPI License: MIT Build Status AppVeyor Build Status Documentation Status Coveralls Code Health Waffle.io

A small Python utility/module for synchronizing a local folder with a remote web repository.

Install

Just do

pip install wsync

Usage

As a standalone script

Suppose that you need to mantain a local mirror of the remote repository at http://cdimage.debian.org/debian-cd/current/source/iso-dvd/.

Then it is enough to do as follows:

wsync  \
    --digest-list http://cdimage.debian.org/debian-cd/current/source/iso-dvd/SHA1SUMS  \
    --remote-repo http://cdimage.debian.org/debian-cd/current/source/iso-dvd/          \
    --local-copy ~/debian-iso-dvd

Of course, any subsequent execution of the script will detect any change and download what is needed.

You can also use the testing branch of the GitHub repository for a quick test: just do:

wsync  \
    --digest-list https://raw.githubusercontent.com/reale/wsync/testing/SHA1SUMS  \
    --remote-repo https://raw.githubusercontent.com/reale/wsync/testing/

As a module

As before:

from wsync import *

digest_list_url = "http://cdimage.debian.org/debian-cd/current/source/iso-dvd/SHA1SUMS"
remote_repo_url = "http://cdimage.debian.org/debian-cd/current/source/iso-dvd/"
local_copy = "~/debian-iso-dvd"

wsync = Wsync(digest_list_url, remote_repo_url, local_copy)

wsync.sync()

Or:

digest_list_url = "https://raw.githubusercontent.com/reale/wsync/testing/SHA1SUMS"
remote_repo_url = "https://raw.githubusercontent.com/reale/wsync/testing/"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
wsync-0.9.3.tar.gz (6.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page