LiveTrackBot, the paragliding bot for Telegram that follows us.
This is a program to retrieve the point of a Livetrack, such as a SPOT or a Garmin, and send messages to a Telegram channel.
Sent messages are:
-
Start: when a pilot takes off.
-
OK: when a pilot sends the OK signal.
-
HELP, MOVE, CUSTOM: other possible messages sent by the pilot.
Examples of messages:
The telegram key is stored inside a .env
file and loaded using the load_dotenv()
function from the python-dotenv
package.
Metrics are stored using Prometheus and visualized using Grafana. An instance of Prometheus must be running.
Metrics are collected using Prometheus and visualized using Grafana.
Metric | Type | Description |
---|---|---|
errors_total | Counter | Number of errors (parsing or from the requests). |
messages_send_total | Counter | Number of messages sent on the channel. |
pilots_flying | Gauge | Number of pilots currently flying. |
requests_total | Counter | Number of requests sent. |
git clone https://github.com/axelfahy/LiveTrackBot
cd LiveTrackBot
python -m venv venv-dev
source venv-dev/bin/activate
pip install -e .
The program is available as a CLI. Possible options are the Telegram's channel and the livetrack's URL to use. The livetrack URL must have a json4Others.php
page that contains the list of the pilots with their points in a JSON format.
livetrackbot --channel @my_channel --url https://my_livetrack.net/json4Others.php
The deployment is done using Docker.
The Dockerfile.base
file builds an image containing the requirements.
The Dockerfile.code
file copy the code and sets the entry point.
The logs are mounted as a volume.
git clone https://github.com/axelfahy/LiveTrackBot
cd LiveTrackBot
python -m venv venv-dev
source venv-dev/bin/activate
pip install -r requirements_dev.txt
pip install -e .
Testing is currently only checking for style and linting (pylint
, flake8
and mypy
).
make test
- 0.1.0
- Initial release.
Axel Fahy – [email protected]
Distributed under the MIT license. See LICENSE
for more information.
- Fork it (https://github.com/yourname/yourproject/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
To set a new version:
git tag v0.1.4
git push --tags