Skip to content

Add Renfe and Dutch timetables (Interrail) - #1

Merged
davd-gzl merged 1 commit into
mainfrom
europe-operators
Oct 5, 2026
Merged

davd-gzl merged 1 commit into
mainfrom
europe-operators

Conversation

@davd-gzl

@davd-gzl davd-gzl commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

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) and v1/nl/interrail/… (the Netherlands, including Eurostar Paris–Amsterdam and EuroCity Brussels–Rotterdam). Interrail only, with the seat unknown. 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 in src/operators/:

  • Renfe keeps every long and medium-distance family except AVLO, which doesn't take Interrail.
  • The Dutch feed (every mode, 1.2 GB of stop times) keeps international and long-distance trains at every stop, and domestic Intercity trains only between the stations those serve, so the snapshot stays small.

npm run fetch now 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.json and the README.


Generated by Claude Code

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.
@davd-gzl
davd-gzl merged commit b614099 into main Oct 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant