Pronounced "train text" and currently live at trntxt.uk, this is a GPRS-friendly UK train times web service.
(Also lives at traintext.uk, but that's not as cool)
Uses the National Rail 'Darwin' API to get departure times.
trntxt currently gives departure times for a given station, optionally filtered by a calling station.
Stations can be input using either their 3-letter codes or by their names (without spaces). For example, 'bristolparkway', 'bristolp' and 'bpw' will all give times for Bristol Parkway.
Thanks for helping out! Please feel free to fork this repo, make your changes then make a pull request.
If you want to run this program locally, you will need to register for a National Rail API key here.
Once you have a key, paste it into ./config/config.js; this file is generated based on the template ./config/config.example.js at build-time.
config/config.js should look like this
module.exports = {
apiKey: 'your-api-key-here'
};
Install the required packages using npm install in the command line. You also need to install the gulp command line interface globally, if you haven't already done so: npm install -g gulp-cli
To run the server, just type gulp. The server runs, then restarts if any of the JavaScript files are changed.
There are still a few things I'd like to do with trntxt. Check out the issues page for things to do. If you want to tackle a particular issue, let me know first in a comment or on Twitter - I might be working on it already!
There are a number of people I'd like to thank for helping me out throughout the development of this project. The contributors page doesn't tell the whole story, so here we go.
$ claude mcp add trntxt \
-- python -m otcore.mcp_server <graph>