update validate-fptf 🐛, expose movement trip, add more todos

This commit is contained in:
Jannis R 2017-12-16 02:28:09 +01:00
parent 09fc50f5b3
commit b0157c75d5
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
3 changed files with 3 additions and 1 deletions

View file

@ -46,7 +46,7 @@
"tap-spec": "^4.1.1", "tap-spec": "^4.1.1",
"tape": "^4.8.0", "tape": "^4.8.0",
"tape-promise": "^2.0.1", "tape-promise": "^2.0.1",
"validate-fptf": "^1.0.1", "validate-fptf": "^1.0.2",
"vbb-parse-line": "^0.2.5", "vbb-parse-line": "^0.2.5",
"vbb-stations-autocomplete": "^2.9.0" "vbb-stations-autocomplete": "^2.9.0"
}, },

View file

@ -21,6 +21,7 @@ const createParseDeparture = (profile, stations, lines, remarks) => {
remarks: d.remL ? d.remL.map(findRemark) : [], remarks: d.remL ? d.remL.map(findRemark) : [],
trip: +d.jid.split('|')[1] // todo: this seems brittle trip: +d.jid.split('|')[1] // todo: this seems brittle
} }
// todo: res.trip from rawLine.prodCtx.num
if (d.stbStop.dTimeR && d.stbStop.dTimeS) { if (d.stbStop.dTimeR && d.stbStop.dTimeS) {
const realtime = profile.parseDateTime(profile, d.date, d.stbStop.dTimeR) const realtime = profile.parseDateTime(profile, d.date, d.stbStop.dTimeR)

View file

@ -26,6 +26,7 @@ const createParseMovement = (profile, locations, lines, remarks) => {
const res = { const res = {
direction: profile.parseStationName(m.dirTxt), direction: profile.parseStationName(m.dirTxt),
trip: m.jid && +m.jid.split('|')[1] || null, // todo: this seems brittle
line: lines[m.prodX] || null, line: lines[m.prodX] || null,
location: m.pos ? { location: m.pos ? {
type: 'location', type: 'location',