Thread: Libra Colour Color eReader annotations
View Single Post
Old 02-05-2025, 05:06 PM   #1
Scaledish
A friend
Scaledish ought to be getting tired of karma fortunes by now.Scaledish ought to be getting tired of karma fortunes by now.Scaledish ought to be getting tired of karma fortunes by now.Scaledish ought to be getting tired of karma fortunes by now.Scaledish ought to be getting tired of karma fortunes by now.Scaledish ought to be getting tired of karma fortunes by now.Scaledish ought to be getting tired of karma fortunes by now.Scaledish ought to be getting tired of karma fortunes by now.Scaledish ought to be getting tired of karma fortunes by now.Scaledish ought to be getting tired of karma fortunes by now.Scaledish ought to be getting tired of karma fortunes by now.
 
Scaledish's Avatar
 
Posts: 134
Karma: 1152040
Join Date: Mar 2020
Location: Somewhere in boston
Device: Kobo Forma
Color eReader annotations

Hi, long time no see. I'm working on adding annotation syncing support to Komga. If all goes according to plan, this means the annotations for sideloaded books can be synced between devices without any custom software... just a one line configuration change.

Anywayy I have the Kobo Forma, which isn't a color eReader, so I don't know how the reader stores and syncs color information. I'm looking for the following two things:

Database format

Inside the
Code:
.kobo/KoboReader.sqlite
file, annotations are stored in the
Code:
Bookmark
table. In what column are the colors stored? Could I have sample values?

Sync format

This one is a bit harder, challenge by choice! Get kobo logs: https://komga.org/docs/guides/kobo/#...o-ereader-logs

Create a color highlight in a book obtained via overdrive or the kobo store

Sync

Copy the relevant logs. You're looking for something like

Code:
Nov  1 22:52:41 nickel: (   147.766 @ 0x345a708 / packetdump.debug) -------------------------- REQUEST --------------------------- 
Nov  1 22:52:41 nickel: (   147.766 @ 0x345a708 / packetdump.debug) "PATCH" > To:  "/api/v3/content/<user_id?>/annotations" 
Nov  1 22:52:41 nickel: (   147.767 @ 0x345a708 / packetdump.debug) 	---------------------- HEADERS --------------------------- 
Nov  1 22:52:41 nickel: (   147.767 @ 0x345a708 / packetdump.debug) "Accept-Encoding" : "gzip" 
Nov  1 22:52:41 nickel: (   147.767 @ 0x345a708 / packetdump.debug) "Accept" : "application/json" 
Nov  1 22:52:41 nickel: (   147.767 @ 0x345a708 / packetdump.debug) "Authorization" : "Bearer xxx" 
Nov  1 22:52:41 nickel: (   147.767 @ 0x345a708 / packetdump.debug) "Content-Type" : "application/json" 
Nov  1 22:52:41 nickel: (   147.768 @ 0x345a708 / packetdump.debug) "x-kobo-affiliatename" : "fnac" 
Nov  1 22:52:41 nickel: (   147.768 @ 0x345a708 / packetdump.debug) "x-kobo-appversion" : "4.28.18220" 
Nov  1 22:52:41 nickel: (   147.768 @ 0x345a708 / packetdump.debug) "x-kobo-deviceid" : "xxx" 
Nov  1 22:52:41 nickel: (   147.768 @ 0x345a708 / packetdump.debug) "x-kobo-devicemodel" : "Kobo Clara HD" 
Nov  1 22:52:41 nickel: (   147.769 @ 0x345a708 / packetdump.debug) "x-kobo-deviceos" : "4.1.15" 
Nov  1 22:52:41 nickel: (   147.769 @ 0x345a708 / packetdump.debug) "x-kobo-deviceosversion" : "NA" 
Nov  1 22:52:41 nickel: (   147.769 @ 0x345a708 / packetdump.debug) "x-kobo-platformid" : "00000000-0000-0000-0000-000000000376" 
Nov  1 22:52:41 nickel: (   147.769 @ 0x345a708 / packetdump.debug) "User-Agent" : "Mozilla/5.0 (Linux; U; Android 2.0; en-us;) AppleWebKit/538.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/538.1 (Kobo Touch 0376/4.28.18220)" 
Nov  1 22:52:41 nickel: (   147.770 @ 0x345a708 / packetdump.debug) "Accept-Language" : "fr-FR, fr;q=0.9, en;q=0.8, *;q=0.7" 
Nov  1 22:52:41 nickel: (   147.770 @ 0x345a708 / packetdump.debug) "Content-Length" : "23192" 
Nov  1 22:52:41 nickel: (   147.770 @ 0x345a708 / packetdump.debug) 	---------------------- BODY --------------------------- 
Nov  1 22:52:41 nickel: (   147.770 @ 0x345a708 / packetdump.debug) "{"updatedAnnotations": [{"clientLastModifiedUtc": "2021-11-01T13:10:10Z","highlightedText": "If something is true, no amount of wishful thinking can undo it.","id": "ede9e626-23d2-45da-864e-5d1b253cdc79","location": {"span": {"chapterFilename": "text/part0004.html","chapterProgress": 0.88888888888888884,"chapterTitle": "Introduction to 30th Anniversary Edition","endChar": 64,"endPath": "span#kobo\\.30\\.1","startChar": 0,"startPath": "span#kobo\\.30\\.1"}},"type": "Highlight"},...
Take special care to ensure you censor any PII! I'm not trying to steal your booty

Thanks!
Scaledish is offline   Reply With Quote