Module baseexporter
Base for highlight exporters.
Each target should inherit from this class and implement at least an export function.
Functions
BaseExporter:getTimeStamp () | Export timestamp |
BaseExporter:getVersion () | Exporter version |
BaseExporter:loadSettings () | Loads settings for the exporter |
BaseExporter:saveSettings () | Saves settings for the exporter |
BaseExporter:export (t) | Exports a table of booknotes to local format or remote service |
BaseExporter:getFilePath (t) | File path where the exporter writes its output |
BaseExporter:getMenuTable () | Configuration menu for the exporter |
BaseExporter:isReadyToExport () | Checks if the exporter is ready to export |
BaseExporter:isEnabled () | Checks if the exporter was enabled by the user and it is ready to export |
BaseExporter:toggleEnabled () | Toggles exporter enabled state if it's ready to export |
BaseExporter:shareText (text, title) | Shares text with other apps |
Functions
- BaseExporter:getTimeStamp ()
-
Export timestamp
Returns:
-
string
timestamp
- BaseExporter:getVersion ()
-
Exporter version
Returns:
-
string
version
- BaseExporter:loadSettings ()
- Loads settings for the exporter
- BaseExporter:saveSettings ()
- Saves settings for the exporter
- BaseExporter:export (t)
-
Exports a table of booknotes to local format or remote service
Parameters:
- t table of booknotes
Returns:
-
bool
success
- BaseExporter:getFilePath (t)
-
File path where the exporter writes its output
Parameters:
- t table of booknotes
Returns:
-
string
absolute path or nil
- BaseExporter:getMenuTable ()
-
Configuration menu for the exporter
Returns:
-
table
menu with exporter settings
- BaseExporter:isReadyToExport ()
-
Checks if the exporter is ready to export
Returns:
-
bool
ready
- BaseExporter:isEnabled ()
-
Checks if the exporter was enabled by the user and it is ready to export
Returns:
-
bool
enabled
- BaseExporter:toggleEnabled ()
- Toggles exporter enabled state if it's ready to export
- BaseExporter:shareText (text, title)
-
Shares text with other apps
Parameters:
- text
- title