1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/QtClient/evernote-import/xmltomd.h
2016-12-22 22:35:35 +01:00

39 lines
751 B
C++
Executable File

#ifndef XMLTOMD_H
#define XMLTOMD_H
#include <QXmlStreamReader>
#include <QStringList>
#include <QMap>
namespace xmltomd {
struct Resource {
QString id;
QString mime;
QString filename;
QString alt;
QByteArray data;
time_t timestamp;
Resource() : timestamp(0) {}
};
const QString BLOCK_OPEN = "<div>";
const QString BLOCK_CLOSE = "</div>";
const QString NEWLINE = "<br/>";
const QString NEWLINE_MERGED = "<merged/>";
const QString SPACE = "<space/>";
struct ParsingState {
std::vector<std::pair<QString, int>> lists;
bool inCode;
std::vector<Resource> resources;
std::vector<Resource> attachments;
};
QString evernoteXmlToMd(const QString &content, std::vector<Resource> resources);
}
#endif // XMLTOMD_H