BlinkTagInc / gtfs-to-html

Build human readable transit timetables as HTML or PDF from GTFS.
https://gtfstohtml.com
MIT License
180 stars 57 forks source link

Incorrect website documentation on timetables.txt formatting #167

Closed jack-quartic closed 1 month ago

jack-quartic commented 1 month ago

Hello! I wrote a script for a transit agency client to build them a timetables.txt file, so they could run it through your tool and stack routes. After following the schema for timetables.txt and running the tool, it wouldn't generate any timetables, or if I set allowEmptyTimetables: true they would just be blank.

After some troubleshooting, I noticed the timetables.txt documentation indicates that _startdate and _enddate need to be in the format YYYY-MM-DD, however, the examples at the bottom of the page show YYYYMMDD. After switching to using YYYYMMDD, I can generate timetables w/o issue. I just wanted to make you aware of the documentation discrepancy.

Really neat tool, thank you!

brendannee commented 1 month ago

Thanks so much for pointing out this issue - you are probably not the only one tripped up by this documentation.

I published and updated version https://github.com/BlinkTagInc/gtfs-to-html/releases/tag/2.7.0 and updated documentation to resolve this.

Try it out and let me know how it works.

I'd be interested to see the script you wrote for creating timetables.txt and ideas on how to make this process easier.

jack-quartic commented 1 month ago

Glad to help. 🙌 Amazing, thank you for the all the updates, especially the library ones.

Once I've fleshed out the rest of the script (add timetable_label for stacked routes, and clean it up a bit) I'd be glad to share.

I'll test your updates and let you know.

jack-quartic commented 1 month ago

@brendannee Works great. Runs fine regardless of hyphen inclusion. I was trying to force the error check you mentioned adding in the 3rd bullet, and when I ran it using YYYYDDMM instead of MMDD, I just get the following warning, which is the same error I got before I submitted this issue:

Warning: No trips found for route_id=71-180, direction_id=0, service_ids=[], timetable_id=118

I don't see any error with details on file and line no. However, I am running this tool as a python subprocess, and spitting out stdout and stderr to the VS Code terminal. Not sure if this may be why I don't see the error.

brendannee commented 1 month ago

Thanks for testing this.

The next release will validate the dates time timetables.txt and give a better warning about invalid dates instead of no trips found.