mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
added progress also to export
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
const repository = require("../repository");
|
||||
const utils = require('../utils');
|
||||
|
||||
async function exportToOpml(branch, res) {
|
||||
async function exportToOpml(exportContext, branch, res) {
|
||||
const note = await branch.getNote();
|
||||
|
||||
async function exportNoteInner(branchId) {
|
||||
@@ -21,6 +21,8 @@ async function exportToOpml(branch, res) {
|
||||
|
||||
res.write(`<outline title="${preparedTitle}" text="${preparedContent}">\n`);
|
||||
|
||||
exportContext.increaseProgressCount();
|
||||
|
||||
for (const child of await note.getChildBranches()) {
|
||||
await exportNoteInner(child.branchId);
|
||||
}
|
||||
@@ -45,6 +47,8 @@ async function exportToOpml(branch, res) {
|
||||
res.write(`</body>
|
||||
</opml>`);
|
||||
res.end();
|
||||
|
||||
exportContext.exportFinished();
|
||||
}
|
||||
|
||||
function prepareText(text) {
|
||||
|
||||
Reference in New Issue
Block a user