Commit 55d15b27 authored by Volker Krause's avatar Volker Krause
Browse files

Add gomus.de extractor script

parent 2256ddc6
Pipeline #89004 passed with stage
in 10 minutes and 23 seconds
......@@ -58,6 +58,8 @@
<file>feratel-card.js</file>
<file>flixbus.json</file>
<file>flixbus.js</file>
<file>gomus.json</file>
<file>gomus.js</file>
<file>hertz.js</file>
<file>hertz.json</file>
<file>hotels.com.json</file>
......
/*
SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
function parsePass(pass, node) {
var event = node.result[0];
event.reservationFor.name = pass.field['event-name'].value;
event.reservationFor.location.name = pass.field['location'].value;
event.reservationFor.location.address = JsonLd.newObject('PostalAddress');
event.reservationFor.location.address.streetAddress = pass.locations[0].relevantText.match(/ in (.*)\.$/)[1];
event.reservedTicket.name = pass.description;
return event;
}
{
"filter": [
{
"field": "passTypeIdentifier",
"match": "pass.de.gomus",
"mimeType": "application/vnd.apple.pkpass",
"scope": "Current"
}
],
"function": "parsePass",
"mimeType": "application/vnd.apple.pkpass",
"script": "gomus.js"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment