From: karim hamidou Date: Wed, 4 Jul 2012 07:46:27 +0000 (+0200) Subject: added main file for client X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=793129675d12624a50a694ab69dfd7fbec50c981;p=cagibi.git added main file for client --- diff --git a/cagibi/cagibi.py b/cagibi/cagibi.py new file mode 100644 index 0000000..54078d4 --- /dev/null +++ b/cagibi/cagibi.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +from watch import FileWatcher +from rsync import * + +def changesHandler(modified, added, removed): + for file in modified: + fd = open(file, "rb") + hashes = blockchecksums(fd) + print hashes + +if __name__ == "__main__": + fw = FileWatcher() + fw.addHandler(changesHandler) + fw.watch()