johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.43k stars 296 forks source link

Generating EpubCFI from E-reader's Database #1425

Closed orhnk closed 1 week ago

orhnk commented 2 weeks ago

Question: I'm trying to develop an script that will read from my e-book's database (KoboReader.sqlite) and fetch out the annotations to my foliate app. Stuck with the epubcfi standards.

KoboReader.sqlite includes a lot of information about your annotations under the table Bookmark. I just need some information about where to put what on the cfi. Could you help me please?

Here's the database in action:

https://github.com/user-attachments/assets/18a580b5-4694-4122-911f-801f2e352ddf

I checked out your -js library and there are some epubcfi algorithms there. (Also the document you've put on FAQ) But me and gpt was having some trouble with it.

Version:

johnfactotum commented 2 weeks ago

See https://github.com/valeriangalliat/kobo-highlights-to-calibre

orhnk commented 1 week ago

I used https://github.com/pmstss/epub-cfi-generator

Good project.

But having problems with some edge case misdefined epubcfi... Foliate is too harsh when it comes to unambigious cfis. (like something is written incorrectly but fixable)