Watcher is a daemon that watches specified files/folders for changes and fires commands in response to those changes. It is similar to incron, however, configuration uses a simpler to read yaml file instead of a plain text file. It's also written in Python, making it easier to hack.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Added copyright notice (MIT) Sep 17, 2010
README.md switch to markdown Jan 28, 2013
jobs.yml feature add : $datetime for command, event date time output Sep 5, 2013
watcher.py create ~/.watcher if it does not exist Sep 14, 2013

README.md

See jobs.yml for proper configuration syntax

Dependencies: python, python-pyinotify, python-yaml

In Ubuntu (and Debian):

sudo apt-get install python python-pyinotify python-yaml

make sure watcher.py is marked as executable

chmod +x watcher.py

start the daemon with:

./watcher.py start

stop it with:

./watcher.py stop

restart it with:

./watcher.py restart

The first time you start it (if you haven't done it yourself) it will create ~/.watcher and ~/.watcher/jobs.yml and then it will yell at you. You need to edit ~/.watcher/jobs.yml to setup folders to watch. You'll find a jobs.yml in the same directory as this README. Use that as an example. It should be pretty simple.

If you edit ~/.watcher/jobs.yml you must restart the daemon for it to reload the configuration file. It'd make sense for me to set up watcher to watch the config file. That'll be coming soon.

Problems? greggory.hz@gmail.com

Have fun.