01-25-2021, 11:10 PM | #646 |
Junior Member
Posts: 2
Karma: 10
Join Date: Dec 2013
Device: Kindle
|
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.
I realized the Plato reading states and metadata are just JSON, so I'd normally just use jq. But the weird base10 vs base16 encoding of the id gave me trouble, and the reading states are in a separate file per book. I realized SQLite is powerful enough for this kind of query and works too though. Maybe this is useful to someone else, thought I'd share it. Code:
SELECT json_extract(metadata, "$.title") as title, json_extract(metadata, "$.author") as author, json_extract(metadata, "$.file.path") as path, json_extract(readingstate, "$.finished") as finished, json_extract(readingstate, "$.currentPage") as currentPage, json_extract(readingstate, "$.pagesCount") as pagesCount, CAST( json_extract(readingstate, "$.currentPage") AS FLOAT ) / json_extract(readingstate, "$.pagesCount") as progress FROM ( SELECT json(readfile(printf(".reading-states/%X.json", key))) as readingstate, value as metadata FROM json_each(readfile(".metadata.json")) ) WHERE readingstate IS NOT NULL AND finished = true; -- edit or remove this part to filter the query |
02-08-2021, 09:46 AM | #648 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2021
Device: kobo forma
|
hey Baskerville, im new to eReaders and i just tried KOReader and Plato.
I love Plato: its sleek and has a nice clean UI. Thanks so much for it. As i use my Kobo Forma to read Music sheet PDFs i dont need anything but pagewise browsing and fit-to-content zoom (i just spent the weekend manually cutting the margins on all my PDF music partitures by hand..) The second does not seem to be implemented (or i didnt find). Fit to content width seems to to not much to my pdfs. I just want a maximum zoom to the area with content. KOReader does this so i could be happier.. still: Any chance of it coming anytime? and i read you can set Plato to always start at boot? if i had the fit-to-content i would not need anything else on the forma ever again |
02-08-2021, 10:06 AM | #649 | |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
Quote:
Yes, but it might be problematic for the Forma. |
|
02-08-2021, 10:18 AM | #650 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2021
Device: kobo forma
|
hey thanks for the quick response!
i can live with starting it everytime and most of the time it will only sleep i think. as for the fit to content: do i understand coorectly that i would choose a zoom level and it would stay static forever? i need an automatic setting for all PDFs ever as each page in each document has a different margin. i have about 150 scores (1-10 pages each). also new documents come all the time. When i wrote i cut my documents per hand i didnt mean with the same margin. i did it automatically with k2pdfopt but it took me all weekend to find the right tool (installed a bunch) and then the right settings in k2pdfopt. i would like no to have to do that preprocessing each time i get a new file. so ideally it is handled per page automatically (the way it seems to be in koreader). The kindle oasis also does it by default but the screen is too little. i am happy with the 7inch in Forma Last edited by mrrooter; 02-08-2021 at 10:23 AM. |
Advert | |
|
02-12-2021, 06:33 AM | #651 | |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2019
Device: Kobo H2O first edition
|
Quote:
You can crop all pages individually with auto-crop (didn't work always for me, don't know why). But doing it manually also works fast. Perhaps you can give it a try? |
|
02-16-2021, 04:32 AM | #652 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2021
Device: kobo forma
|
hey thanks, i found a great solution with k2pdfopt.
It can crop pdfs in bulk for free. but i have to do it on a pc, so i cant do it while travelling etc. ideally I would like the reader to do it automatically. it seems ill stick to KOreader, which does this. |
02-16-2021, 07:51 AM | #654 |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
|
02-16-2021, 09:24 AM | #655 |
Guru
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
@baskerville
How can change the path for saving: .reading-states, .thumbnail-previews, .fat32-epoch and .metadata.json? Purpose - I don't want them to be saved in the library ("/mnt/onboard/Books"), interferes a little. |
02-16-2021, 12:00 PM | #656 | |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
Quote:
Where would you like those files and directories to be saved to? |
|
02-16-2021, 12:59 PM | #657 |
Guru
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
Synchronization. They are, of course, not difficult to add to exclusions, but the best option is to save them elsewhere, in the Plato folder itself (.adds/plato/name_folder)
If it's easy, of course. It's not a specific thing. |
02-17-2021, 09:30 AM | #658 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2019
Device: Kobo H2O first edition
|
zoom factor in Plato
As far as I know, I can only zoom to "fit-to-width" in landscape mode.
No other zoom factors are possible. Is there a workaround for this? Or is there a chance that a (customizable) zoom factor will be implemented? |
02-18-2021, 08:50 AM | #659 | |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
Quote:
However, I have installed Plato in /usr/local, and I often edit .metadata.json manually and invoke plato-import with the device plugged to a computer: I won't be able to do this if the library files aren't on the user partition. |
|
02-18-2021, 09:19 AM | #660 | |
Guru
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
Quote:
I just don't need extra files in mnt/onboard/Books ... |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PocketBook-KOReader: a document reader for PDF, DJVU, EPUB, FB2, CBZ, ... (AGPLv3) | chrox | KOReader | 566 | 04-19-2024 05:28 AM |
KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) | hawhill | Kindle Developer's Corner | 1268 | 02-27-2024 11:49 AM |
Kindle -- KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) | hawhill | KOReader | 1219 | 01-27-2024 02:29 PM |
v3 vs. v3+ as a pdf/DjVu reader | hedonism_bot | HanLin eBook | 7 | 11-02-2010 08:16 PM |