mirror of https://github.com/procxx/kepka.git
Improve export folder structure.
This commit is contained in:
parent
a200771868
commit
ef5a395c60
|
@ -685,7 +685,7 @@ Result HtmlWriter::writeUserpicsStart(const Data::UserpicsInfo &data) {
|
||||||
if (!_userpicsCount) {
|
if (!_userpicsCount) {
|
||||||
return Result::Success();
|
return Result::Success();
|
||||||
}
|
}
|
||||||
const auto filename = "profile_pictures.html";
|
const auto filename = "lists/profile_pictures.html";
|
||||||
_userpics = fileWithRelativePath(filename);
|
_userpics = fileWithRelativePath(filename);
|
||||||
|
|
||||||
const auto serialized = SerializeLink(
|
const auto serialized = SerializeLink(
|
||||||
|
@ -761,7 +761,7 @@ Result HtmlWriter::writeSavedContacts(const Data::ContactsList &data) {
|
||||||
return Result::Success();
|
return Result::Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto filename = "contacts.html";
|
const auto filename = "lists/contacts.html";
|
||||||
const auto file = fileWithRelativePath(filename);
|
const auto file = fileWithRelativePath(filename);
|
||||||
auto list = std::vector<QByteArray>();
|
auto list = std::vector<QByteArray>();
|
||||||
list.reserve(data.list.size());
|
list.reserve(data.list.size());
|
||||||
|
@ -814,7 +814,7 @@ Result HtmlWriter::writeFrequentContacts(const Data::ContactsList &data) {
|
||||||
return Result::Success();
|
return Result::Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto filename = "frequent.html";
|
const auto filename = "lists/frequent.html";
|
||||||
const auto file = fileWithRelativePath(filename);
|
const auto file = fileWithRelativePath(filename);
|
||||||
auto list = std::vector<QByteArray>();
|
auto list = std::vector<QByteArray>();
|
||||||
list.reserve(size);
|
list.reserve(size);
|
||||||
|
@ -913,7 +913,7 @@ Result HtmlWriter::writeSessions(const Data::SessionsList &data) {
|
||||||
return Result::Success();
|
return Result::Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto filename = "sessions.html";
|
const auto filename = "lists/sessions.html";
|
||||||
const auto file = fileWithRelativePath(filename);
|
const auto file = fileWithRelativePath(filename);
|
||||||
auto list = std::vector<QByteArray>();
|
auto list = std::vector<QByteArray>();
|
||||||
list.reserve(data.list.size());
|
list.reserve(data.list.size());
|
||||||
|
@ -968,7 +968,7 @@ Result HtmlWriter::writeWebSessions(const Data::SessionsList &data) {
|
||||||
return Result::Success();
|
return Result::Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto filename = "web_sessions.html";
|
const auto filename = "lists/web_sessions.html";
|
||||||
const auto file = fileWithRelativePath(filename);
|
const auto file = fileWithRelativePath(filename);
|
||||||
auto list = std::vector<QByteArray>();
|
auto list = std::vector<QByteArray>();
|
||||||
list.reserve(data.webList.size());
|
list.reserve(data.webList.size());
|
||||||
|
@ -1024,7 +1024,7 @@ Result HtmlWriter::writeDialogsStart(const Data::DialogsInfo &data) {
|
||||||
data,
|
data,
|
||||||
"Chats",
|
"Chats",
|
||||||
Data::AboutChats(),
|
Data::AboutChats(),
|
||||||
"chats.html");
|
"lists/chats.html");
|
||||||
}
|
}
|
||||||
|
|
||||||
Result HtmlWriter::writeDialogStart(const Data::DialogInfo &data) {
|
Result HtmlWriter::writeDialogStart(const Data::DialogInfo &data) {
|
||||||
|
@ -1048,7 +1048,7 @@ Result HtmlWriter::writeLeftChannelsStart(const Data::DialogsInfo &data) {
|
||||||
data,
|
data,
|
||||||
"Left chats",
|
"Left chats",
|
||||||
Data::AboutLeftChats(),
|
Data::AboutLeftChats(),
|
||||||
"left_chats.html");
|
"lists/left_chats.html");
|
||||||
}
|
}
|
||||||
|
|
||||||
Result HtmlWriter::writeLeftChannelStart(const Data::DialogInfo &data) {
|
Result HtmlWriter::writeLeftChannelStart(const Data::DialogInfo &data) {
|
||||||
|
@ -1220,7 +1220,7 @@ QString HtmlWriter::mainFilePath() {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString HtmlWriter::mainFileRelativePath() const {
|
QString HtmlWriter::mainFileRelativePath() const {
|
||||||
return "overview.html";
|
return "export_results.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString HtmlWriter::pathWithRelativePath(const QString &path) const {
|
QString HtmlWriter::pathWithRelativePath(const QString &path) const {
|
||||||
|
|
|
@ -475,7 +475,7 @@ Result TextWriter::writeUserpicsStart(const Data::UserpicsInfo &data) {
|
||||||
if (!_userpicsCount) {
|
if (!_userpicsCount) {
|
||||||
return Result::Success();
|
return Result::Success();
|
||||||
}
|
}
|
||||||
const auto filename = "profile_pictures.txt";
|
const auto filename = "lists/profile_pictures.txt";
|
||||||
_userpics = fileWithRelativePath(filename);
|
_userpics = fileWithRelativePath(filename);
|
||||||
|
|
||||||
const auto serialized = "Profile pictures"
|
const auto serialized = "Profile pictures"
|
||||||
|
@ -542,7 +542,8 @@ Result TextWriter::writeSavedContacts(const Data::ContactsList &data) {
|
||||||
return Result::Success();
|
return Result::Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto file = fileWithRelativePath("contacts.txt");
|
const auto filename = "lists/contacts.txt";
|
||||||
|
const auto file = fileWithRelativePath(filename);
|
||||||
auto list = std::vector<QByteArray>();
|
auto list = std::vector<QByteArray>();
|
||||||
list.reserve(data.list.size());
|
list.reserve(data.list.size());
|
||||||
for (const auto index : Data::SortedContactsIndices(data)) {
|
for (const auto index : Data::SortedContactsIndices(data)) {
|
||||||
|
@ -572,7 +573,7 @@ Result TextWriter::writeSavedContacts(const Data::ContactsList &data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto header = "Contacts "
|
const auto header = "Contacts "
|
||||||
"(" + Data::NumberToString(data.list.size()) + ") - contacts.txt"
|
"(" + Data::NumberToString(data.list.size()) + ") - " + filename
|
||||||
+ kLineBreak
|
+ kLineBreak
|
||||||
+ kLineBreak;
|
+ kLineBreak;
|
||||||
return _summary->writeBlock(header);
|
return _summary->writeBlock(header);
|
||||||
|
@ -586,7 +587,8 @@ Result TextWriter::writeFrequentContacts(const Data::ContactsList &data) {
|
||||||
return Result::Success();
|
return Result::Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto file = fileWithRelativePath("frequent.txt");
|
const auto filename = "lists/frequent.txt";
|
||||||
|
const auto file = fileWithRelativePath(filename);
|
||||||
auto list = std::vector<QByteArray>();
|
auto list = std::vector<QByteArray>();
|
||||||
list.reserve(size);
|
list.reserve(size);
|
||||||
const auto writeList = [&](
|
const auto writeList = [&](
|
||||||
|
@ -650,7 +652,7 @@ Result TextWriter::writeFrequentContacts(const Data::ContactsList &data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto header = "Frequent contacts "
|
const auto header = "Frequent contacts "
|
||||||
"(" + Data::NumberToString(size) + ") - frequent.txt"
|
"(" + Data::NumberToString(size) + ") - lists/frequent.txt"
|
||||||
+ kLineBreak
|
+ kLineBreak
|
||||||
+ kLineBreak;
|
+ kLineBreak;
|
||||||
return _summary->writeBlock(header);
|
return _summary->writeBlock(header);
|
||||||
|
@ -674,7 +676,8 @@ Result TextWriter::writeSessions(const Data::SessionsList &data) {
|
||||||
return Result::Success();
|
return Result::Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto file = fileWithRelativePath("sessions.txt");
|
const auto filename = "lists/sessions.txt";
|
||||||
|
const auto file = fileWithRelativePath(filename);
|
||||||
auto list = std::vector<QByteArray>();
|
auto list = std::vector<QByteArray>();
|
||||||
list.reserve(data.list.size());
|
list.reserve(data.list.size());
|
||||||
for (const auto &session : data.list) {
|
for (const auto &session : data.list) {
|
||||||
|
@ -705,7 +708,7 @@ Result TextWriter::writeSessions(const Data::SessionsList &data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto header = "Sessions "
|
const auto header = "Sessions "
|
||||||
"(" + Data::NumberToString(data.list.size()) + ") - sessions.txt"
|
"(" + Data::NumberToString(data.list.size()) + ") - " + filename
|
||||||
+ kLineBreak
|
+ kLineBreak
|
||||||
+ kLineBreak;
|
+ kLineBreak;
|
||||||
return _summary->writeBlock(header);
|
return _summary->writeBlock(header);
|
||||||
|
@ -718,7 +721,8 @@ Result TextWriter::writeWebSessions(const Data::SessionsList &data) {
|
||||||
return Result::Success();
|
return Result::Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto file = fileWithRelativePath("web_sessions.txt");
|
const auto filename = "lists/web_sessions.txt";
|
||||||
|
const auto file = fileWithRelativePath(filename);
|
||||||
auto list = std::vector<QByteArray>();
|
auto list = std::vector<QByteArray>();
|
||||||
list.reserve(data.webList.size());
|
list.reserve(data.webList.size());
|
||||||
for (const auto &session : data.webList) {
|
for (const auto &session : data.webList) {
|
||||||
|
@ -752,8 +756,7 @@ Result TextWriter::writeWebSessions(const Data::SessionsList &data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto header = "Web sessions "
|
const auto header = "Web sessions "
|
||||||
"(" + Data::NumberToString(data.webList.size()) + ")"
|
"(" + Data::NumberToString(data.webList.size()) + ") - " + filename
|
||||||
" - web_sessions.txt"
|
|
||||||
+ kLineBreak
|
+ kLineBreak
|
||||||
+ kLineBreak;
|
+ kLineBreak;
|
||||||
return _summary->writeBlock(header);
|
return _summary->writeBlock(header);
|
||||||
|
@ -764,7 +767,7 @@ Result TextWriter::writeDialogsStart(const Data::DialogsInfo &data) {
|
||||||
data,
|
data,
|
||||||
"Chats",
|
"Chats",
|
||||||
Data::AboutChats(),
|
Data::AboutChats(),
|
||||||
"chats.html");
|
"lists/chats.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
Result TextWriter::writeDialogStart(const Data::DialogInfo &data) {
|
Result TextWriter::writeDialogStart(const Data::DialogInfo &data) {
|
||||||
|
@ -788,7 +791,7 @@ Result TextWriter::writeLeftChannelsStart(const Data::DialogsInfo &data) {
|
||||||
data,
|
data,
|
||||||
"Left chats",
|
"Left chats",
|
||||||
Data::AboutLeftChats(),
|
Data::AboutLeftChats(),
|
||||||
"left_chats.html");
|
"lists/left_chats.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
Result TextWriter::writeLeftChannelStart(const Data::DialogInfo &data) {
|
Result TextWriter::writeLeftChannelStart(const Data::DialogInfo &data) {
|
||||||
|
@ -940,7 +943,7 @@ QString TextWriter::mainFilePath() {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TextWriter::mainFileRelativePath() const {
|
QString TextWriter::mainFileRelativePath() const {
|
||||||
return "overview.txt";
|
return "export_results.txt";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TextWriter::pathWithRelativePath(const QString &path) const {
|
QString TextWriter::pathWithRelativePath(const QString &path) const {
|
||||||
|
|
Loading…
Reference in New Issue