Skip to content
Binding between fswatch and rsync
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
syncer.py

README.md

Python utility to bind the FSWatch and Rsync

The use case

  1. You develop the project at your Mac but run it in cloud.
  2. After any local change you rsync project files to cloud with hands.

How this tool works

  1. It listens for FS events via fswatch.
  2. Next it reads the changes chunk (buffered for 1 second).
  3. Finally it uploads this files via rsync.

Requirements

  • Python 2.7 on MacOS or Linux
  • Rsync
  • FSWatch (Homebrew's is OK)

Example

my-project $ python2.7 syncer

Watching directory /Users/p.patrin/Projects/my-project/
Adding file web/data/models.py
Adding file web/data/services.py
Adding file web/data/logic.py
Synced 3 file(s)!
Adding file web/data/models.py
Synced 1 file(s)!
You can’t perform that action at this time.