stack-alert

Be notified when interesting questions are posted to Stack Exchange sites.


License
GPL-3.0
Install
pip install stack-alert==0.2.1

Documentation

Stack Alert

Stack Alert is a program to notify you when a question matching certain filters is asked on a Stack Exchange site. Stack Exchange has a feature that allows you to be notified when questions matching certain tags are asked, but this is often so broad as to be useless. Stack Alert instead allows you to filter using regular expressions against the title and body of the question.

https://img.shields.io/github/workflow/status/kalekundert/stack_alert/Test%20and%20release/master

Getting Started

Install stack_alert using pip, preferably into a clean virtual environment:

$ python -m venv ~/stack_alert_venv
$ ~/stack_alert_venv/bin/activate
$ pip install stack_alert

Specify which questions you want to receive alerts for:

$ vi ~/.config/stack_alert/config.toml
[[query]]
site = 'stackoverflow'
tag = 'python'
keywords = '(num|sci)py'  # regular expression
recipient = 'alice@example.com'

Configure cron to call stack_alert at 5:00 PM every day. Log messages are written to stderr. I recommend using ts and tinylog to collect and rotate these messages:

$ which sendmail
/usr/sbin/sendmail
$ crontab -e
PATH=$HOME/stack_alert_venv/bin:/usr/sbin:/usr/bin:/bin
0 17 * * * stack_alert 2>&1 | ts | tinylog /path/to/log/dir