From 00a5863f4fab30fd7aec42d971dfb851f5cf22d1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 7 Oct 2024 20:49:11 -0300 Subject: Fix: export-koreader-note: annotations handling --- export-koreader-note | 15 ++++++++++++--- 1 file 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 -- cgit v1.2.3