Commit graph

223 commits

Author SHA1 Message Date
Jannis R
0f284e09b8
parseCommon: resolve **.msgL[] before **.locX 2021-01-26 21:15:19 +01:00
Jannis R
4efff792ef
parseJourney: use j.recon.ctx as refreshToken too 🐛
see also d017e62
see also #164
2021-01-19 15:14:39 +01:00
Jannis R
17e08acfbb parseJourneyLeg parseAlternative: handle missing stopL[] 🐛, add tests 2020-12-26 21:54:04 +01:00
Jannis R
7685d5afeb parseTrip: handle missing date 🐛 2020-11-28 11:25:43 +01:00
Jannis R
40ca838258 parseWarning: parse more fields
closes #178
2020-11-28 11:25:43 +01:00
Jannis R
66ff661767
parseJourneyLeg applyRemarks: handle legs without stopovers 🐛 2020-11-15 14:43:47 +01:00
Jannis R
92fb29d687 parseTrip: handle stopL[] items without idx 🐛 2020-10-06 22:22:30 +02:00
Jannis R
25fb25c18d parseLeg: use remarks without fIdx/tIdx 🐛 2020-09-15 11:36:24 +02:00
Jannis R
a621fd6df4
minor tweaks 2020-09-10 23:57:03 +02:00
Leo Maroni
2612494970
fix platform parsing with some profiles 🐛
closes #187
2020-08-01 18:26:30 +02:00
Jannis R
f9bfd6918a
parseJourneyLeg: parse jny.poly 🐛
fixes #186
2020-07-26 13:37:54 +02:00
Jannis R
6b275171b1 parseMovement: skip invalid stopL[] items 🐛 2020-06-15 15:39:09 +02:00
Jannis R
de896b1e96
parseCommon: respect opt.polyline 🐛
closes #181
2020-06-11 16:12:48 +02:00
Jannis R
dce42bfa31
move trip parsing into parse/trip 2020-06-11 15:34:20 +02:00
Julius Tens
3ca4a0c2b2 add provenance field on arrivals 2020-06-09 18:02:33 +02:00
Jannis R
542aa8caef parse DEVI journey legs 2020-05-31 12:38:07 +02:00
Jannis R
240df85bf6
parseLocation: parse parent station 2020-05-21 17:51:25 +02:00
Jannis R
d92eb154c2
parseLocation: give type: station to stops with stopLocL[] 2020-05-21 17:51:25 +02:00
Jannis R
1abafb5bd4
parseLocation: prevent endless recursive loops 2020-05-21 17:51:25 +02:00
Jannis R
76e310218a
parseLocation: parse entrances & sub-stops lists 2020-05-21 17:51:25 +02:00
Jannis R
d98910a651
parseCommon: parse hints before locations 2020-05-21 17:51:25 +02:00
Lukas Siemon
1b0133190f
object-scan@13 (improved performance)
closes #173
2020-04-09 01:00:45 +02:00
Jannis R
0dceb414af
parseJourneyLeg: parse isRchbl correctly 🐛 2020-03-18 21:45:36 +01:00
Jannis R
2cb6a0c32b
parseIcon, parseHint, parseLocation: handle more edge cases 🐛 2020-03-18 21:45:36 +01:00
Jannis R
36a8b388f2
add todos
also remove dead code
2020-03-18 21:45:30 +01:00
Jannis R
8c7f164fa3 parseLine: expose adminCode
The admin code is often helpful to distinguish lines that can't
be distinguished by their `operator.id`. See also #10.
2020-03-08 23:44:40 +01:00
Jannis R
3ea9380218 parseLocation: parse fare zone, transit authority & more foreign stop IDs
closes #131
see also #5, #90
2020-03-08 23:04:04 +01:00
Jannis R
2a241375db parseLocation: parse foreign stop IDs from I hints
`rRefL` seems to be used by older HAFAS endpoints, e.g. `ver: 1.11`.

see also #5, #90, #131
2020-03-08 23:04:04 +01:00
Julius Tens
df010fc24c enable no-irregular-whitespace and no-mixed-spaces-and-tabs rules, fix non-compliant whitespace 2020-02-27 17:10:03 +01:00
Julius Tens
c072a70c57 soothe the linter: remove unused variables 2020-02-27 17:10:03 +01:00
Julius Tens
bc30309056 bugfixes: fix undefined variables 🐛 2020-02-27 17:10:03 +01:00
Lukas Siemon
8cb7d807f2
improve findInTree performance
by passing a list of paths to find in the tree up front

#154

closes #152
2020-02-22 19:13:56 +00:00
Jannis R
db9287f7fd
@mapbox/polyline -> google-polyline 2020-01-31 18:07:16 +01:00
Jannis R
e049aa3d04
parseWarning: fix parseMsgEvent 🐛 2020-01-15 18:17:06 +01:00
Jannis R
fb7a5653e3
parseProductsBitmask via profile, pass ctx into parse fns 💥 2020-01-05 18:10:09 +01:00
Jannis R
29d7bd4299
parseJourney: fix scheduledDays year 🐛 2020-01-05 18:10:09 +01:00
Jannis R
5ea22f7a59
parseHint: parse code & text properly 🐛 2020-01-05 18:10:09 +01:00
Jannis R
9a6bc2df0d
parseWarning: parseDateTime -> profile.parseDateTime 🐛 2020-01-05 18:10:09 +01:00
Jannis R
8b2a5a82f2
parseIcon: use txt & txtS as text fallback 2020-01-05 18:10:09 +01:00
Jannis R
6c5409fbce
extract parseIcon from parseCommon 2020-01-05 18:10:09 +01:00
Jannis R
c2dc8742b6
parseWhen, parsePlatform: let when & platform fall back to plan data
This commit adapts parseWhen & parsePlatform to the latest FPTF v2 draft.

see public-transport/friendly-public-transport-format#63
2020-01-05 17:55:37 +01:00
Jannis R
938a6f22b9
add planned*Platform, scheduled* -> planned/prognosed* 💥 2020-01-05 17:55:27 +01:00
Jannis R
29a2cf36e9
add planned(Arrival|Departure|When), scheduled* -> planned*/prognosed* 💥
when not cancelled:
{when, delay} -> {when, plannedWhen, delay}
{arrival, arrivalDelay} -> {arrival, plannedArrival, arrivalDelay}
{departure, departureDelay} -> {departure, plannedDeparture, departureDelay}

when cancelled:
{when: null, delay: null, scheduledWhen} -> {when: null, plannedWhen, prognosedWhen, delay}
{arrival: null, arrivalDelay: null, scheduledArrival, formerArrivalDelay} -> {arrival: null, plannedArrival, arrivalDelay, prognosedArrival}
{departure: null, departureDelay: null, scheduledDeparture, formerDepartureDelay} -> {departure: null, plannedDeparture, departureDelay, prognosedDeparture}
2020-01-05 17:52:17 +01:00
Jannis R
d724846e91
rename findIdxRefs -> findInTree, remove resolveIdxRefs abstraction 2020-01-05 17:51:27 +01:00
Jannis R
f02fe301c7
parse: refactor applyRemarks 2020-01-05 17:51:27 +01:00
Jannis R
018fc84bf5
parseCommon: parse polylines 2020-01-05 17:51:27 +01:00
Jannis R
6af8f6d5ec
parseCommon: resolve hint & warning references 2020-01-05 17:51:27 +01:00
Jannis R
62cc53ffcf
parseCommon: resolve location references 2020-01-05 17:51:27 +01:00
Jannis R
758deaf2d5
parseCommon: resolve line references 2020-01-05 17:51:27 +01:00
Jannis R
0cc17ee780
parseCommon: resolve icon references 2020-01-05 17:51:27 +01:00