aboutsummaryrefslogtreecommitdiff
path: root/export-koreader-note
diff options
context:
space:
mode:
Diffstat (limited to 'export-koreader-note')
-rwxr-xr-xexport-koreader-note15
1 files changed, 12 insertions, 3 deletions
diff --git a/export-koreader-note b/export-koreader-note
index ae2e0ef..307e575 100755
--- a/export-koreader-note
+++ b/export-koreader-note
@@ -30,9 +30,10 @@ else
end
-- Load metadata
-content = assert(loadfile(file))
-data = content()
-bookmarks = data.bookmarks
+content = assert(loadfile(file))
+data = content()
+bookmarks = data.bookmarks
+annotations = data.annotations
-- Sort
table.sort(bookmarks, compare)
@@ -44,3 +45,11 @@ for key, item in ipairs(bookmarks) do
print('> ' .. item.notes)
print('')
end
+
+-- Iterate over annotations
+for key, item in ipairs(annotations) do
+ print('Page ' .. item.page .. ':')
+ print('')
+ print('> ' .. item.text)
+ print('')
+end