This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
I built a bot that sends me a Telegram message if there are affectations in the public transport that I need to take to go to university or to go back home. The bot is programmed to run at specific times (I have it set to run at 6:30, when I wake up, and at 16:30, roughly an hour before I usually leave uni to go home).
I honestly was getting quite lazy, and forgetting to check the trip planner every day for construction works, or other disruptions. This caused me problems a couple of days lately, due to strikes, making me get to class a bit late. To prevent this (while staying lazy) I made this bot that sends me a Telegram message (because I don't have the budget for SMS, and I don't check Discord often) twice a day. Additionally, it can generate a voice memo using ElevenLabs so I can just play the voice memo while I am getting ready for the day. (Note: there are still some kinks with the ElevenLabs text-to-speech, but I hope to fix it soon)
Demo
Code
Netherlands Public Transport Monitor (Ontspoord)
A Python CLI and scheduled automation tool that monitors public transport strikes, service disruptions, and planned engineering works across the Netherlands over the next 7 days, summarizes them locally using Gemma 4 E4B (gemma4:e4b) via Ollama, and delivers structured multi-message digests to Telegram DM.
Features
-
Multi-Source Data Acquisition
-
Arriva Staking Scraper: Scrapes
https://www.arriva.nl/plan-je-reis/staking/for train and bus strike notices across regional and nationwide concessions. -
Arriva Storingen & Werkzaamheden: Scrapes
https://www.arriva.nl/plan-je-reis/storingen-en-werkzaamheden/for active and upcoming route detours, track maintenance, and disruptions. -
9292 Staking-OV: Scrapes
https://9292.nl/actueel/staking-ov/for national and regional strike dates, union announcements (FNV/CNV), and regional impact. -
NS Reisinformatie API v3: Direct integration with NS API v3 querying
CALAMITY,DISRUPTION, andMAINTENANCEwithoutisActive=trueto capture upcoming announced strikes and weekend track work. -
NS Web Fallback: Scrapes
https://www.ns.nl/reisinformatie/actuele-situatie-op-het-spoor/for major network-wide calamity alerts.
-
Arriva Staking Scraper: Scrapes
- 7-Day…
How I Built It
To get the data required, I scrape websites of public transport companies in the Netherlands, and I also use the official Nederlandse Spoorwegen (NS) API. This allows me to get an overview of all the current disruptions in the public transport systems. After filtering by location, this is given to Gemma4, to summarise all the information, and compose a message summarising the affected routes.
I chose Telegram because it is an easy and free way to get a message to my phone. I could've used Discord, but I am not online there much lately. I also used ElevenLabs to send a voice memo summarising the status.
Why Does Open Innovation Matter?
Being able to use a small model such as Gemma4b means that anyone can run this code themselves, for free. Additionally, it helps keep the personal data of the users (such as which trips do they do often) private.It also means that this code could even potentially be run on a smartphone, with similar benefits.
The Lazy Payoff
Honestly, I built this for myself. Sometimes I forget to check if there's an accident on the tracks, or if there's a strike. This can then lead me to make plans which end up being impossible. Having a bot message me twice a day (once before leaving home, and once before leaving the university) helps me plan my trips better.
Prize Categories
- Best Use of Gemma (summarises the status)
- Best Use of ElevenLabs (voices the voice memo)
- Best Use of a .tech Domain (ontspoord.tech)
- Best Use of GitHub Copilot (used as assistance during development and to improve code legibility and reusability)
Top comments (0)