Traffic Bot is a slack bot for traffic alerts in the UK. Data is pulled from an xml feed from highways.gov.uk, and then pushed to your slack webhook.
Simply download this project:
git clone https://github.com/alxwrd/slack-traffic.git
cd slack-traffic
Initialise a settings file by running :
python settings.py
Edit the settings.json
file that was produced:
{
"max_distance": 1,
"webhook": "https://hooks.slack.com/your-url",
"location":{
"latitude": 51.500152,
"longitude": -0.126236
}
}
Then run traffic_bot.py
python traffic_bot.py
Traffic Bot will run once, and post any new items to your webhook. To run automatically, add it to your crontab.
Contributions are welcome! Please raise an issue with any problems or suggestions. Or submit a pull request!