Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
a936bbaa
Commit
a936bbaa
authored
Sep 26, 2021
by
Volker Krause
Browse files
Remove another obsolete extractor script
This is all covered by the generic boarding pass extractor now.
parent
36199bec
Pipeline
#82846
passed with stage
in 17 minutes and 15 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/lib/scripts/americanairlines.js
deleted
100644 → 0
View file @
36199bec
/*
SPDX-FileCopyrightText: 2018 Volker Krause <vkrause@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
function
main
(
pdf
,
node
)
{
var
res
=
[];
for
(
barcode
of
node
.
findChildNodes
({
scope
:
"
Descendants
"
,
mimeType
:
"
internal/iata-bcbp
"
}))
{
if
(
barcode
.
location
==
undefined
)
continue
;
res
.
push
(
parsePage
(
pdf
.
pages
[
barcode
.
location
],
barcode
));
}
return
res
;
}
function
parsePage
(
page
,
node
)
{
var
res
=
node
.
result
[
0
];
var
time
=
page
.
text
.
match
(
/Departing at
\s
+
(\d{1,2}
:
\d{2}[
AP
]
M
)
/
);
if
(
time
)
res
.
reservationFor
.
departureTime
=
JsonLd
.
toDateTime
(
time
[
1
],
"
h:mmA
"
,
"
en
"
)
time
=
page
.
text
.
match
(
/Arriving at:
\s
+
(\d{1,2}
:
\d{2}[
AP
]
M
)
/
);
if
(
time
)
res
.
reservationFor
.
arrivalTime
=
JsonLd
.
toDateTime
(
time
[
1
],
"
h:mmA
"
,
"
en
"
)
return
res
;
}
src/lib/scripts/americanairlines.json
deleted
100644 → 0
View file @
36199bec
{
"mimeType"
:
"application/pdf"
,
"filter"
:
[
{
"field"
:
"From"
,
"match"
:
"americanairlines@aa.com"
,
"mimeType"
:
"message/rfc822"
,
"scope"
:
"Ancestors"
},
{
"field"
:
"operatingCarrierDesignator"
,
"match"
:
"AA"
,
"mimeType"
:
"internal/iata-bcbp"
,
"scope"
:
"Descendants"
}
],
"script"
:
"americanairlines.js"
}
src/lib/scripts/extractors.qrc
View file @
a936bbaa
...
...
@@ -18,8 +18,6 @@
<file>airdo.js</file>
<file>amadeus.json</file>
<file>amadeus.js</file>
<file>americanairlines.json</file>
<file>americanairlines.js</file>
<file>aohostels.json</file>
<file>aohostels.js</file>
<file>availpro.json</file>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment