A simple Python bot that asks StackExchange (you specify which sites in the network) for questions about particular subjects, and then tells a Slack channel when it's found some. Useful for any projects who expect to have a tech support burden on StackExchange.
- Get a StackExchange API key. You can get one here
- Create a Slack app. You can do so here
- Ensure that your Python installation has met the dependencies with
pip install -r requirements.txt - In your Slack app, click "Add features and functionality" and "Incoming webhooks". Create a webhook for the channel of your choice.
- Copy
config-blank.jsontoconfig.jsonand fill it in:
- Put your StackExchange API key in "stack_key"
- Put your Slack webhook URL in "slack_hook"
- Put the StackExchange network sites you wish to search in the "sites" field (e.g.
["stackoverflow", "stats"]) - Put the searches you wish to report in the "searches" field.
- Run
stack_slack_bot.py
pep8 --ignore W191,E101,E111,E501,E128
autopep8 --ignore W191,E101,E111,E128,E501 --in-place
pylint (pylint settings contained in .pylintrc)