Skip to content

Script that reports the next in&out-bound Metra train every minute

License

Notifications You must be signed in to change notification settings

fruzyna/next-metra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

next-metra

Scripts that reports the next in&out-bound Metra trains.

API Key

These scripts require an API key (username and password) from Metra to access their GTFS API. You can request a pair here. Once you receive your key pair, place them in the username and password fields in a metra.ini file, see the example format below.

[DEFAULT]
username=12345678901234567890123456789012
password=12345678901234567890123456789012
default_line=UP-NW
default_stop=DESPLAINES

CLI Usage

usage: metra-cli.py [-h] [-l LINE] [-s STOP]

Continuously report upcoming Metra trains to a given station.

options:
  -h, --help                        show this help message and exit
  -l LINE, --line LINE              short train line name (UP-NW)
  -s STOP, --stop STOP              station identifier (DESPLAINES)
  -i INTERVAL, --interval INTERVAL  update interval in seconds

Server Startup

uvicorn --host 0.0.0.0 metra-server:app

About

Script that reports the next in&out-bound Metra train every minute

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published