sncf-unfucker

command module
v0.0.0-...-5ba0f83 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

SNCF Unfucker ⚙

This project is born from my frustration from working with SNCF GTFS feeds, which do not follow the GTFS spec.

Context 🚈

However, these feeds do not follow the spec (Google Maps users will probably have already noticed trains that go to numbers instead of cities).

  • Therefore, my plan is to make a converter to fix these issues by turning the default SNCF feed into a ✨pretty feed✨

What SNCF does wrong ❌

  • trip.trip_headsign contains a train number and not a destination (they don't use trip.trip_short_name instead)
  • route_type is defined at the route level instead of the trip level. This mostly means that hybrid bus/train routes are shown as train only
  • The actual route type comes from the stop.stop_id prefixes (OCETrain, OCECar, OCEInoui, OCEOuigo, ...)
  • No stable calendar even though most routes run on a known schedule, everything is stored as calendar_dates (not really extra hamful, but it's frustrating to have to deal with)

Usage

Just build and run the following:

./sncf-unfucker <config.json> <output.zip>

TODO 📋

  • Split route types by actual route type
  • Set trip.trip_headsign to the actual destination, and put the train number in trip.trip_short_name
  • Actually have a valid GTFS output
  • Give stable calendars whenever possible
  • Add attributions.txt in the output file to avoid legally spicy stuff
  • Make sure calendar ID space is unique

Attributions ⚖

  • Credit goes to SNCF for their feeds, which are published under ODbL

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址