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

Also attempt VDV extraction on raw binary data

Matters for input from barcode scanners for example.
parent e5a80a1e
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "generic/genericpdfextractor_p.h" #include "generic/genericpdfextractor_p.h"
#include "generic/genericpkpassextractor_p.h" #include "generic/genericpkpassextractor_p.h"
#include "generic/genericuic918extractor_p.h" #include "generic/genericuic918extractor_p.h"
#include "generic/genericvdvextractor_p.h"
#include "htmldocument.h" #include "htmldocument.h"
#include "iatabcbpparser.h" #include "iatabcbpparser.h"
#include "jsonlddocument.h" #include "jsonlddocument.h"
...@@ -33,6 +34,7 @@ ...@@ -33,6 +34,7 @@
#include "pdf/pdfdocument.h" #include "pdf/pdfdocument.h"
#include "generic/structureddataextractor_p.h" #include "generic/structureddataextractor_p.h"
#include "uic9183/uic9183parser.h" #include "uic9183/uic9183parser.h"
#include "vdv/vdvticketparser.h"
#include "jsapi/barcode.h" #include "jsapi/barcode.h"
#include "jsapi/context.h" #include "jsapi/context.h"
...@@ -498,6 +500,12 @@ void ExtractorEnginePrivate::extractGeneric() ...@@ -498,6 +500,12 @@ void ExtractorEnginePrivate::extractGeneric()
GenericUic918Extractor::extract(m_data, res, m_context->m_senderDate); GenericUic918Extractor::extract(m_data, res, m_context->m_senderDate);
m_genericResults.emplace_back(GenericExtractor::Result{res, m_data}); m_genericResults.emplace_back(GenericExtractor::Result{res, m_data});
return; return;
} else if (VdvTicketParser::maybeVdvTicket(m_data)) {
const auto res = GenericVdvExtractor::extract(m_data);
if (!res.isEmpty()) {
m_genericResults.emplace_back(GenericExtractor::Result(res, m_data));
}
return;
} }
// try again as text // try again as text
m_text = QString::fromUtf8(m_data); m_text = QString::fromUtf8(m_data);
......
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