Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to show direction in the title of the route #159

Open
yashgt opened this issue Mar 26, 2024 · 6 comments
Open

Need to show direction in the title of the route #159

yashgt opened this issue Mar 26, 2024 · 6 comments

Comments

@yashgt
Copy link

yashgt commented Mar 26, 2024

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.

@brendannee
Copy link
Member

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.

@yashgt
Copy link
Author

yashgt commented Mar 27, 2024

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.

@brendannee
Copy link
Member

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.

@yashgt
Copy link
Author

yashgt commented Mar 30, 2024

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.

@brendannee
Copy link
Member

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.

@brendannee
Copy link
Member

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

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

No branches or pull requests

2 participants