Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rikardfahlstrom/floorball-game-monitor
Monitors given floorball games in any of the Swedish leagues and push game updates to given Slack channel, used when the official app did not support push notifications.
https://github.com/rikardfahlstrom/floorball-game-monitor
beautifulsoup4 floorball python slack
Last synced: 6 days ago
JSON representation
Monitors given floorball games in any of the Swedish leagues and push game updates to given Slack channel, used when the official app did not support push notifications.
- Host: GitHub
- URL: https://github.com/rikardfahlstrom/floorball-game-monitor
- Owner: RikardFahlstrom
- License: mit
- Created: 2019-12-31T11:40:21.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-28T00:30:38.000Z (about 1 year ago)
- Last Synced: 2024-11-09T14:24:52.224Z (2 months ago)
- Topics: beautifulsoup4, floorball, python, slack
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Floorball game monitor
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c82f8b283d9045a681cd4b03c03788ec)](https://www.codacy.com/manual/rikard.fahlstrom/floorball-game-monitor?utm_source=github.com&utm_medium=referral&utm_content=RikardFahlstrom/floorball-game-monitor&utm_campaign=Badge_Grade)## Overview
Since the official iPhone app for the Swedish Floorball association
do not support push notifications for match events, I created
my own scraping script that checks for changes in specific match result
and sends a push notification to a given Slack channel.## Getting Started
These instructions will get you a copy of the project up and running on your local machine.
### Prerequisites
What things you need to install the software and how to install them
* Python 3.6 or above
* A Slack app which can post messages to a specific channel based on an incoming webhook### Installing
Run below to get the necessary libraries, preferably in a virtualenv.
```bash
$ virtualenv -p python3 virtualenv_name
```
```bash
$ source virtualenv_name/bin/activate
```Then
```bash
$ pip install -r requirements.txt
```Create the `config.py` in the same directory as `program.py`
It should contain this information:```python
slack_token = "xxxxxxxxxx"
```## Usage
To monitor a the result from a specific game from the command line:
```bash
$ python program.py
```To schedule upcoming games via crontab
```bash
* * * * * python3
```
Where
* `` is found in the URL from a specific game detail view
* `` is start time of the specific game in format `%Y-%m-%d %H:%M`Specific example with [this game](https://innebandy.se/statistik/sasong/37/serie/11566/match/503033)
* crontab schedule `02 19 03 01 *`
* `` is 503033
* `` is "2020-01-03 19:00"Ends up with
```bash
02 19 03 01 * python3 "503033" "2020-01-03 19:00"
```## Contributing
Please open an issue or send a pull request.
## Acknowledgments
* [README-template](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2.js) - The template I used as a starting point