Skip to content

mickrick1/national-rail

 
 

Repository files navigation

National Rail

There are many parts to this repo, doing simple things with the National Rail SOAP API. Feel free to use bits and bobs as it suits you, with attribution of course!

  • A script to tweet live train information can be found in "tweetrail"
  • Scripts to collect and store data are in "collectors"
  • An AngularJS departure board can be found in "ui/departure-board"
  • A map app showing live routing animations can be found in "ui/route-map"

Learn more about the code on my website and/or follow either the Thatcham Train Twitter Feed or me (DanteLore) on twitter:

Live Route Display

Live Departures

Enjoy!

Installing under lighttpd

Clone this repo to your web root and edit some config files for lighttpd.

Add the following to /etc/lighttpd/conf.d/fastcgi.conf (or /usr/local/etc/lighttpd/conf.d/fastcgi.conf if you're on a Mac)

fastcgi.server = (
    "rail.fcgi" => ((
        "socket" => "/tmp/rail-fcgi.sock",
        "bin-path" => "/usr/local/var/www/national-rail/rail.fcgi",
        "check-local" => "disable",
        "max-procs" => 1
    ))
)

And make sure you have FastCGI enabled in /etc/lighttpd/modules.conf

About

Messing with the National Rail API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 73.7%
  • JavaScript 17.6%
  • HTML 7.7%
  • Shell 1.0%