mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
35 lines
772 B
JavaScript
35 lines
772 B
JavaScript
'use strict'
|
|
|
|
const {parseHook} = require('../../lib/profile-hooks')
|
|
|
|
const parseLocation = require('../../parse/location')
|
|
const baseProfile = require('./base.json')
|
|
const products = require('./products')
|
|
|
|
const trimStopName = ({parsed}, l) => {
|
|
if (parsed.type === 'stop' || parsed.type === 'station' && parsed.name) {
|
|
parsed.name = parsed.name.replace(/(^-|-$)/g, '')
|
|
}
|
|
return parsed
|
|
}
|
|
|
|
const pkpProfile = {
|
|
...baseProfile,
|
|
locale: 'pl-PL',
|
|
timezone: 'Europe/Warsaw',
|
|
|
|
products,
|
|
|
|
parseLocation: parseHook(parseLocation, trimStopName),
|
|
|
|
trip: true,
|
|
radar: true,
|
|
refreshJourney: false,
|
|
reachableFrom: true,
|
|
remarks: false, // seems like ver >= 1.20 is required
|
|
|
|
departuresGetPasslist: false,
|
|
departuresStbFltrEquiv: false,
|
|
}
|
|
|
|
module.exports = pkpProfile
|