View Single Post
Old 10-13-2022, 02:00 PM   #1
qkqw
Connoisseur
qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.
 
Posts: 65
Karma: 143000
Join Date: Apr 2022
Device: Kobo Libra 2
Exporting annotations, bookmarks and reading progress to the cloud

As I've lost my annotations and reading progress too many times (mostly due to playing around with scripts, installing stuff, automatic import etc.), and I don't use Calibre, I've hacked together a small script that exports my annotations, bookmarks and reading progress to Markdown files.

Currently I'm using it via NickelMenu like this:

Code:
menu_item :main    :Sync Annotations    :nickel_wifi     :autoconnect
  chain_success                         :cmd_spawn       :quiet:/mnt/onboard/.adds/notes/notes.sh
  chain_success                         :dbg_toast       :Syncing Notes
I've also added a sqlite3 binary to extract all the information I need from the Kobo database.

If you want to use it, extract the zip file to /mnt/onboard/.adds/notes/ and adjust the directory you want your notes exported to.

Click image for larger version

Name:	Screenshot from 2022-10-13 19-57-01.png
Views:	1283
Size:	116.5 KB
ID:	197132

Feedback welcome!

Changelog:

2022-10-13:
  • Initial release

2022-10-14:
  • Fix libsqlite.so.0 typo
  • Export file to /mnt/onboard/Exported Annotations/Notes.md
  • Add current date/time to the file
  • Only show not hidden bookmarks
  • Show chapter in highlights
  • Show chapter in dogear bookmarks

2022-10-15:
  • Combine highlights and dogears to a single list
  • Add created date to each highlight
  • Add an icon showing whether an entry is a dogear, note or highlight
  • Fix compatibility with epub highlights
  • Add note regarding export location when not using English as default language

2022-10-16:
  • Change document icon in order to support Android
  • Add current chapter name to current reads
  • Add newlines between headings and quotes (not required by Markdown, but by pandoc)

2022-10-17:
  • Order bookmarks by title, chapter, chapter progress and then date
  • Simplify upload filename to "notes-%Y-%m-%d.md"

2022-10-17:
  • Removed the dependency to KoboCloud
  • Removed the Nextcloud Curl command
  • Exported notes are now named with their current date (e.g. notes-2023-02-17.md)
  • Notes are rotated and 21 notes are kept (can be configured)

2023-02-17:
  • Remove KoboCloud dependency
  • Rename notes with their current date

2023-08-04:
  • Export book progress of PDFs as well

2023-10-16:
  • Fix a bug in reading progress that didn't list a book when it doesn't have any chapter titles (e.g. PDFs or automatically generated Epubs)

2024-03-26:
  • Simplify SQL query and don't exclude bookmarks if Epub is partially broken or has no chapter titles
Attached Files
File Type: zip notes-20221013.zip (590.6 KB, 853 views)
File Type: zip notes-20221014.zip (590.8 KB, 477 views)
File Type: zip notes-20221015.zip (591.1 KB, 465 views)
File Type: zip notes-20221016.zip (591.3 KB, 549 views)
File Type: zip notes-20221017.zip (591.3 KB, 533 views)
File Type: zip notes-20230217.zip (591.2 KB, 450 views)
File Type: zip notes-20230804.zip (591.2 KB, 449 views)
File Type: zip notes-20231016.zip (591.1 KB, 1006 views)
File Type: zip notes-20240326.zip (593.1 KB, 799 views)

Last edited by qkqw; 03-26-2024 at 07:51 AM.
qkqw is offline   Reply With Quote