gtfs-to-html 2.6.2 → 2.6.3

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/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.6.3] - 2024-04-22
9
+
10
+ ### Updated
11
+ - Add trip headsign to CSV export
12
+
8
13
  ## [2.6.2] - 2024-04-19
9
14
 
10
15
  ### Updated
@@ -146,13 +146,13 @@ export function getNotesForStoptime(notes, stoptime) {
146
146
  * Formats a trip name.
147
147
  */
148
148
  export function formatTripName(trip, index, timetable) {
149
- let tripName = '';
149
+ let tripName;
150
150
  if (timetable.routes.length > 1) {
151
151
  tripName = trip.route_short_name;
152
152
  } else if (trip.trip_short_name) {
153
- tripName += trip.trip_short_name;
153
+ tripName = trip.trip_short_name;
154
154
  } else {
155
- tripName += `Run #${index + 1}`;
155
+ tripName = `Run #${index + 1}`;
156
156
  }
157
157
 
158
158
  if (timetableHasDifferentDays(timetable)) {
@@ -177,6 +177,10 @@ export function formatTripNameForCSV(trip, timetable) {
177
177
  tripName += trip.trip_id;
178
178
  }
179
179
 
180
+ if (trip.trip_headsign) {
181
+ tripName += ` - ${trip.trip_headsign}`;
182
+ }
183
+
180
184
  if (timetableHasDifferentDays(timetable)) {
181
185
  tripName += ` - ${trip.dayList}`;
182
186
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtfs-to-html",
3
- "version": "2.6.2",
3
+ "version": "2.6.3",
4
4
  "private": false,
5
5
  "description": "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
6
6
  "keywords": [