Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
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
Old 02-13-2025, 09:31 PM   #2
meppr
Junior Member
meppr began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2025
Device: Kobo Sage
For the first question, there's a Color column on the Bookmark table, values are:

0: yellow
1: red
2: blue
3: green
meppr is offline   Reply With Quote
Advert
Reply

Tags
annotation, sqlite

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best eReader/solutions for backing up/syncing Annotations frailtyy Which one should I buy? 6 01-16-2021 11:29 AM
Color: Original ereader books (from ereader.com) sangahm Nook Developer's Corner 13 03-05-2012 03:25 PM
Color Nook Color won't show PDF annotations p2ranger Nook Color & Nook Tablet 0 01-13-2012 08:21 PM
Easy annotations in an ereader? idle Which one should I buy? 8 09-21-2011 12:29 PM
eReader for PDF and annotations Echofox Which one should I buy? 3 09-03-2010 08:11 AM


All times are GMT -4. The time now is 04:35 PM.


MobileRead.com is a privately owned, operated and funded community.