jpsingleton/Huxley2

Station list CSV down

davwheat opened this issue · 3 comments

"StationCodesCsvUrl": "https://www.nationalrail.co.uk/static/documents/content/station_codes.csv"

This URL seems to be dead. Is there a way to disable the station CSV list update, or a place to change the URL to?

Thanks!

The preferred method of getting the CRS codes is from the staff API. If you set a staff API key then it will be used and the station CSV list update will be disabled (if the staff API call succeeds). The logic is in the CrsService if you want to tweak it.

The file appears to have moved to https://www.nationalrail.co.uk/station_codes%20(07-12-2020).csv but the format has also changed (multiple columns). Good idea to have your own copy that you control, ideally populated from the Darwin staff API. The NRE CSV has previously been incomplete and contained CRS codes that didn't even work with Darwin!

The gist appears not to have a header row and has a duplicate of OKE.

I've produced a complete CRS codes file (https://raw.githubusercontent.com/jpsingleton/Huxley2/master/station_codes.csv) and set this as the default URL in the Huxley2 app settings.

Instructions on how to make it with one line of bash are in the readme.