BlinkTagInc / gtfs-to-html

Build human readable transit timetables as HTML or PDF from GTFS.

Home Page:https://gtfstohtml.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need to show direction in the title of the route

yashgt opened this issue · comments

I generated the HTML online at Preview . The route name appears twice, one for onward and one for return journey. The name should include a direction. Also, the routes should be listed in a configurable order, such as ordered by name, etc.

Can you share with me the GTFS used so I can check it out?

You can configure many aspects of what routes/directions/days get generated and the order by adding https://gtfstohtml.com/docs/timetables and https://gtfstohtml.com/docs/timetable-pages to the GTFS when processing.

Can you share with me the GTFS used so I can check it out?

You can configure many aspects of what routes/directions/days get generated and the order by adding https://gtfstohtml.com/docs/timetables and https://gtfstohtml.com/docs/timetable-pages to the GTFS when processing.

Here is the GTFS file I am using.
GTFS

The timetables.txt lets us individually configure each route. What I am looking for is a way to say that the list of routes will appear sorted by route_name of the route given in routes.txt.

Good point.

I tried the GTFS you provided, and noticed that the sorting wasn't working because route_short_name for all routes starts with a non-numeric character.

I updated gtfs-to-html so that timetable pages on the overview page are now sorted be stripping non-numeric characters from route_short_name: eace808 In that commit, you can see where the sorting logic is happening. This isn't included in a published version of GTFS-to-HTML yet, but you can try it out by cloning the repo. Let me know if this handles the sort the way you'd want, or if you think a field in timetable_pages.txt might be useful to manually control sorting.

I suggest the sorting criteria be kept configurable. When generating the html, one can choose short name or route name. Passengers would prefer an html sorted by route name as they may be unfamiliar with the route numbering used at a location they are visiting as tourists.

How about a new field in timetable_pages.txt called timetable_page_sequence which would allow you to manually specify the order that timetable pages show up on the summary page? https://gtfstohtml.com/docs/timetable-pages

Let me know what you think of that idea, or if you can see a better way to achieve this.

@yashgt Let me know what you think of the idea above - would that work for your use case? Any other ideas?