Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.25 KB

README.md

File metadata and controls

31 lines (21 loc) · 1.25 KB

gwr-feed

A simple Python script to generate a JSON Feed for search for train tickets on Great Western Railway. Only supports single (one-way) journeys.

Served over Flask!

Use the Docker build to host your own instance.

  1. Set your timezone as an environment variable (see docker docs): TZ=America/Los_Angeles

  2. Access the feed using the URL with origin and destination station codes: http://<host>/?from=BHM&to=EUS

  3. Optionally, specify a:

    • date (yyyyMMdd): http://<host>/?from=BHM&to=EUS&on=20221225
    • time (hhmm): http://<host>/?from=BHM&to=EUS&at=1200
    • number of weeks to look ahead: http://<host>/?from=BHM&to=EUS&weeks=2
    • or any combination of the above

Note: set a longer timeout on your feed reader if you use the 'weeks' option

E.g.

Train prices from MAN (Manchester Piccadilly) to PAD (London Paddington) at 9pm:

Feed link:
http://<host>/?from=MAN&to=PAD&at=2100

Tested with: