danielthepope / trntxt

:steam_locomotive::train::train: A data-friendly UK train times site
https://trntxt.uk
MIT License
36 stars 9 forks source link

Add Cambridge North station #40

Closed desbo closed 7 years ago

danielthepope commented 7 years ago

Thanks for the PR! I'm currently in a field so I can't check anything right now. Do you know if there are any other stations

danielthepope commented 7 years ago

...that have been added recently? http://www.nationalrail.co.uk/static/documents/content/station_codes.csv

desbo commented 7 years ago

Not sure, but it'd probably be worth polling that file and keeping a cache in memory to avoid having to update a local copy. Happy to do another PR for that if you agree.

danielthepope commented 7 years ago

I think the original reason I had it on a local CSV file was because the National Rail file had many megabytes of whitespace at the end. If they've fixed that then yeah, polling that CSV would be a good idea. Go for it if you've got the time (and willpower to deal with my source code) :)

danielthepope commented 7 years ago

Hmm, that CSV file I linked to doesn't include Cambridge North (or the other 2 stations opened in 2017), so don't bother trying to poll for updates 😉 Who'd have thought National Rail would be out of date? I've now added the other new stations.