Commit d4a977b8 authored by Volker Krause's avatar Volker Krause
Browse files

Handle all DB language variants for ical events

Also, cover a few more cases such as busses or connections without
platform information.

Being able to generate sample data without booking makes this a lot
easier.
parent 54a0be21
Pipeline #209169 passed with stage
in 4 minutes and 8 seconds
[
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "4 A-C",
"arrivalStation": {
"@type": "TrainStation",
"name": "Köln Hbf"
},
"arrivalTime": {
"@type": "QDateTime",
"@value": "2022-07-26T14:15:00+02:00",
"timezone": "Europe/Berlin"
},
"departureDay": "2022-07-26",
"departurePlatform": "3",
"departureStation": {
"@type": "TrainStation",
"name": "Bruxelles Midi"
},
"departureTime": {
"@type": "QDateTime",
"@value": "2022-07-26T12:25:00+02:00",
"timezone": "Europe/Berlin"
},
"trainName": "ICE 315"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
]
BEGIN:VCALENDAR
VERSION:2.0
X-LOTUS-CHARSET:UTF-8
PRODID:http://www.hacon.de
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:20220726131700@hafas
CLASS:PUBLIC
SUMMARY:Koebenhavn H -> Amsterdam Centraal
DTSTART;TZID=Europe/Berlin:20220726T131700
DTEND;TZID=Europe/Berlin:20220727T005200
DTSTAMP:20220726T110000Z
DESCRIPTION:Rejse: Koebenhavn H til Amsterdam Centraal\nDato: 26.07.22\n-\nfra 13:17 Koebenhavn H - Spor 5 (IC 1197)\ntil 18:02 Hamburg Hbf - Spor 6D-E\n\nfra 18:46 Hamburg Hbf - Spor 14 (IC 2307)\ntil 19:41 Bremen Hbf - Spor 8\n\nfra 19:53 Bremen Hbf - Spor 3 (IC 2034)\ntil 21:14 Leer(Ostfriesl) - Spor 4\n\nfra Leer(Ostfriesl) (Gangsti)\ntil Leer(Ostfriesl) ZOB/Bahnhof \n\nfra 21:30 Leer(Ostfriesl) ZOB/Bahnhof (Bus 647)\ntil 22:25 Groningen CS Hoofdstation \n\nfra Groningen CS Hoofdstation (Gangsti)\ntil Groningen \n\nfra 22:49 Groningen - Spor 4b (IC 786)\ntil 00:52 Amsterdam Centraal - Spor 14b\n-\nVarighed: 11:35 \, Omstigninger 4\n\nAlle angivelser uden ansvar. Forbehold mod ændringer i køreplanen. Kontroller venligst kort tid inden rejsen den aktuelle køreplan under: www.bahn.de\n
END:VEVENT
END:VCALENDAR
[
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "6D-E",
"arrivalStation": {
"@type": "TrainStation",
"name": "Hamburg Hbf"
},
"arrivalTime": "2022-07-26T18:02:00",
"departureDay": "2022-07-26",
"departurePlatform": "5",
"departureStation": {
"@type": "TrainStation",
"name": "Koebenhavn H"
},
"departureTime": {
"@type": "QDateTime",
"@value": "2022-07-26T13:17:00+02:00",
"timezone": "Europe/Berlin"
},
"trainName": "IC 1197"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "8",
"arrivalStation": {
"@type": "TrainStation",
"name": "Bremen Hbf"
},
"arrivalTime": "2022-07-26T19:41:00",
"departureDay": "2022-07-26",
"departurePlatform": "14",
"departureStation": {
"@type": "TrainStation",
"name": "Hamburg Hbf"
},
"departureTime": "2022-07-26T18:46:00",
"trainName": "IC 2307"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "4",
"arrivalStation": {
"@type": "TrainStation",
"name": "Leer(Ostfriesl)"
},
"arrivalTime": "2022-07-26T21:14:00",
"departureDay": "2022-07-26",
"departurePlatform": "3",
"departureStation": {
"@type": "TrainStation",
"name": "Bremen Hbf"
},
"departureTime": "2022-07-26T19:53:00",
"trainName": "IC 2034"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "BusReservation",
"reservationFor": {
"@type": "BusTrip",
"arrivalBusStop": {
"@type": "BusStation",
"name": "Groningen CS Hoofdstation"
},
"arrivalTime": "2022-07-26T22:25:00",
"busName": "Bus 647",
"departureBusStop": {
"@type": "BusStation",
"name": "Leer(Ostfriesl) ZOB/Bahnhof"
},
"departureTime": "2022-07-26T21:30:00"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "14b",
"arrivalStation": {
"@type": "TrainStation",
"name": "Amsterdam Centraal"
},
"arrivalTime": {
"@type": "QDateTime",
"@value": "2022-07-27T00:52:00+02:00",
"timezone": "Europe/Berlin"
},
"departureDay": "2022-07-26",
"departurePlatform": "4b",
"departureStation": {
"@type": "TrainStation",
"name": "Groningen"
},
"departureTime": "2022-07-26T22:49:00",
"trainName": "IC 786"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
]
BEGIN:VCALENDAR
VERSION:2.0
X-LOTUS-CHARSET:UTF-8
PRODID:http://www.hacon.de
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:20220726124600@hafas
CLASS:PUBLIC
SUMMARY:Hamburg Hbf -> Dortmund Hbf
DTSTART;TZID=Europe/Berlin:20220726T124600
DTEND;TZID=Europe/Berlin:20220726T160500
DTSTAMP:20220726T105700Z
DESCRIPTION:Viaje: Hamburg Hbf hacia Dortmund Hbf\nFecha: 26.07.22\n-\nde 12:46 Hamburg Hbf - Vía 14 (IC 2311)\na 15:00 Münster(Westf)Hbf - Vía 9\n\nde 15:10 Münster(Westf)Hbf - Vía 3 (RB 90027)\na 15:37 Hamm(Westf)Hbf - Vía 4\n\nde 15:44 Hamm(Westf)Hbf - Vía 10 (RE 89726)\na 16:05 Dortmund Hbf - Vía 18\n-\nDuración: 3:19 \, Operaciones de transbordo 2\n\nTodos los datos sin garantía. Queda reservado el derecho a modificaciones en el horario de trenes. Compruebe poco antes del viaje el horario de trenes actual en www.bahn.de\n
END:VEVENT
END:VCALENDAR
[
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "9",
"arrivalStation": {
"@type": "TrainStation",
"name": "Münster(Westf)Hbf"
},
"arrivalTime": "2022-07-26T15:00:00",
"departureDay": "2022-07-26",
"departurePlatform": "14",
"departureStation": {
"@type": "TrainStation",
"name": "Hamburg Hbf"
},
"departureTime": {
"@type": "QDateTime",
"@value": "2022-07-26T12:46:00+02:00",
"timezone": "Europe/Berlin"
},
"trainName": "IC 2311"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "4",
"arrivalStation": {
"@type": "TrainStation",
"name": "Hamm(Westf)Hbf"
},
"arrivalTime": "2022-07-26T15:37:00",
"departureDay": "2022-07-26",
"departurePlatform": "3",
"departureStation": {
"@type": "TrainStation",
"name": "Münster(Westf)Hbf"
},
"departureTime": "2022-07-26T15:10:00",
"trainName": "RB 90027"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "18",
"arrivalStation": {
"@type": "TrainStation",
"name": "Dortmund Hbf"
},
"arrivalTime": {
"@type": "QDateTime",
"@value": "2022-07-26T16:05:00+02:00",
"timezone": "Europe/Berlin"
},
"departureDay": "2022-07-26",
"departurePlatform": "10",
"departureStation": {
"@type": "TrainStation",
"name": "Hamm(Westf)Hbf"
},
"departureTime": "2022-07-26T15:44:00",
"trainName": "RE 89726"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
]
BEGIN:VCALENDAR
VERSION:2.0
X-LOTUS-CHARSET:UTF-8
PRODID:http://www.hacon.de
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:20220726115600@hafas
CLASS:PUBLIC
SUMMARY:Praha hl.n. -> Wien Hbf
DTSTART;TZID=Europe/Berlin:20220726T115600
DTEND;TZID=Europe/Berlin:20220726T164900
DTSTAMP:20220726T111200Z
DESCRIPTION:Cesta: Praha hl.n. do Wien Hbf\nDatum: 26.07.22\n-\nodj. 11:56 Praha hl.n. (RJ 79)\npøíj. 16:49 Wien Hbf - Kolej 7A-B\n-\nDoba: 4:54 \n\nV¹echny údaje bez záruky. Zmìny jízdního øádu vyhrazeny. Ovìøte prosím krátce pøed cestou aktuální jízdní øád na: www.bahn.de\n
END:VEVENT
END:VCALENDAR
[
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "7A-B",
"arrivalStation": {
"@type": "TrainStation",
"name": "Wien Hbf"
},
"arrivalTime": {
"@type": "QDateTime",
"@value": "2022-07-26T16:49:00+02:00",
"timezone": "Europe/Berlin"
},
"departureDay": "2022-07-26",
"departureStation": {
"@type": "TrainStation",
"name": "Praha hl.n."
},
"departureTime": {
"@type": "QDateTime",
"@value": "2022-07-26T11:56:00+02:00",
"timezone": "Europe/Berlin"
},
"trainName": "RJ 79"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
]
BEGIN:VCALENDAR
VERSION:2.0
X-LOTUS-CHARSET:UTF-8
PRODID:http://www.hacon.de
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:20220726135700@hafas
CLASS:PUBLIC
SUMMARY:Rovereto -> Randa
DTSTART;TZID=Europe/Berlin:20220726T135700
DTEND;TZID=Europe/Berlin:20220726T205200
DTSTAMP:20220726T111800Z
DESCRIPTION:Viaggio: Rovereto a Randa\nData: 26.07.22\n-\nda 13:57 Rovereto (FA 8519)\na 14:40 Verona Porta Nuova \n\nda 15:02 Verona Porta Nuova (FA 9736)\na 16:15 Milano Centrale \n\nda 17:20 Milano Centrale (EC 36)\na 19:14 Brig - binario 1\n\nda Brig (tratto a piedi)\na Brig Bahnhofplatz \n\nda 19:52 Brig Bahnhofplatz - binario 14 (RE 265)\na 20:52 Randa \n-\nDurata: 6:55 \, Cambi 3\n\nTutte le informazioni senza garanzia. Sono possibili eventuali modifiche dell'orario ferroviario. Si prega di ricontrollare l'orario poco prima del viaggio sotto il link: www.bahn.de\n
END:VEVENT
END:VCALENDAR
[
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalStation": {
"@type": "TrainStation",
"name": "Verona Porta Nuova"
},
"arrivalTime": "2022-07-26T14:40:00",
"departureDay": "2022-07-26",
"departureStation": {
"@type": "TrainStation",
"name": "Rovereto"
},
"departureTime": {
"@type": "QDateTime",
"@value": "2022-07-26T13:57:00+02:00",
"timezone": "Europe/Berlin"
},
"trainName": "FA 8519"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalStation": {
"@type": "TrainStation",
"name": "Milano Centrale"
},
"arrivalTime": "2022-07-26T16:15:00",
"departureDay": "2022-07-26",
"departureStation": {
"@type": "TrainStation",
"name": "Verona Porta Nuova"
},
"departureTime": "2022-07-26T15:02:00",
"trainName": "FA 9736"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "1",
"arrivalStation": {
"@type": "TrainStation",
"name": "Brig"
},
"arrivalTime": "2022-07-26T19:14:00",
"departureDay": "2022-07-26",
"departureStation": {
"@type": "TrainStation",
"name": "Milano Centrale"
},
"departureTime": "2022-07-26T17:20:00",
"trainName": "EC 36"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalStation": {
"@type": "TrainStation",
"name": "Randa"
},
"arrivalTime": {
"@type": "QDateTime",
"@value": "2022-07-26T20:52:00+02:00",
"timezone": "Europe/Berlin"
},
"departureDay": "2022-07-26",
"departurePlatform": "14",
"departureStation": {
"@type": "TrainStation",
"name": "Brig Bahnhofplatz"
},
"departureTime": "2022-07-26T19:52:00",
"trainName": "RE 265"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
]
BEGIN:VCALENDAR
VERSION:2.0
X-LOTUS-CHARSET:UTF-8
PRODID:http://www.hacon.de
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:20220726112100@hafas
CLASS:PUBLIC
SUMMARY:Stockholm Central -> Hannover Hbf
DTSTART;TZID=Europe/Berlin:20220726T112100
DTEND;TZID=Europe/Berlin:20220727T000000
DTSTAMP:20220726T111500Z
DESCRIPTION:Rejse: Stockholm Central til Hannover Hbf\nDato: 26.07.22\n-\nfra 11:21 Stockholm Central (X2 531)\ntil 15:48 Malmö Central \n\nfra 16:13 Malmö Central (R 1077)\ntil 16:49 Koebenhavn H - Spor 1\n\nfra 17:17 Koebenhavn H - Spor 5 (IC 1199)\ntil 21:58 Hamburg Hbf - Spor 13\n\nfra 22:12 Hamburg Hbf - Spor 14 (ICE 1689)\ntil 00:00 Hannover Hbf - Spor 7\n-\nVarighed: 12:39 \, Omstigninger 3\n\nAlle angivelser uden ansvar. Forbehold mod ændringer i køreplanen. Kontroller venligst kort tid inden rejsen den aktuelle køreplan under: www.bahn.de\n
END:VEVENT
END:VCALENDAR
[
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalStation": {
"@type": "TrainStation",
"name": "Malmö Central"
},
"arrivalTime": "2022-07-26T15:48:00",
"departureDay": "2022-07-26",
"departureStation": {
"@type": "TrainStation",
"name": "Stockholm Central"
},
"departureTime": {
"@type": "QDateTime",
"@value": "2022-07-26T11:21:00+02:00",
"timezone": "Europe/Berlin"
},
"trainName": "X2 531"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "1",
"arrivalStation": {
"@type": "TrainStation",
"name": "Koebenhavn H"
},
"arrivalTime": "2022-07-26T16:49:00",
"departureDay": "2022-07-26",
"departureStation": {
"@type": "TrainStation",
"name": "Malmö Central"
},
"departureTime": "2022-07-26T16:13:00",
"trainName": "R 1077"
},
"reservationStatus": "http://schema.org/ReservationConfirmed"
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationFor": {
"@type": "TrainTrip",
"arrivalPlatform": "13",
"arrivalStation": {