add todos; add @MTRNord as contributor

This commit is contained in:
Jannis R 2021-11-18 18:29:25 +01:00
parent f41b8ac464
commit ca6f75501c
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
7 changed files with 22 additions and 6 deletions

View file

@ -18,7 +18,10 @@ const formatRadarReq = (ctx, north, west, south, east) => {
jnyFltrL: [
profile.formatProductsFilter(ctx, opt.products || {})
],
trainPosMode: 'CALC' // todo: what is this? what about realtime?
// todo: what is this? what about realtime?
// - CALC
// - CALC_REPORT (as seen in the INSA Young app)
trainPosMode: 'CALC',
}
}
}

View file

@ -477,6 +477,7 @@ const createClient = (profile, userAgent, opt = {}) => {
}
const trip = (id, lineName, opt = {}) => {
// todo [breaking]: remove lineName param, not needed anymore
if (!isNonEmptyString(id)) {
throw new TypeError('id must be a non-empty string.')
}

View file

@ -20,7 +20,8 @@
"em0lar <hello@em0lar.de>",
"Adrian Böhme <hannsadrian@gmail.com> (https://github.com/Adwirawien)",
"Yureka <github@yuka.dev>",
"Kristjan Esperanto (https://github.com/KristjanESPERANTO)"
"Kristjan Esperanto (https://github.com/KristjanESPERANTO)",
"Marcel Radzio <mtrnord@nordgedanken.dev>"
],
"homepage": "https://github.com/public-transport/hafas-client/tree/5.21.0",
"repository": "public-transport/hafas-client",

View file

@ -26,6 +26,7 @@ const linkTypesByCode = Object.assign(Object.create(null), {
// todo: https://github.com/public-transport/hafas-client/issues/5
// todo: expose h.type somehow
// todo: https://github.com/KDE/kpublictransport/blob/39ac8f9586b9300fa8a9ba0dec010e96fab9ab08/src/lib/backends/hafasmgateparser.cpp#L56-L72
// todo: h.sty
const parseHint = (ctx, h) => {
// todo: C

View file

@ -42,13 +42,14 @@ const applyRemarks = (leg, refs) => {
}
// todo: pt.status, pt.isPartCncl
// todo: pt.isRchbl, pt.chRatingRT, pt.chgDurR, pt.minChg
// todo: pt.dep.dProgType, pt.arr.dProgType
// todo: pt.chRatingRT, pt.chgDurR, pt.minChg
// todo: what is pt.jny.dirFlg?
// todo: what is pt.recState?
// todo: what is `sty: 'UNDEF'`?
// todo: pt.prodL
// todo: pt.parJnyL (list of coupled trains)
// todo: pt.planrtTS
// todo: what is pt.jny.lPassSt?
const parseJourneyLeg = (ctx, pt, date) => { // pt = raw leg
const {profile, opt} = ctx
@ -68,12 +69,14 @@ const parseJourneyLeg = (ctx, pt, date) => { // pt = raw leg
const dep = profile.parseWhen(ctx, date, pt.dep.dTimeS, pt.dep.dTimeR, pt.dep.dTZOffset, pt.dep.dCncl)
res.departure = dep.when
res.plannedDeparture = dep.plannedWhen
// todo: pt.dep.dProgType
res.departureDelay = dep.delay
if (dep.prognosedWhen) res.prognosedDeparture = dep.prognosedWhen
const arr = profile.parseWhen(ctx, date, pt.arr.aTimeS, pt.arr.aTimeR, pt.arr.aTZOffset, pt.arr.aCncl)
res.arrival = arr.when
res.plannedArrival = arr.plannedWhen
// todo: pt.arr.aProgType
res.arrivalDelay = arr.delay
if (arr.prognosedWhen) res.prognosedArrival = arr.prognosedWhen
@ -132,6 +135,7 @@ const parseJourneyLeg = (ctx, pt, date) => { // pt = raw leg
if (opt.remarks && Array.isArray(pt.jny.msgL)) {
// todo: apply leg-wide remarks if `opt.stopovers` is false
applyRemarks(res, pt.jny.msgL)
// todo: parse & use `code: EXTERNAL_ID` remarks?
}
// filter stations the train passes without stopping, as this doesn't comply with fptf (yet)

View file

@ -22,15 +22,18 @@ const parseScheduledDays = (sDaysB, year, profile) => {
return res
}
// todo: c.conSubscr
// todo: c.conSubscr (e.g. `F`)
// 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.cksum (e.g. `b3a94228_3`), c.cksumDti (e.g. `c2717eb3_3`)
// todo: c.isNotRdbl
// todo: c.badSecRefX
// todo: c.bfATS, c.bfIOSTS
// todo: c.recState (e.g. `U`)
// todo: c.intvlSubscr (e.g. `F`)
const parseJourney = (ctx, j) => { // j = raw jouney
const {profile, opt} = ctx

View file

@ -13,6 +13,9 @@ const leadingZeros = /^0+/
// - `6733` for 8013074 with p/vmt
// - `3933` for 8012092 with p/vmt
// - `2062` for 8010168 with p/vmt
// todo: l.gidL (e.g. `["A×de:15088:8013414"]`)
// todo: `i` param in `lid` (e.g. `A=1@O=Zöberitz@X=12033455@Y=51504612@U=80@L=8013414@i=A×de:15088:8013414@`)
const parseLocation = (ctx, l) => {
const {profile, opt} = ctx