From 710614752dea0ff76ee186f6228e45204e977385 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Fri, 19 May 2023 21:43:12 +0200 Subject: [PATCH] [doc, plugin] Exporter: manually specify module name (#10465) Follow-up to . --- plugins/exporter.koplugin/main.lua | 33 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/plugins/exporter.koplugin/main.lua b/plugins/exporter.koplugin/main.lua index 7c0903fc1..bbbd59ede 100644 --- a/plugins/exporter.koplugin/main.lua +++ b/plugins/exporter.koplugin/main.lua @@ -1,28 +1,29 @@ ---[[ - Export highlights to different targets. +--[[-- +Export highlights to different targets. - Some conventions: +Some conventions: - - Target: each local format or remote service this plugin can translate to. +- Target: each local format or remote service this plugin can translate to. - Each new target should inherit from "formats/base" and implement *at least* an export function. +Each new target should inherit from "formats/base" and implement *at least* an export function. - - Highlight: Text or image in document. Stored in "highlights" table of documents sidecar file. +- Highlight: Text or image in document. Stored in "highlights" table of documents sidecar file. - Parser uses this table. - If highlight._._.text field is empty the parser uses highlight._._.pboxes field to get an image instead. +Parser uses this table. +If highlight._._.text field is empty the parser uses highlight._._.pboxes field to get an image instead. - - Bookmarks: Data in bookmark explorer. Stored in "bookmarks" table of documents sidecar file. +- Bookmarks: Data in bookmark explorer. Stored in "bookmarks" table of documents sidecar file. - Every field in bookmarks._ has "text" and "notes" fields. - When user edits a highlight or "renames" bookmark the text field is created or updated. - The parser looks to bookmarks._.text field for edited notes. bookmarks._.notes isn't used for exporting operations. +Every field in bookmarks._ has "text" and "notes" fields. +When user edits a highlight or "renames" bookmark the text field is created or updated. +The parser looks to bookmarks._.text field for edited notes. bookmarks._.notes isn't used for exporting operations. - - Clippings: Parsed form of highlights. Single table for all documents. +- Clippings: Parsed form of highlights. Single table for all documents. - - Booknotes: Every table in clippings table. clippings = {"title" = booknotes} +- Booknotes: Every table in clippings table. clippings = {"title" = booknotes} ---]] +@module koplugin.exporter +--]]-- local DataStorage = require("datastorage") local Device = require("device") @@ -174,7 +175,7 @@ function Exporter:exportAllNotes() end --- Parse and export highlights from selected documents. --- @tparam table files list of files 'file_path = true' +-- @tparam table files list of files as a table of {[file_path] = true} function Exporter:exportFilesNotes(files) local clippings = self.parser:parseFiles(files) for title, booknotes in pairs(clippings) do