gtfs-to-html 2.5.6 → 2.5.8
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 +25 -0
- package/lib/formatters.js +28 -15
- package/lib/gtfs-to-html.js +16 -16
- package/lib/log-utils.js +3 -3
- package/lib/utils.js +36 -26
- package/package.json +9 -9
- package/views/default/timetable_horizontal.pug +1 -1
- package/views/default/timetable_vertical.pug +1 -1
- package/www/blog/2021-11-06-CSV-Export.md +1 -1
- package/www/docs/configuration.md +136 -136
- package/www/docs/logging-sql-queries.md +2 -2
- package/www/docs/quick-start.md +41 -38
- package/www/package.json +5 -14
- package/www/yarn.lock +3184 -2497
|
@@ -73,7 +73,7 @@ API along with your API token.
|
|
|
73
73
|
|
|
74
74
|
- Specify a download URL:
|
|
75
75
|
|
|
76
|
-
```
|
|
76
|
+
```json
|
|
77
77
|
{
|
|
78
78
|
"agencies": [
|
|
79
79
|
{
|
|
@@ -86,7 +86,7 @@ API along with your API token.
|
|
|
86
86
|
|
|
87
87
|
- Specify a path to a zipped GTFS file:
|
|
88
88
|
|
|
89
|
-
```
|
|
89
|
+
```json
|
|
90
90
|
{
|
|
91
91
|
"agencies": [
|
|
92
92
|
{
|
|
@@ -99,7 +99,7 @@ API along with your API token.
|
|
|
99
99
|
|
|
100
100
|
- Specify a path to an unzipped GTFS file:
|
|
101
101
|
|
|
102
|
-
```
|
|
102
|
+
```json
|
|
103
103
|
{
|
|
104
104
|
"agencies": [
|
|
105
105
|
{
|
|
@@ -112,7 +112,7 @@ API along with your API token.
|
|
|
112
112
|
|
|
113
113
|
- Exclude files - if you don't want all GTFS files to be imported, you can specify an array of files to exclude.
|
|
114
114
|
|
|
115
|
-
```
|
|
115
|
+
```json
|
|
116
116
|
{
|
|
117
117
|
"agencies": [
|
|
118
118
|
{
|
|
@@ -129,7 +129,7 @@ API along with your API token.
|
|
|
129
129
|
|
|
130
130
|
- Optionally specify a proj4 projection string to correct poorly formed coordinates in the GTFS file
|
|
131
131
|
|
|
132
|
-
```
|
|
132
|
+
```json
|
|
133
133
|
{
|
|
134
134
|
"agencies": [
|
|
135
135
|
{
|
|
@@ -143,7 +143,7 @@ API along with your API token.
|
|
|
143
143
|
|
|
144
144
|
- Specify multiple agencies to be imported. Note that it is often better to have one configuration file per agency and call gtfs-to-html multiple times rather than have two different agencies in the same config file. If agencies have conflicting ids for routes, stops, calendars or more, GTFS-to-HTML will fail.
|
|
145
145
|
|
|
146
|
-
```
|
|
146
|
+
```json
|
|
147
147
|
{
|
|
148
148
|
"agencies": [
|
|
149
149
|
{
|
|
@@ -160,103 +160,103 @@ API along with your API token.
|
|
|
160
160
|
|
|
161
161
|
### allowEmptyTimetables
|
|
162
162
|
|
|
163
|
-
{Boolean} Whether or not to generate empty timetables that have no trips. Defaults to `false`.
|
|
163
|
+
\{Boolean\} Whether or not to generate empty timetables that have no trips. Defaults to `false`.
|
|
164
164
|
|
|
165
|
-
```
|
|
166
|
-
|
|
165
|
+
```json
|
|
166
|
+
"allowEmptyTimetables": false
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
### beautify
|
|
170
170
|
|
|
171
|
-
{Boolean} Whether or not to beautify the HTML output. Defaults to `false`.
|
|
171
|
+
\{Boolean\} Whether or not to beautify the HTML output. Defaults to `false`.
|
|
172
172
|
|
|
173
|
-
```
|
|
174
|
-
|
|
173
|
+
```json
|
|
174
|
+
"beautify": false
|
|
175
175
|
```
|
|
176
176
|
|
|
177
177
|
### coordinatePrecision
|
|
178
178
|
|
|
179
|
-
{Integer} The number of decimal places to include in the latitude and longitude of coordinates in GeoJSON used in maps. Omit to avoid any rounding. `5` is a reasonable value (about 1.1 meters).
|
|
179
|
+
\{Integer\} The number of decimal places to include in the latitude and longitude of coordinates in GeoJSON used in maps. Omit to avoid any rounding. `5` is a reasonable value (about 1.1 meters).
|
|
180
180
|
|
|
181
|
-
```
|
|
182
|
-
|
|
181
|
+
```json
|
|
182
|
+
"coordinatePrecision": 5
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
### dateFormat
|
|
186
186
|
|
|
187
|
-
{String} A string defining date format using moment.js tokens. [See full list of formatting options](https://momentjs.com/docs/#/displaying/format/). Defaults to `MMM D. YYYY` which yields "Apr 5, 2022".
|
|
187
|
+
\{String\} A string defining date format using moment.js tokens. [See full list of formatting options](https://momentjs.com/docs/#/displaying/format/). Defaults to `MMM D. YYYY` which yields "Apr 5, 2022".
|
|
188
188
|
|
|
189
|
-
```
|
|
190
|
-
|
|
189
|
+
```json
|
|
190
|
+
"dateFormat": "MMM D, YYYY"
|
|
191
191
|
```
|
|
192
192
|
|
|
193
193
|
### daysShortStrings
|
|
194
194
|
|
|
195
|
-
{Array
|
|
195
|
+
\{Array [String]\} An array of strings defining contractions of weekday names. Specify from Monday to Sunday.
|
|
196
196
|
|
|
197
|
-
```
|
|
198
|
-
|
|
197
|
+
```json
|
|
198
|
+
"daysShortStrings": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
|
|
199
199
|
```
|
|
200
200
|
|
|
201
201
|
### daysStrings
|
|
202
202
|
|
|
203
|
-
{Array
|
|
203
|
+
\{Array [String]\} An array of strings defining contractions of weekday names. Specify from Monday to Sunday.
|
|
204
204
|
|
|
205
|
-
```
|
|
206
|
-
|
|
205
|
+
```json
|
|
206
|
+
"daysStrings": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
|
|
207
207
|
```
|
|
208
208
|
|
|
209
209
|
### debug
|
|
210
210
|
|
|
211
|
-
{Boolean} Whether or not to enable loggin of SQL queries and other info. Defaults to false.
|
|
211
|
+
\{Boolean\} Whether or not to enable loggin of SQL queries and other info. Defaults to false.
|
|
212
212
|
|
|
213
|
-
```
|
|
214
|
-
|
|
213
|
+
```json
|
|
214
|
+
"debug": false
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
### defaultOrientation
|
|
218
218
|
|
|
219
|
-
{String} Specifies timetable orientation, when not mentioned in `timetables.txt`. Valid options are `vertical`, `horizontal` or `hourly`. For details, see [`timetables.txt` `orientation` specification](https://gtfstohtml.com/docs/timetables).
|
|
219
|
+
\{String\} Specifies timetable orientation, when not mentioned in `timetables.txt`. Valid options are `vertical`, `horizontal` or `hourly`. For details, see [`timetables.txt` `orientation` specification](https://gtfstohtml.com/docs/timetables).
|
|
220
220
|
|
|
221
|
-
```
|
|
222
|
-
|
|
221
|
+
```json
|
|
222
|
+
"defaultOrientation": "vertical"
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
### effectiveDate
|
|
226
226
|
|
|
227
|
-
{String} This is printed at the top of the timetable.
|
|
227
|
+
\{String\} This is printed at the top of the timetable.
|
|
228
228
|
|
|
229
|
-
```
|
|
230
|
-
|
|
229
|
+
```json
|
|
230
|
+
"effectiveDate": "July 8, 2015"
|
|
231
231
|
```
|
|
232
232
|
|
|
233
233
|
### interpolatedStopSymbol
|
|
234
234
|
|
|
235
|
-
{String} The symbol used to indicate that a timepoint isn't fixed, but just interpolated. Defaults to `•`. To avoid having this symbol used in timetables, set it to `null`.
|
|
235
|
+
\{String\} The symbol used to indicate that a timepoint isn't fixed, but just interpolated. Defaults to `•`. To avoid having this symbol used in timetables, set it to `null`.
|
|
236
236
|
|
|
237
|
-
```
|
|
238
|
-
|
|
237
|
+
```json
|
|
238
|
+
"interpolatedStopSymbol": "•"
|
|
239
239
|
```
|
|
240
240
|
|
|
241
241
|
### interpolatedStopText
|
|
242
242
|
|
|
243
|
-
{String} The text used to describe that a timepoint isn't fixed, but just interpolated. Defaults to `Estimated time of arrival`.
|
|
243
|
+
\{String\} The text used to describe that a timepoint isn't fixed, but just interpolated. Defaults to `Estimated time of arrival`.
|
|
244
244
|
|
|
245
|
-
```
|
|
246
|
-
|
|
245
|
+
```json
|
|
246
|
+
"interpolatedStopText": "Estimated time of arrival"
|
|
247
247
|
```
|
|
248
248
|
|
|
249
249
|
### linkStopUrls
|
|
250
250
|
|
|
251
|
-
{Boolean} Whether or not to hyperlink timetable stop names to the `stop_url` defined in `stops.txt`. If no `stop_url` is defined for a stop, no link will be created. Defaults to `false`.
|
|
251
|
+
\{Boolean\} Whether or not to hyperlink timetable stop names to the `stop_url` defined in `stops.txt`. If no `stop_url` is defined for a stop, no link will be created. Defaults to `false`.
|
|
252
252
|
|
|
253
|
-
```
|
|
254
|
-
|
|
253
|
+
```json
|
|
254
|
+
"linkStopUrls": false
|
|
255
255
|
```
|
|
256
256
|
|
|
257
257
|
### logFunction
|
|
258
258
|
|
|
259
|
-
{Function} If you want to route logs to a custom function, you can pass a function that takes a single `text` argument as `logFunction`. This can't be used when running GTFS-to-HTML as a command-line utility, only when included as part of a node.js app and passed in a config object to `gtfsToHtml()`. For example:
|
|
259
|
+
\{Function\} If you want to route logs to a custom function, you can pass a function that takes a single `text` argument as `logFunction`. This can't be used when running GTFS-to-HTML as a command-line utility, only when included as part of a node.js app and passed in a config object to `gtfsToHtml()`. For example:
|
|
260
260
|
|
|
261
261
|
```javascript
|
|
262
262
|
import gtfsToHtml from 'gtfs-to-html';
|
|
@@ -280,201 +280,201 @@ gtfsToHtml(config);
|
|
|
280
280
|
|
|
281
281
|
### mapboxAccessToken
|
|
282
282
|
|
|
283
|
-
{String} The [Mapbox access token](https://www.mapbox.com/help/define-access-token/) for generating a map of the route.
|
|
283
|
+
\{String\} The [Mapbox access token](https://www.mapbox.com/help/define-access-token/) for generating a map of the route.
|
|
284
284
|
|
|
285
|
-
```
|
|
286
|
-
|
|
285
|
+
```json
|
|
286
|
+
"mapboxAccessToken": "pk.eyXaX5F8oCJSYedim3yCnTGsVBfnRjsoXdy4Ej7ZZZydrCn2WMDXha5bPj5.bPj5xsBo8u8N8GJqJh"
|
|
287
287
|
```
|
|
288
288
|
|
|
289
289
|
### menuType
|
|
290
290
|
|
|
291
|
-
{String} The type of menu to use for selecting or navigating to timetables on timetable pages with multiple timetables. Valid choices are `none`, `simple`, `jump` and `radio`. Defaults to `simple`.
|
|
291
|
+
\{String\} The type of menu to use for selecting or navigating to timetables on timetable pages with multiple timetables. Valid choices are `none`, `simple`, `jump` and `radio`. Defaults to `simple`.
|
|
292
292
|
|
|
293
|
-
```
|
|
294
|
-
|
|
293
|
+
```json
|
|
294
|
+
"menuType": "jump"
|
|
295
295
|
```
|
|
296
296
|
|
|
297
297
|
### noDropoffSymbol
|
|
298
298
|
|
|
299
|
-
{String} The symbol used to indicate that no drop off is available at a stop. Defaults to `‡`. To avoid having this symbol used in timetables, set it to `null`.
|
|
299
|
+
\{String\} The symbol used to indicate that no drop off is available at a stop. Defaults to `‡`. To avoid having this symbol used in timetables, set it to `null`.
|
|
300
300
|
|
|
301
|
-
```
|
|
302
|
-
|
|
301
|
+
```json
|
|
302
|
+
"noDropoffSymbol": "‡"
|
|
303
303
|
```
|
|
304
304
|
|
|
305
305
|
### noDropoffText
|
|
306
306
|
|
|
307
|
-
{String} The text used to describe that no drop off is available at a stop. Defaults to `No drop off available`.
|
|
307
|
+
\{String\} The text used to describe that no drop off is available at a stop. Defaults to `No drop off available`.
|
|
308
308
|
|
|
309
|
-
```
|
|
310
|
-
|
|
309
|
+
```json
|
|
310
|
+
"noDropoffText": "No drop off available"
|
|
311
311
|
```
|
|
312
312
|
|
|
313
313
|
### noHead
|
|
314
314
|
|
|
315
|
-
{Boolean} Whether or not to skip the HTML head and footer when generating the HTML. This is useful for creating embeddable HTML without `<html>`, `<head>` or `<body>` tags. Defaults to `false`. Ignored if `outputFormat` is set to `pdf` or `csv`.
|
|
315
|
+
\{Boolean\} Whether or not to skip the HTML head and footer when generating the HTML. This is useful for creating embeddable HTML without `<html>`, `<head>` or `<body>` tags. Defaults to `false`. Ignored if `outputFormat` is set to `pdf` or `csv`.
|
|
316
316
|
|
|
317
|
-
```
|
|
318
|
-
|
|
317
|
+
```json
|
|
318
|
+
"noHead": false
|
|
319
319
|
```
|
|
320
320
|
|
|
321
321
|
### noPickupSymbol
|
|
322
322
|
|
|
323
|
-
{String} The symbol used to indicate that no pickup is available at a stop. Defaults to `**`. To avoid having this symbol used in timetables, set it to `null`.
|
|
323
|
+
\{String\} The symbol used to indicate that no pickup is available at a stop. Defaults to `**`. To avoid having this symbol used in timetables, set it to `null`.
|
|
324
324
|
|
|
325
|
-
```
|
|
326
|
-
|
|
325
|
+
```json
|
|
326
|
+
"noPickupSymbol": "**"
|
|
327
327
|
```
|
|
328
328
|
|
|
329
329
|
### noPickupText
|
|
330
330
|
|
|
331
|
-
{String} The text used to describe that no pickup is available at a stop. Defaults to `No pickup available`.
|
|
331
|
+
\{String\} The text used to describe that no pickup is available at a stop. Defaults to `No pickup available`.
|
|
332
332
|
|
|
333
|
-
```
|
|
334
|
-
|
|
333
|
+
```json
|
|
334
|
+
"noPickupText": "No pickup available"
|
|
335
335
|
```
|
|
336
336
|
|
|
337
337
|
### noServiceSymbol
|
|
338
338
|
|
|
339
|
-
{String} The symbol used when a specific trip does not serve a specified stop. Defaults to `-`. To avoid having this symbol used in timetables, set it to `null`.
|
|
339
|
+
\{String\} The symbol used when a specific trip does not serve a specified stop. Defaults to `-`. To avoid having this symbol used in timetables, set it to `null`.
|
|
340
340
|
|
|
341
|
-
```
|
|
342
|
-
|
|
341
|
+
```json
|
|
342
|
+
"noServiceSymbol": "-"
|
|
343
343
|
```
|
|
344
344
|
|
|
345
345
|
### noServiceText
|
|
346
346
|
|
|
347
|
-
{String} The text used to describe when a specific trip does not serve a specified stop. Defaults to `No service at this stop`.
|
|
347
|
+
\{String\} The text used to describe when a specific trip does not serve a specified stop. Defaults to `No service at this stop`.
|
|
348
348
|
|
|
349
|
-
```
|
|
350
|
-
|
|
349
|
+
```json
|
|
350
|
+
"noServiceText": "No service at this stop"
|
|
351
351
|
```
|
|
352
352
|
|
|
353
353
|
### outputFormat
|
|
354
354
|
|
|
355
|
-
{String} The file format of the timetables generated. Either `html`, `pdf` or `csv`. Defaults to `html`.
|
|
355
|
+
\{String\} The file format of the timetables generated. Either `html`, `pdf` or `csv`. Defaults to `html`.
|
|
356
356
|
|
|
357
|
-
```
|
|
358
|
-
|
|
357
|
+
```json
|
|
358
|
+
"outputFormat": "html"
|
|
359
359
|
```
|
|
360
360
|
|
|
361
361
|
### requestDropoffSymbol
|
|
362
362
|
|
|
363
|
-
{String} The symbol used to indicate that riders must request to be dropped off at a stop. Defaults to `†`. To avoid having this symbol used in timetables, set it to `null`.
|
|
363
|
+
\{String\} The symbol used to indicate that riders must request to be dropped off at a stop. Defaults to `†`. To avoid having this symbol used in timetables, set it to `null`.
|
|
364
364
|
|
|
365
|
-
```
|
|
366
|
-
|
|
365
|
+
```json
|
|
366
|
+
"requestDropoffSymbol": "†"
|
|
367
367
|
```
|
|
368
368
|
|
|
369
369
|
### requestDropoffText
|
|
370
370
|
|
|
371
|
-
{String} The text used to describe that riders must request to be dropped off at a stop. Defaults to `Must request drop off`.
|
|
371
|
+
\{String\} The text used to describe that riders must request to be dropped off at a stop. Defaults to `Must request drop off`.
|
|
372
372
|
|
|
373
|
-
```
|
|
374
|
-
|
|
373
|
+
```json
|
|
374
|
+
"requestDropoffText": "Must request drop off"
|
|
375
375
|
```
|
|
376
376
|
|
|
377
377
|
### requestPickupSymbol
|
|
378
378
|
|
|
379
|
-
{String} The symbol used to indicate that riders must request pickup at a stop. Defaults to `***`. To avoid having this symbol used in timetables, set it to `null`.
|
|
379
|
+
\{String\} The symbol used to indicate that riders must request pickup at a stop. Defaults to `***`. To avoid having this symbol used in timetables, set it to `null`.
|
|
380
380
|
|
|
381
|
-
```
|
|
382
|
-
|
|
381
|
+
```json
|
|
382
|
+
"requestPickupSymbol": "***"
|
|
383
383
|
```
|
|
384
384
|
|
|
385
385
|
### requestPickupText
|
|
386
386
|
|
|
387
|
-
{String} The text used to describe that riders must request pickup at a stop. Defaults to `Request stop - call for pickup`.
|
|
387
|
+
\{String\} The text used to describe that riders must request pickup at a stop. Defaults to `Request stop - call for pickup`.
|
|
388
388
|
|
|
389
|
-
```
|
|
390
|
-
|
|
389
|
+
```json
|
|
390
|
+
"requestPickupText": "Request stop - call for pickup"
|
|
391
391
|
```
|
|
392
392
|
|
|
393
393
|
### serviceNotProvidedOnText
|
|
394
394
|
|
|
395
|
-
{String} The text used to label days where service is not provided. Defaults to `Service not provided on`.
|
|
395
|
+
\{String\} The text used to label days where service is not provided. Defaults to `Service not provided on`.
|
|
396
396
|
|
|
397
|
-
```
|
|
398
|
-
|
|
397
|
+
```json
|
|
398
|
+
"serviceNotProvidedOnText": "Service not provided on"
|
|
399
399
|
```
|
|
400
400
|
|
|
401
401
|
### serviceProvidedOnText
|
|
402
402
|
|
|
403
|
-
{String} The text used to label days where service is provided. Defaults to `Service provided on`.
|
|
403
|
+
\{String\} The text used to label days where service is provided. Defaults to `Service provided on`.
|
|
404
404
|
|
|
405
|
-
```
|
|
406
|
-
|
|
405
|
+
```json
|
|
406
|
+
"serviceProvidedOnText": "Service provided on"
|
|
407
407
|
```
|
|
408
408
|
|
|
409
409
|
### showArrivalOnDifference
|
|
410
410
|
|
|
411
|
-
{Float} Whether or not to show an arrival column/row in the timetable. It means, that if on at least one stop difference (stay on that stop) is **equal or greater** than specified here, the arrival time will be shown. Use `0` to show on each stop or `null` to skip showing an additional column for arrival.
|
|
411
|
+
\{Float\} Whether or not to show an arrival column/row in the timetable. It means, that if on at least one stop difference (stay on that stop) is **equal or greater** than specified here, the arrival time will be shown. Use `0` to show on each stop or `null` to skip showing an additional column for arrival.
|
|
412
412
|
|
|
413
|
-
```
|
|
414
|
-
|
|
413
|
+
```json
|
|
414
|
+
"showArrivalOnDifference": 0.2
|
|
415
415
|
```
|
|
416
416
|
|
|
417
417
|
### showMap
|
|
418
418
|
|
|
419
|
-
{Boolean} Whether or not to show a map of the route on the timetable. Defaults to `false`.
|
|
419
|
+
\{Boolean\} Whether or not to show a map of the route on the timetable. Defaults to `false`.
|
|
420
420
|
|
|
421
421
|
If you'd rather just get all stops and route info as geoJSON, see [gtfs-to-geojson](https://github.com/blinktaginc/gtfs-to-geojson).
|
|
422
422
|
|
|
423
|
-
```
|
|
424
|
-
|
|
423
|
+
```json
|
|
424
|
+
"showMap": false
|
|
425
425
|
```
|
|
426
426
|
|
|
427
427
|
### showOnlyTimepoint
|
|
428
428
|
|
|
429
|
-
{Boolean} Whether or not all stops should be shown, or only stops with a `timepoint` value in [stop_times.txt](https://developers.google.com/transit/gtfs/reference?hl=en#stop_times_fields) that is considered exact (i.e. empty or `1`). Defaults to `false`, all stops shown.
|
|
429
|
+
\{Boolean\} Whether or not all stops should be shown, or only stops with a `timepoint` value in [stop_times.txt](https://developers.google.com/transit/gtfs/reference?hl=en#stop_times_fields) that is considered exact (i.e. empty or `1`). Defaults to `false`, all stops shown.
|
|
430
430
|
|
|
431
|
-
```
|
|
432
|
-
|
|
431
|
+
```json
|
|
432
|
+
"showOnlyTimepoint": false
|
|
433
433
|
```
|
|
434
434
|
|
|
435
435
|
### showRouteTitle
|
|
436
436
|
|
|
437
|
-
{Boolean} Whether or not to show the route title and effective date at the top of the timetable page and the timetable label and notes before each timetable. Defaults to `true`, showing the route title and timetable labels and notes.
|
|
437
|
+
\{Boolean\} Whether or not to show the route title and effective date at the top of the timetable page and the timetable label and notes before each timetable. Defaults to `true`, showing the route title and timetable labels and notes.
|
|
438
438
|
|
|
439
|
-
```
|
|
440
|
-
|
|
439
|
+
```json
|
|
440
|
+
"showRouteTitle": true
|
|
441
441
|
```
|
|
442
442
|
|
|
443
443
|
### showStopCity
|
|
444
444
|
|
|
445
|
-
{Boolean} Whether or not to show the city for each stop. City is determined by the `stop_city` field in the non-standard `stop_attributes.txt`. Only has an effect when the timetable's `orientation` is `horizontal` or `hourly`. Defaults to `false`.
|
|
445
|
+
\{Boolean\} Whether or not to show the city for each stop. City is determined by the `stop_city` field in the non-standard `stop_attributes.txt`. Only has an effect when the timetable's `orientation` is `horizontal` or `hourly`. Defaults to `false`.
|
|
446
446
|
|
|
447
|
-
```
|
|
448
|
-
|
|
447
|
+
```json
|
|
448
|
+
"showStopCity": false
|
|
449
449
|
```
|
|
450
450
|
|
|
451
451
|
### showStopDescription
|
|
452
452
|
|
|
453
|
-
{Boolean} Whether or not to show a stop description for each stop. Stop description is taken from the `stop_desc` field in`stops.txt`. Defaults to `false`.
|
|
453
|
+
\{Boolean\} Whether or not to show a stop description for each stop. Stop description is taken from the `stop_desc` field in`stops.txt`. Defaults to `false`.
|
|
454
454
|
|
|
455
|
-
```
|
|
456
|
-
|
|
455
|
+
```json
|
|
456
|
+
"showStopDescription": false
|
|
457
457
|
```
|
|
458
458
|
|
|
459
459
|
### showStoptimesForRequestStops
|
|
460
460
|
|
|
461
|
-
{Boolean} Whether or not to show times for stops that require a request for pickup or dropoff. Some agencies prefer to hide the actual stoptimes from stops that require a quest and instead just show the request pickup or dropoff symbols. See [`requestDropoffSymbol`](#requestdropoffsymbol) and [`requestPickupSymbol`](#requestpickupsymbol) for how to customize appearance. Defaults to `true`.
|
|
461
|
+
\{Boolean\} Whether or not to show times for stops that require a request for pickup or dropoff. Some agencies prefer to hide the actual stoptimes from stops that require a quest and instead just show the request pickup or dropoff symbols. See [`requestDropoffSymbol`](#requestdropoffsymbol) and [`requestPickupSymbol`](#requestpickupsymbol) for how to customize appearance. Defaults to `true`.
|
|
462
462
|
|
|
463
|
-
```
|
|
464
|
-
|
|
463
|
+
```json
|
|
464
|
+
"showStoptimesForRequestStops": true
|
|
465
465
|
```
|
|
466
466
|
|
|
467
467
|
### skipImport
|
|
468
468
|
|
|
469
|
-
{Boolean} Whether or not to skip importing from GTFS into SQLite. Useful for re-running the script if the GTFS data has not changed. If you use this option and the GTFS file hasn't been imported or you don't have an `sqlitePath` to a non-in-memory database specified, you'll get an error. Defaults to `false`.
|
|
469
|
+
\{Boolean\} Whether or not to skip importing from GTFS into SQLite. Useful for re-running the script if the GTFS data has not changed. If you use this option and the GTFS file hasn't been imported or you don't have an `sqlitePath` to a non-in-memory database specified, you'll get an error. Defaults to `false`.
|
|
470
470
|
|
|
471
|
-
```
|
|
472
|
-
|
|
471
|
+
```json
|
|
472
|
+
"skipImport": false
|
|
473
473
|
```
|
|
474
474
|
|
|
475
475
|
### sortingAlgorithm
|
|
476
476
|
|
|
477
|
-
{String} Defines trip-sorting algorithm used to determine the order that trips are shown in timetables.
|
|
477
|
+
\{String\} Defines trip-sorting algorithm used to determine the order that trips are shown in timetables.
|
|
478
478
|
|
|
479
479
|
- `common` finds a common stop used by all trips and sorts by stoptimes at that stop. If there is no common stop for all trips, then `beginning` algorithm is used.
|
|
480
480
|
- `beginning` uses the first stoptime of each trip, which can be from different stops if not all trips have the same first stop. If a multiple trips have identical first stoptimes, the trip with the earlier last stoptimes comes first.
|
|
@@ -484,54 +484,54 @@ If you'd rather just get all stops and route info as geoJSON, see [gtfs-to-geojs
|
|
|
484
484
|
|
|
485
485
|
The default trip-sorting algorithm is `common`.
|
|
486
486
|
|
|
487
|
-
```
|
|
488
|
-
|
|
487
|
+
```json
|
|
488
|
+
"sortingAlgorithm": "common"
|
|
489
489
|
```
|
|
490
490
|
|
|
491
491
|
### sqlitePath
|
|
492
492
|
|
|
493
|
-
{String} A path to an SQLite database. Optional, defaults to using an in-memory database with a value of `:memory:`. If you want the data imported to persist, you need to specify a value for `sqlitePath`. Supports tilde as part of the path, like `~/Documents/gtfs`.
|
|
493
|
+
\{String\} A path to an SQLite database. Optional, defaults to using an in-memory database with a value of `:memory:`. If you want the data imported to persist, you need to specify a value for `sqlitePath`. Supports tilde as part of the path, like `~/Documents/gtfs`.
|
|
494
494
|
|
|
495
|
-
```
|
|
496
|
-
|
|
495
|
+
```json
|
|
496
|
+
"sqlitePath": "/tmp/gtfs"
|
|
497
497
|
```
|
|
498
498
|
|
|
499
499
|
### templatePath
|
|
500
500
|
|
|
501
|
-
{String} Path to a folder containing (pug)[https://pugjs.org/] template for rendering timetables. This is optional. Defaults to using the templates provided in `views/default`. All files within the `/views/custom` folder will be .gitignored, so you can copy the `views/default` folder to `views/custom/myagency` and make any modifications needed. Any custom views folder should contain pug templates called `timetablepage.pug`, `timetablepage_full.pug`, `overview.pug`, and `overview_full.pug`.
|
|
501
|
+
\{String\} Path to a folder containing (pug)[https://pugjs.org/] template for rendering timetables. This is optional. Defaults to using the templates provided in `views/default`. All files within the `/views/custom` folder will be .gitignored, so you can copy the `views/default` folder to `views/custom/myagency` and make any modifications needed. Any custom views folder should contain pug templates called `timetablepage.pug`, `timetablepage_full.pug`, `overview.pug`, and `overview_full.pug`.
|
|
502
502
|
|
|
503
|
-
```
|
|
504
|
-
|
|
503
|
+
```json
|
|
504
|
+
"templatePath": "views/custom/my-agency/"
|
|
505
505
|
```
|
|
506
506
|
|
|
507
507
|
### timeFormat
|
|
508
508
|
|
|
509
|
-
{String} A string defining time format using moment.js tokens. [See full list of formatting options](https://momentjs.com/docs/#/displaying/format/). Defaults to `h:mma` which yields "8:36pm".
|
|
509
|
+
\{String\} A string defining time format using moment.js tokens. [See full list of formatting options](https://momentjs.com/docs/#/displaying/format/). Defaults to `h:mma` which yields "8:36pm".
|
|
510
510
|
|
|
511
|
-
```
|
|
512
|
-
|
|
511
|
+
```json
|
|
512
|
+
"timeFormat": "h:mma"
|
|
513
513
|
```
|
|
514
514
|
|
|
515
515
|
### useParentStation
|
|
516
516
|
|
|
517
|
-
{Boolean} Whether or not to use the `parent_station` of a stop, if specified instead of the platform or boarding area. Useful if different trips for the same route have different platforms that you want to show up in the timetable as separate stops. Defaults to `true`.
|
|
517
|
+
\{Boolean\} Whether or not to use the `parent_station` of a stop, if specified instead of the platform or boarding area. Useful if different trips for the same route have different platforms that you want to show up in the timetable as separate stops. Defaults to `true`.
|
|
518
518
|
|
|
519
|
-
```
|
|
520
|
-
|
|
519
|
+
```json
|
|
520
|
+
"useParentStation": true
|
|
521
521
|
```
|
|
522
522
|
|
|
523
523
|
### verbose
|
|
524
524
|
|
|
525
|
-
{Boolean} If you don't want the import script to print any output to the console, you can set `verbose` to `false`. Defaults to `true`.
|
|
525
|
+
\{Boolean\} If you don't want the import script to print any output to the console, you can set `verbose` to `false`. Defaults to `true`.
|
|
526
526
|
|
|
527
|
-
```
|
|
528
|
-
|
|
527
|
+
```json
|
|
528
|
+
"verbose": false
|
|
529
529
|
```
|
|
530
530
|
|
|
531
531
|
### zipOutput
|
|
532
532
|
|
|
533
|
-
{Boolean} Whether or not to zip the output into one zip file named `timetables.zip`. Defaults to `false`.
|
|
533
|
+
\{Boolean\} Whether or not to zip the output into one zip file named `timetables.zip`. Defaults to `false`.
|
|
534
534
|
|
|
535
|
-
```
|
|
536
|
-
|
|
535
|
+
```json
|
|
536
|
+
"zipOutput": false
|
|
537
537
|
```
|