||2 years ago|
|README.md||2 years ago|
|sniffa.py||2 years ago|
sniffa is a small utility that allows you to watch Discuss forums for keywords.
Originally this program was developed by Daniel Mitterdorfer. This fork removes the MacOS dependency and make it work with GNU/Linux and GNOME3. Other desktops should work as well, but I didn't tested it.
Every time it is invoked, it checks for new posts matching the keywords and creates a notification.
- GNU/Linux with python-gobject and libnotify-bin installed
- Python 3
- certifi: Install with
pip3 install certifi
Ensure that all prerequisites are installed, then copy
sniffa.py to any directory, e.g.
~/bin and run
chmod u+x sniffa.py.
sniffa can be used to query multiple Discuss forums. The keywords and the ids of all already seen posts are maintained in a file
$(FORUM_NAME) is a name that you can choose to identify this forum.
Consider you want to watch for the keywords "Talk" and "Calendar" in the Nextcloud forum to get notified if someone writes something about your favourite Nextcloud apps.
- Add the following lines:
[sniffa.domain] url = https://help.nextcloud.com [Talk] [Calendar]
Now invoke sniffa:
python3 sniffa.py elastic. It will load the watches file for the forum named "nextcloud", check for new posts (which will be a lot at the first time) and show a notice for each of them in the Gnome notification bar.
Automatic regular invocation
to call sniffa regularly in the background you can write a small bash script
#!/bin/sh while true do python3 ~/bin/sniffa.py nextcloud &> /dev/null sleep 300 done
copy it to
~/bin and run
chmod 755 sniffa.sh.
Afterwards add it to the
autostart by creating
[Desktop Entry] Name=Sniffa Comment=Watch Discuss forums for keywords Exec=/home/schiesbn/bin/sniffa.sh Terminal=false Type=Application
'sniffa' is distributed under the terms of the Apache Software Foundation license, version 2.0.