All Projects → splitbrain → Watcher

splitbrain / Watcher

Licence: MIT License
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 ini file instead of a plain text file. Unlike incron it can also recursively monitor directories. It's also written in Python, making it easier to hack.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Watcher

Trigger
Run a user-defined command on file changes
Stars: ✭ 163 (+28.35%)
Mutual labels:  inotify
gowatch
watch go files for developer, support run test case and auto reload server application
Stars: ✭ 18 (-85.83%)
Mutual labels:  inotify
sftp-gateway
This repository contains a docker image configured to use the SSH File Transfer Protocol (SFTP) to transfer all its files to Cloud Blob Storage Services. This image can be deployed on a Kubernetes cluster with Helm.
Stars: ✭ 18 (-85.83%)
Mutual labels:  inotify
Hupper
in-process file monitor / reloader for reloading your code automatically during development
Stars: ✭ 167 (+31.5%)
Mutual labels:  inotify
Node Inotify
Inotify bindings for Node.JS
Stars: ✭ 237 (+86.61%)
Mutual labels:  inotify
inotify-rs
Idiomatic inotify wrapper for the Rust programming language
Stars: ✭ 219 (+72.44%)
Mutual labels:  inotify
Dfs
A distributed file server framework based on swoole and inotify
Stars: ✭ 112 (-11.81%)
Mutual labels:  inotify
hxinotify
Haxe→C++/Hashlink/Neko bindings to the inotify linux kernel subsystem
Stars: ✭ 21 (-83.46%)
Mutual labels:  inotify
Dogo
Monitoring changes in the source file and automatically compile and run (restart).
Stars: ✭ 237 (+86.61%)
Mutual labels:  inotify
gevent inotifyx
gevent compatibility for inotifyx
Stars: ✭ 22 (-82.68%)
Mutual labels:  inotify
Inotify
Idiomatic inotify wrapper for the Rust programming language
Stars: ✭ 175 (+37.8%)
Mutual labels:  inotify
Inotify Win
A port of the inotify-wait tool for Windows
Stars: ✭ 214 (+68.5%)
Mutual labels:  inotify
fswatch
File/Directory Watcher for Modern C++
Stars: ✭ 56 (-55.91%)
Mutual labels:  inotify
Minotaur
A pythonic, asynchronous, inotify interface
Stars: ✭ 163 (+28.35%)
Mutual labels:  inotify
DirectoryWatcher
Watch changes in directories
Stars: ✭ 70 (-44.88%)
Mutual labels:  inotify
Clsync
file live sync daemon based on inotify/kqueue/bsm (Linux, FreeBSD), written in GNU C
Stars: ✭ 115 (-9.45%)
Mutual labels:  inotify
pmOCR
A wrapper for tesseract / abbyyOCR11 ocr4linux finereader cli that can perform batch operations or monitor a directory and launch an OCR conversion on file activity
Stars: ✭ 53 (-58.27%)
Mutual labels:  inotify
docker base images
Vlad's Base Images for Docker
Stars: ✭ 61 (-51.97%)
Mutual labels:  inotify
filestat exporter
Prometheus exporter gathering metrics about file size, modification time and other stats
Stars: ✭ 23 (-81.89%)
Mutual labels:  file-monitoring
watcherd
A shell daemon that will listen for directory changes and execute custom commands for each event.
Stars: ✭ 48 (-62.2%)
Mutual labels:  inotify

About Watcher

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 ini file instead of a plain text file. Unlike incron it can also recursively monitor directories.

It's written in Python, making it easier to hack.

Requirements

You need Python 2.7 and the pyinotify library.

In Ubuntu (and Debian) you can install these with:

sudo apt-get install python python-pyinotify

Configuration

See the provided watcher.ini file for an example job configuration. The config file should reside in /etc/watcher.ini or ~/.watcher.ini. You can also specify the path to the config file as a command line parameter using the --config option.

If you edit the ini file you must restart the daemon for it to reload the configuration.

Starting the Daemon

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

If you don't want the daemon to fork to the background, start it with

./watcher.py debug
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].