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

Remove no longer needed extractor script

The generic extractor produces the same result meanwhile.
parent 735f6264
/*
SPDX-FileCopyrightText: 2018 Volker Krause <vkrause@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
function main(pdf, node, triggerNode)
{
var res = triggerNode.result[0];
var page = pdf.pages[triggerNode.location];
var time = page.text.match(/Boarding\s+(\d{1,2}.\d{1,2}.\d{4})[\s.]+?(\d{2}:\d{2})/);
if (time) {
res.reservationFor.boardingTime = JsonLd.toDateTime(time[1] + time[2], "dd.MM.yyyyhh:mm", "en")
res.reservationFor.departureDay = ""; // reset departure day from IATA BCBP, we know better now
}
time = page.text.match(/Arr. terminal\s+(\d{2}:\d{2})\s+(\d{2}:\d{2})/);
if (time) {
res.reservationFor.departureTime = JsonLd.toDateTime(time[1], "hh:mm", "en")
res.reservationFor.arrivalTime = JsonLd.toDateTime(time[2], "hh:mm", "en")
}
return res;
}
{
"mimeType": "application/pdf",
"filter": [
{ "field": "From", "match": "@airbaltic.com", "mimeType": "message/rfc822", "scope": "Ancestors" },
{ "field": "operatingCarrierDesignator", "match": "BT", "mimeType": "internal/iata-bcbp", "scope": "Descendants" }
],
"script": "airbaltic.js"
}
......@@ -12,8 +12,6 @@
<file>aerlingus.js</file>
<file>agoda.json</file>
<file>agoda.js</file>
<file>airbaltic.json</file>
<file>airbaltic.js</file>
<file>aircoach-ie.json</file>
<file>aircoach-ie.js</file>
<file>airdo.json</file>
......
Supports Markdown
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