|Ben de Graaff 432be5c75f||1 year ago|
|.session||3 years ago|
|bin||1 year ago|
|netwatch||1 year ago|
|.gitignore||3 years ago|
|COPYING||3 years ago|
|README.md||2 years ago|
|config-example.yml||3 years ago|
|setup.py||3 years ago|
A collection of tools to watch for new content on the Internet.
New content updates are sent as single-line JSON blobs, which can then be further processed by the tool of your choosing.
Install the package and its dependencies. A virtual environment is well suited for this:
virtualenv -p python3 venv venv/bin/pip install -e .
A simple cron-style usage example:
#!/bin/sh cd $HOME/code/netwatch/ venv/bin/netwatch feeds.yml 2>>log | bin/pegasus-publish
Mailboxes can also be watched (work in progress) and rendered to HTML:
#!/bin/sh cd $HOME/code/netwatch/ venv/bin/python bin/watchbox user:pass@imap-server /var/www/mails/ http://example.com/mails/ 2>>log | bin/pegasus-publish '#mychannel'
pegasus-publish script is just an example: in this case it outputs
messages over a UNIX socket to an IRC bot.
Netwatch stores its session data on disk as JSON object:
Each feed has a unique name associated with it which is used to determine the path on disk for the session object. The default path is ‘.session’ in the current working directory.