Quote:
Originally Posted by de3sw2aq1
I used to use KoboUtilities and KoboTouchExtended which let me get the current reading progress (% completion, finished) of each book into Calibre. I wanted to find a way to get similar info out of Plato.
|
Not sure if anyone else finds these useful, but here's a similar query to export a book's annotations. (I read piles of fanfic and highlight recs in author's notes to look up later.)
Code:
SELECT
json_extract(metadata.value, "$.title") as title,
json_extract(metadata.value, "$.author") as author,
json_extract(readingstate.value, "$.text") as annotation
FROM json_each(readfile(".metadata.json")) as metadata
JOIN json_each(readfile(printf(".reading-states/%s.json", metadata.key)), "$.annotations") as readingstate;
(I'm honestly surprised SQLite's query planner handles this, apparently you can just join rows with a table-valued function like this.)
I can't figure out how to edit my old post on mobileread, but with a current version of Plato the .reading-states section of my previous query needs to be changed from %X to %s like this one.