diff --git a/parse/hint.js b/parse/hint.js index d0f2cff8..a2e09cd5 100644 --- a/parse/hint.js +++ b/parse/hint.js @@ -76,10 +76,25 @@ const hints = Object.assign(Object.create(null), { // todo: is passing in profile necessary? const parseHint = (profile, h) => { // todo: C - // todo: D code: '', txtN: 'Fire services operating close to the tracks' const text = h.txtN && h.txtN.trim() || '' + if (h.type === 'M') { + return { + type: 'status', + code: h.code || null, + summary: h.txtS && h.txtS.trim() || '', + text + } + } + if (h.type === 'D') { + return { + type: 'status', + code: h.code || null, + text + } + } + // todo: find sth more reliable than this if (h.type === 'P' && text.toLowerCase() === 'journey cancelled') { return { diff --git a/parse/journey-leg.js b/parse/journey-leg.js index cf7928b5..225214d3 100644 --- a/parse/journey-leg.js +++ b/parse/journey-leg.js @@ -26,11 +26,13 @@ const applyRemarks = (leg, hints, warnings, refs) => { } const createParseJourneyLeg = (profile, stations, lines, hints, warnings, polylines) => { + // todo: pt.status // todo: pt.sDays // todo: pt.dep.dProgType, pt.arr.dProgType // todo: what is pt.jny.dirFlg? // todo: how does pt.freq work? // todo: what is pt.himL? + // todo: pt.planrtTS const parseJourneyLeg = (j, pt, passed = true) => { // j = journey, pt = part const dep = profile.parseDateTime(profile, j.date, pt.dep.dTimeR || pt.dep.dTimeS) const arr = profile.parseDateTime(profile, j.date, pt.arr.aTimeR || pt.arr.aTimeS) diff --git a/parse/journey.js b/parse/journey.js index d071013f..fabcf15c 100644 --- a/parse/journey.js +++ b/parse/journey.js @@ -8,6 +8,13 @@ const createParseJourney = (profile, stations, lines, hints, warnings, polylines // todo: c.sDays // todo: c.conSubscr // todo: c.trfRes x vbb-parse-ticket + // todo: c.sotRating, c.isSotCon, c.sotCtxt + // todo: c.showARSLink + // todo: c.useableTime + // todo: c.cksum + // todo: c.isNotRdbl + // todo: c.badSecRefX + // todo: c.bfATS, c.bfIOSTS const parseJourney = (j) => { const legs = j.secL.map(leg => parseLeg(j, leg)) const res = {