backend api for ZIP export

This commit is contained in:
zadam
2022-12-29 21:15:34 +01:00
parent 16c3833a36
commit c7556d9163
14 changed files with 1052 additions and 170 deletions

View File

@@ -17,7 +17,8 @@ const becca = require("../becca/becca");
const ws = require("./ws");
const SpacedUpdate = require("./spaced_update");
const specialNotesService = require("./special_notes");
const branchService = require("./branches.js");
const branchService = require("./branches");
const exportService = require("./export/zip");
/**
* This is the main backend API interface for scripts. It's published in the local "api" object.
@@ -562,6 +563,14 @@ function BackendScriptApi(currentNote, apiParams) {
}
};
/**
* @method
* @param {string} noteId
* @param {string} format - either 'html' or 'markdown'
* @param {string} zipFilePath
*/
this.exportSubtreeToZipFile = (noteId, format, zipFilePath) => exportService.exportToZipFile(noteId, format, zipFilePath);
/**
* This object contains "at your risk" and "no BC guarantees" objects for advanced use cases.
*