https://github.com/alxwrd/slack-traffic
A slack bot for traffic alerts in the UK
https://github.com/alxwrd/slack-traffic
bot python slack slack-bot traffic-bot traffic-monitoring xmlhttprequest
Last synced: about 10 hours ago
JSON representation
A slack bot for traffic alerts in the UK
- Host: GitHub
- URL: https://github.com/alxwrd/slack-traffic
- Owner: alxwrd
- License: mit
- Created: 2017-02-05T18:41:09.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-26T19:50:19.000Z (about 3 years ago)
- Last Synced: 2025-10-26T04:33:14.453Z (6 months ago)
- Topics: bot, python, slack, slack-bot, traffic-bot, traffic-monitoring, xmlhttprequest
- Language: Python
- Size: 13.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Traffic Bot :oncoming_automobile:
Traffic Bot is a [slack](https://slack.com/) bot for traffic alerts in the UK. Data is pulled from an xml feed from [highways.gov.uk](http://www.highways.gov.uk), and then pushed to your slack webhook.
[data.gov.uk link](https://data.gov.uk/dataset/live-traffic-information-from-the-highways-agency-road-network/resource/7b941228-e805-4933-b417-a4eb6fb0fa77)

## Installation
Simply download this project:
```bash
git clone https://github.com/alxwrd/slack-traffic.git
cd slack-traffic
```
Initialise a settings file by running :
```bash
python settings.py
```
Edit the `settings.json` file that was produced:
```json
{
"max_distance": 1,
"webhook": "https://hooks.slack.com/your-url",
"location":{
"latitude": 51.500152,
"longitude": -0.126236
}
}
```
Then run `traffic_bot.py`
```bash
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.
## Contributors
Contributions are welcome! Please raise an [issue](https://github.com/alxwrd/slack-traffic-uk/issues/new) with any problems or suggestions. Or submit a pull request!