01-14-2024, 05:44 PM | #1 |
Junior Member
Posts: 6
Karma: 82
Join Date: Sep 2018
Device: Kindle PW2
|
Is there a way to populate Favorites with all books on device?
I am blown away by KOReader-- such a great reading experience compared to stock readers. Thank you so much KOReader team.
I am wondering if there is a way to populate the Favorites view with all books on the device without adding them manually as a Favorite. Since books are sometimes buried in folders and subfolders it is tedious to add them manually. I see there is an open issue on github for a "flat view" of the library (https://github.com/koreader/koreader/issues/8472), which looks interesting and useful. But it occurs to me that populating the Favorites view (or History, for that matter) with all books would be a nice way to have a "flat" view of all documents. Is there a script someone has made to accomplish this? Thanks in advance. |
01-14-2024, 11:09 PM | #2 |
Member
Posts: 13
Karma: 10
Join Date: Aug 2021
Device: Kobo Clara HD
|
You can put your books in one folder to achieve the same thing. Then change your display mode to "Mosaic with cover images".
I organize them into genres. I didn't find a simple way of making the switch from author folders to genre folders though. I pretty much just re-sideloaded the entire library with Calibre, transferred the existing KOreader metadata files from the author folders to the correct genre folder, then deleted all the author folders. I only had about 300 books at the time and around 50 with metadata so it wasn't time consuming for me. (By default calibre uses author folder to sideload books. To change this go to Preferences > Sending books to devices > Save template.) If anyone knows how to make Calibre do this automatically, please let me know. |
01-14-2024, 11:32 PM | #3 |
Member
Posts: 13
Karma: 10
Join Date: Aug 2021
Device: Kobo Clara HD
|
It will look like this.
|
01-16-2024, 10:44 PM | #4 |
Junior Member
Posts: 6
Karma: 82
Join Date: Sep 2018
Device: Kindle PW2
|
Thanks strangelove42. That makes sense.
I could do that but was hoping to just leave them in their directories/subdirectories. That way I can just copy over the folders from calibre's file structure and not mess with hunting down epubs and pdfs. This would also maintain the directories in case I wanted to browse for a book in that way. |
01-26-2024, 01:22 PM | #5 |
Junior Member
Posts: 6
Karma: 82
Join Date: Sep 2018
Device: Kindle PW2
|
I mean, what is the process that a book goes through when I click Add Book to Favorites?
I imagine the metadata is added to a database that the Favorites page then uses to populate itself. Can that process be replicated or spoofed with a script? |
01-26-2024, 03:37 PM | #6 |
Wizard
Posts: 1,084
Karma: 3581333
Join Date: Sep 2014
Location: Ukraine
Device: Kindle PW2, PW3, PW4, Voyage
|
They are stored in koreader/settings/collection.lua, if you will write a script.
|
01-30-2024, 05:57 AM | #7 |
Connoisseur
Posts: 69
Karma: 9464
Join Date: Jan 2021
Device: Likebook Mars
|
@birdbear, you can also open File search and search for "*", check 'Include subfolders'.
You can call File search with a gesture from anywhere and it will remember your last search string. |
02-03-2024, 05:20 PM | #8 |
Junior Member
Posts: 6
Karma: 82
Join Date: Sep 2018
Device: Kindle PW2
|
Hey all, thanks to the hint by hius07, I was able to create a User Patch to accomplish what I was asking about in this thread.
For those interested, the User Patch can be found at: https://gist.github.com/dagrha/f24f7...2af6425da99012 User Patches (and how to use them) are described here: https://github.com/koreader/koreader/wiki/User-patches I'm sure my patch could be greatly improved by someone who knows Lua better than me, and with some clever sorting routines, filters, etc. But it works well for simply adding all books to the favorites collection. Cheers! |
02-04-2024, 12:18 AM | #9 |
Wizard
Posts: 1,084
Karma: 3581333
Join Date: Sep 2014
Location: Ukraine
Device: Kindle PW2, PW3, PW4, Voyage
|
If you are going to develop further, the following modules are responsible for collections:
https://github.com/koreader/koreader...collection.lua https://github.com/koreader/koreader...collection.lua You can plug any modules via the "require()" statement. Also the propositions how to improve the collection feature are welcome. |
06-16-2024, 07:45 PM | #10 | |
Zealot
Posts: 144
Karma: 348662
Join Date: Jan 2023
Location: Indonesia
Device: Kobo Clara 2E
|
Quote:
I've managed to put it in Koreader/patches. The question is how to execute it? TIA |
|
06-17-2024, 12:15 AM | #11 |
Wizard
Posts: 1,084
Karma: 3581333
Join Date: Sep 2014
Location: Ukraine
Device: Kindle PW2, PW3, PW4, Voyage
|
Take the recent nightly build.
There you will have more collections (in addition to Favorites) and a feature to select any group of books (or all books in a folder) and to add them to collection(s). |
06-17-2024, 12:45 AM | #12 |
Zealot
Posts: 144
Karma: 348662
Join Date: Jan 2023
Location: Indonesia
Device: Kobo Clara 2E
|
Thank you. I will try it.
Last edited by hatuluang; 06-17-2024 at 11:35 AM. |
06-21-2024, 01:58 PM | #13 | |
Junior Member
Posts: 6
Karma: 82
Join Date: Sep 2018
Device: Kindle PW2
|
Quote:
Don't forget to put the .lua user patch into the koreader/patches directory on your device. If you named it "2-..." and it's in that folder, it should execute every time KOReader restarts. |
|
08-05-2024, 12:27 AM | #14 | |
Enthusiast
Posts: 36
Karma: 216612
Join Date: Feb 2022
Device: Kobo Nia
|
Quote:
Am I right in thinking that this will overwrite collections.lua so if you have any collections apart from favourites, these will be lost. In function add_ebooks_to_collection on line 34-52? If we want to preserve any other collections then only the favorites section should be changed, what is the best way to do that? From other languages I know it would be to deserialise collections.lua to a variable then manipulate it then serialise it back to the file? |
|
08-27-2024, 08:52 AM | #15 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Feb 2012
Device: none
|
Would it be possible to do the same, but instead of all the books appearing in favorites, they would do it in history? perhaps it would be more useful because of the possibility of filtering read and unread. Thank you very much for the work.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Populate tags before adding books | karimnaguib | Library Management | 4 | 11-08-2013 02:16 PM |
HOLIDAY SPECIAL! 3 FREE “Grandmas’ Favorites” Kindle Recipe Books | Marianne39 | Self-Promotions by Authors and Publishers | 0 | 12-16-2012 07:02 AM |
populate one ID from another? | robcohen | Library Management | 1 | 02-01-2012 10:32 PM |
Quality (stars) doesn't populate | jeffla376 | Library Management | 5 | 10-03-2011 11:06 PM |
How do I populate a custom field on import? | himitsuhieki | Library Management | 7 | 08-19-2011 04:37 PM |