A simple evaluation bot run daily to check if the commute to work will be better done by bike or car Publishes notifications via Telegram, runs via docker and cron
  • Python 83.5%
  • Shell 12%
  • Dockerfile 4.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Firq 133db57c74
All checks were successful
/ Prepare / CI Environment (push) Successful in 2s
/ Validate / mypy (push) Successful in 10s
/ Validate / pylint (push) Successful in 12s
/ Validate (push) Successful in 0s
/ Build / package (push) Successful in 8s
/ Publish / pypi (push) Successful in 2s
/ Publish / forgejo (push) Has been skipped
/ Build / docker (push) Successful in 45s
Better logging, fixed error with typing_extensions
2026-10-28 13:24:23 +01:00
.forgejo/workflows fix missing docker tag 2026-10-27 15:33:40 +01:00
scripts Better logging, fixed error with typing_extensions 2026-10-28 13:24:23 +01:00
src/biking_bot Better logging, fixed error with typing_extensions 2026-10-28 13:24:23 +01:00
.gitignore Initial implementation 2026-10-27 15:14:09 +01:00
.python-version Initial implementation 2026-10-27 15:14:09 +01:00
Dockerfile Initial implementation 2026-10-27 15:14:09 +01:00
LICENSE.md Initial implementation 2026-10-27 15:14:09 +01:00
pyproject.toml fix license chaos 2026-10-27 15:32:27 +01:00
README.md Initial implementation 2026-10-27 15:14:09 +01:00
uv.lock made models configurable 2026-10-28 13:03:33 +01:00

biking-bot

A simple evaluation bot run daily to check if the commute to work will be better done by bike or car

config

Set the following env variables:

TELEGRAM_BOT_TOKEN=<bot token>
TELEGRAM_CHAT_ID=<chat id>

WAYPOINTS_JSON=[{"name": "<name1>", "lat": <lat of name1>, "lon": <lon of name 1>}, ...]
PRECIPITATION_LIMIT_MM=<desired percipitation limit>
WIND_GUST_LIMIT_KMH=<desired wind speed limit>
COMMUTE_HOURS=<desired commute hours>

WAYPOINTS_JSON is an array of waypoints, each comprised of the following:

{
    "name": "start", # name of the waypoint
    "lat": 0.0, # "latitude of the waypoint"
    "lon": 0.0  # "longitude of the waypoint"
}

Recommendation: set start, end and a waypoint every few km (my case: every 3km)

PRECIPITATION_LIMIT_MM is typically a value between 0.0 and 1.0 (mm of rain), default is 0.5 - reduce accordingly if not even light rain is okay WIND_GUST_LIMIT_KMH is the windspeed in km/h - default is 50 COMMUTE_HOURS is a comma-separated string of hours where the commute is to be evaluated, 7,8 as default