KItinerary
scriptextractor.h
31 * - \c filter: An array of filters that are used to select this extractor for a given input file.
37 * - \c text/html: HTML documents, the argument to the script function is a KItinerary::HtmlDocument instance.
38 * - \c application/pdf: PDF documents, the argument to the script function is a KItinerary::PdfDocument instance.
39 * - \c application/vnd.apple.pkpass: Apple Wallet passes, the argument to the script function is a KPkPass::Pass instance.
40 * - \c internal/event: iCalendar events, the argument to the script function is a KCalendarCore::Event instance.
44 * - \c field: The name of the field to match against. This can be a field id in a Apple Wallet pass,
47 * - \c match: A regular expression that is matched against the specified value (see QRegularExpression).
48 * - \c scope: Specifies how the filter should be applied relative to the document node that is being extracted.
49 * One of @c Current, @c Parent, @c Children, @c Ancestors, @c Descendants (@c Current is the default).
56 * "filter": [ { "field": "From", "match": "@swiss.com", "mimeType": "message/rfc822", "scope": "Ancestors" } ],
62 * "filter": [ { "field": "passTypeIdentifier", "match": "pass.booking.swiss.com", "mimeType": "application/vnd.apple.pkpass", "scope": "Current" } ],
84 ExtractorResult extract(const ExtractorDocumentNode &node, const ExtractorEngine *engine) const override;
Abstract base class for data extractors.
Definition abstractextractor.h:20
A node in the extracted document object tree.
Definition extractordocumentnode.h:50
Determines whether an extractor is applicable to a given email.
Definition extractorfilter.h:24
QString scriptFunction() const
The JS function entry point for this extractor, main if empty.
Definition scriptextractor.cpp:129
ExtractorResult extract(const ExtractorDocumentNode &node, const ExtractorEngine *engine) const override
Extract data from node.
Definition scriptextractor.cpp:175
const std::vector< ExtractorFilter > & filters() const
Returns the filters deciding whether this extractor should be applied.
Definition scriptextractor.cpp:144
QString scriptFileName() const
The JS script containing the code of the extractor.
Definition scriptextractor.cpp:119
bool canHandle(const ExtractorDocumentNode &node) const override
Fast check whether this extractor is applicable for node.
Definition scriptextractor.cpp:159
Classes for reservation/travel data models, data extraction and data augmentation.
Definition berelement.h:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:35 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:35 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.