|Extractor (const Extractor &)|
|Extractor (Extractor &&) noexcept|
|const std::vector< ExtractorFilter > &||filters () const|
|QString||name () const|
|Extractor &||operator= (const Extractor &)|
|Extractor &||operator= (Extractor &&)|
|QString||scriptFileName () const|
|QString||scriptFunction () const|
|ExtractorInput::Type||type () const|
A single unstructured data extraction rule set.
These rules are loaded from JSON meta-data files in a compiled-in qrc file, or from $XDG_DATA_DIRS/kitinerary/extractors.
The meta-data files either contain a single JSON object or an array of JSON objects with the following content:
type:The type of the extractor,
textif not specified.
filter:An array of filters that are used to select this extractor for a given input file.
function:The entry point in the above mentioned script,
mainif not specified.
The following extractor types are supported (see also ExtractorInput::Type):
Text:plain text, the argument to the script function is a single string.
Html:HTML documents, the argument to the script function is a HtmlDocument instance.
Pdf:PDF documents, the argument to the script function is a PdfDocument instance.
PkPass:Apple Wallet passes, the argument to the script function is a KPkPass::BoardingPass instance.
ICal:iCalendar events, the argument to the script function is a KCalendarCore::Event instance.
Filter definitions have the following field:
type:The type of data this filter applies to, one of:
Text. Can often be omitted as it's auto-detected based on the following fields.
header:A MIME message header name (valid and mandatory for type
field:A field id in a Apple Wallet pass (valid and mandatory for type
property:A property on a Json-LD object (valid and mandatory for type
match:A regular expression that is matched against the specified value (see QRegularExpression).
For development it's convenient to symlink the extractors source folder to $XDG_DATA_DIRS/kitinerary/extractors, so you can re-run a changed extractor script without recompiling or restarting the application.
Member Function Documentation
|const std::vector< ExtractorFilter > & Extractor::filters||(||)||const|
The documentation for this class was generated from the following files: