vingerha / gtfs2

Support GTFS in Home Assistant GUI-only
https://github.com/vingerha/gtfs2
MIT License
79 stars 7 forks source link

[FEATURE]: route_short_name in place of route_id #1

Closed danito closed 10 months ago

danito commented 10 months ago

Hi, (as HA forum is in maintenance, I put this here) The list of routes you can chose from puts the route id in front of the route name in place of the the route_short_name. In my case, this is not related, so route_id 44 is in fact bus line 74. image

´´´ sqlite> select * from routes where route_id = 44; 1|44|None|74|UCCLE-STALLE - CLEMENCE EVERARD||3||A67CB0|FFFFFF

sqlite> select * from routes where route_id = 74;
1|74|None|92|SCHAERBEEK GARE - FORT-JACO||0||E43C2E|FFFFFF
sqlite>

sqlite> ´´´ I didn't check on other gtfs files if the route_short_name is always the line name, but it might be a good idea to check and add it so it's less confusing.

Here's the link to STIB's gtfs file : https://stibmivb.opendatasoft.com/api/explore/v2.1/catalog/datasets/gtfs-files-production/alternative_exports/gtfszip/

Dan

vingerha commented 10 months ago

Well... you already guessed it... the gtfs 'suck' on consistency how they use it. I have 2 sources without any short_name and (!) I need the ID, so that will stay. And I have another one where the short name makes no sense So I can build it ID + short name + long name... it might become a mess though :)

vingerha commented 10 months ago

This is how that would look with one of my lines image

vingerha commented 10 months ago

added with 0.1.5