Repository navigation
Add Renfe and Dutch timetables (Interrail) - #1
Merged
Merged
Conversation
Each operator stays its own API (v1/renfe, v1/nl), Interrail only. Renfe keeps every long and medium-distance family but AVLO; the Dutch feed keeps international and long-distance trains, and Intercity trains between the stations those serve.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: the API had one operator, SNCF, so Interrail only covered trains in or through France. Madrid and Amsterdam weren't in it.
After: two more operators, each published as its own API with the same files as SNCF:
v1/renfe/interrail/…(Spain, including the Barcelona–France trains) andv1/nl/interrail/…(the Netherlands, including Eurostar Paris–Amsterdam and EuroCity Brussels–Rotterdam). Interrail only, with the seatunknown. Trips that change between operators aren't joined here.How: a streaming GTFS reader (
src/gtfs.ts) turns each kept trip into one train per stop pair per running date, like an SNCF row. Per-operator rules live insrc/operators/:npm run fetchnow also downloads and unzips each GTFS feed. A feed that can't be fetched is left out instead of failing the publish. CI gains a fixture build for the GTFS path and, on pull requests, a build from the live feeds that prints file sizes.Licences: Renfe Data CC BY 4.0, OVapi/NDOV CC0, credited in
index.jsonand the README.Generated by Claude Code