Train Me Maybe watches occupied RegioJet trains and buses for you. Simply tell it which routes it should watch, and you will get notified once a free seat is found. Even better, it can purchase the ticket for you!
The app is currently in beta version. Only routes without transfers are supported. In case something is not working, definitely let us know at prosim@vyhul.me.
The app was created as a student open-source project during the course PB173 at FI MUNI (Brno, Czech Republic).
Try now at vyhul.me!
Incrementally, we will add these features:
- ✅ (one-shot) based on datetime, ID from and ID to, find the given route and check if there is a free seat
- ✅ (one-shot) send a notification to an email if there is a free seat
- ✅ (periodic) watch for the seats with a configurable interval
- ✅ allow the user to enter a regojet login (kreditová jízdenka)
- ✅ authenticate against the regiojet API
- ✅ if there is a free seat and the user has enough credit, buy the seat automatically and notify the user
- ✅ notify the user if they have low credit
- allow the user to put an upper limit on the price of the automatically-purchased ticket
- notify the user on their Discord channel
- ✅ allow the user to enter/choose the name of the stations, instead of its IDs (can be some simple terminal UI when starting the app)
- ✅ allow the user to configure the application via a environment variables and/or configuration file (not only via command line arguments)
- ✅ allow the user to choose from the seat classes available in the selected train only
- ✅ deploy the application to a server
- ✅ allow the user to configure the application via a web interface
- ✅ allow multiple users to use the deployed application
We support configuration via:
config.toml
file- environment variables prefixed with
REGIOJET_
- can be loaded from a.env
file
The later options have higher priority.
REGIOJET_POLL_INTERVAL
- how often to check for the free seats (in seconds). Recommended value is at least60
.REGIOJET_API_BASE_URL
- the base URL of the Regiojet API. Default ishttps://brn-ybus-pubapi.sa.cz/restapi
.
We need to know how to connect to an SMTP server to send emails. And also to whom. The following environment variables are used (for example for gmail):
REGIOJET_SMTP_SERVER
=smtp.gmail.comREGIOJET_SMTP_PORT
=587REGIOJET_SMTP_USERNAME
=your-email@gmail.comREGIOJET_SMTP_PASSWORD
=you need to generate an app passwordREGIOJET_SMTP_RECIPIENT
=your-email@gmail.com
To test that the email notification works for you, you can run
go run .\cmd\email-test\main.go
REGIOJET_AUTH_CREDIT_USER
- the username of your Regiojet account (kreditová jízdenka)REGIOJET_AUTH_CREDIT_PASSWORD
- the password of your Regiojet accountREGIOJET_AUTH_CREDIT_ENABLED
- set totrue
to enable automatic purchases