gtfs-to-html 2.10.1 → 2.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtfs-to-html",
3
- "version": "2.10.1",
3
+ "version": "2.10.2",
4
4
  "private": false,
5
5
  "description": "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
6
6
  "keywords": [
@@ -63,7 +63,7 @@
63
63
  "pbf": "^4.0.1",
64
64
  "pretty-error": "^4.0.0",
65
65
  "pug": "^3.0.3",
66
- "puppeteer": "^23.6.0",
66
+ "puppeteer": "^23.6.1",
67
67
  "sanitize-filename": "^1.6.3",
68
68
  "sqlstring": "^2.3.3",
69
69
  "timer-machine": "^1.1.0",
@@ -79,7 +79,7 @@
79
79
  "@types/js-beautify": "^1.14.3",
80
80
  "@types/lodash-es": "^4.17.12",
81
81
  "@types/morgan": "^1.9.9",
82
- "@types/node": "^20.17.0",
82
+ "@types/node": "^20.17.2",
83
83
  "@types/pug": "^2.0.10",
84
84
  "@types/puppeteer": "^7.0.4",
85
85
  "@types/sanitize-filename": "^1.6.3",
@@ -89,7 +89,7 @@
89
89
  "husky": "^9.1.6",
90
90
  "lint-staged": "^15.2.10",
91
91
  "prettier": "^3.3.3",
92
- "tsup": "^8.3.0",
92
+ "tsup": "^8.3.5",
93
93
  "typescript": "^5.6.3"
94
94
  },
95
95
  "engines": {
@@ -250,11 +250,14 @@ a:hover {
250
250
  font-size: 0.875rem;
251
251
  }
252
252
 
253
- .timetable-page .timetable .run-header {
254
- text-align: center;
253
+ .timetable-page .timetable .table-horizontal th {
255
254
  line-height: 1.15;
256
255
  }
257
256
 
257
+ .timetable-page .timetable .trip-header {
258
+ text-align: center;
259
+ }
260
+
258
261
  .timetable-page .timetable .run-footer {
259
262
  text-align: center;
260
263
  }
@@ -118,3 +118,22 @@
118
118
  return ''
119
119
  }
120
120
 
121
+ function formatTripName(trip, index, timetable) {
122
+ let tripName;
123
+ if (timetable.routes.length > 1) {
124
+ tripName = trip.route_short_name;
125
+ } else if (timetable.orientation === 'horizontal') {
126
+ // Only add this to horizontal timetables.
127
+ if (trip.trip_short_name) {
128
+ tripName = trip.trip_short_name;
129
+ } else {
130
+ tripName = `Run #${index + 1}`;
131
+ }
132
+ }
133
+
134
+ if (timetableHasDifferentDays(timetable)) {
135
+ tripName += ` ${trip.dayList}`;
136
+ }
137
+
138
+ return tripName;
139
+ }
@@ -9,7 +9,8 @@
9
9
  tr
10
10
  th.stop-header(scope="col") Stop
11
11
  each trip, idx in timetable.orderedTrips
12
- th.run-header(scope="col")= formatTripName(trip, idx, timetable)
12
+ th.trip-header(scope="col")
13
+ .trip-name= formatTripName(trip, idx, timetable)
13
14
  each note in getNotesForTrip(timetable.notes, trip)
14
15
  include timetable_note_symbol.pug
15
16
  if timetable.frequencies && !timetable.frequencyExactTimes
@@ -48,7 +48,8 @@
48
48
  each trip, idx in timetable.orderedTrips
49
49
  tr.trip-row(id=`trip_id_${formatHtmlId(trip.trip_id)}`)
50
50
  if timetableHasTripNotes || timetable.routes.length > 1
51
- td.trip-notes= formatTripName(trip, idx, timetable)
51
+ td.trip-notes
52
+ .trip-name= formatTripName(trip, idx, timetable)
52
53
  each note in getNotesForTrip(timetable.notes, trip)
53
54
  include timetable_note_symbol.pug
54
55
  if timetable.has_continues_from_route