2020-03-11 20:00:54 +01:00
|
|
|
'use strict'
|
|
|
|
|
2020-03-18 21:43:19 +01:00
|
|
|
const {parseHook} = require('../../lib/profile-hooks')
|
|
|
|
|
|
|
|
const parseLocation = require('../../parse/location')
|
2021-04-18 19:02:54 +02:00
|
|
|
const baseProfile = require('./base.json')
|
2020-03-11 20:00:54 +01:00
|
|
|
const products = require('./products')
|
|
|
|
|
2020-03-18 21:43:19 +01:00
|
|
|
const trimStopName = ({parsed}, l) => {
|
|
|
|
if (parsed.type === 'stop' || parsed.type === 'station' && parsed.name) {
|
|
|
|
parsed.name = parsed.name.replace(/(^-|-$)/g, '')
|
|
|
|
}
|
|
|
|
return parsed
|
|
|
|
}
|
|
|
|
|
2020-03-11 20:00:54 +01:00
|
|
|
const pkpProfile = {
|
2021-04-18 19:02:54 +02:00
|
|
|
...baseProfile,
|
2020-03-11 20:00:54 +01:00
|
|
|
locale: 'pl-PL',
|
|
|
|
timezone: 'Europe/Warsaw',
|
|
|
|
|
|
|
|
products,
|
|
|
|
|
2020-03-18 21:43:19 +01:00
|
|
|
parseLocation: parseHook(parseLocation, trimStopName),
|
|
|
|
|
2020-03-11 20:00:54 +01:00
|
|
|
trip: true,
|
|
|
|
radar: true,
|
|
|
|
refreshJourney: false,
|
2020-09-16 17:21:59 +02:00
|
|
|
reachableFrom: true,
|
|
|
|
remarks: false, // seems like ver >= 1.20 is required
|
2020-03-11 20:00:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = pkpProfile
|