Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2024, 04:44 PM   #1
birdbear
Junior Member
birdbear has learned how to buy an e-book online
 
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.
birdbear is offline   Reply With Quote
Old 01-14-2024, 10:09 PM   #2
strangelove42
Member
strangelove42 began at the beginning.
 
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.
strangelove42 is offline   Reply With Quote
Advert
Old 01-14-2024, 10:32 PM   #3
strangelove42
Member
strangelove42 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Aug 2021
Device: Kobo Clara HD
It will look like this.
Attached Thumbnails
Click image for larger version

Name:	FileManager_2023-06-19_165455.png
Views:	242
Size:	32.5 KB
ID:	205814   Click image for larger version

Name:	FileManager_2023-06-19_162047.png
Views:	264
Size:	479.2 KB
ID:	205815  
strangelove42 is offline   Reply With Quote
Old 01-16-2024, 09:44 PM   #4
birdbear
Junior Member
birdbear has learned how to buy an e-book online
 
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.
birdbear is offline   Reply With Quote
Old 01-26-2024, 12:22 PM   #5
birdbear
Junior Member
birdbear has learned how to buy an e-book online
 
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?
birdbear is offline   Reply With Quote
Advert
Old 01-26-2024, 02:37 PM   #6
hius07
Wizard
hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.
 
Posts: 1,083
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.
hius07 is offline   Reply With Quote
Old 01-30-2024, 04:57 AM   #7
jonnyl
Connoisseur
jonnyl shares his or her toysjonnyl shares his or her toysjonnyl shares his or her toysjonnyl shares his or her toysjonnyl shares his or her toysjonnyl shares his or her toysjonnyl shares his or her toysjonnyl shares his or her toysjonnyl shares his or her toysjonnyl shares his or her toysjonnyl shares his or her toys
 
Posts: 67
Karma: 5648
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.
jonnyl is offline   Reply With Quote
Old 02-03-2024, 04:20 PM   #8
birdbear
Junior Member
birdbear has learned how to buy an e-book online
 
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!
birdbear is offline   Reply With Quote
Old 02-03-2024, 11:18 PM   #9
hius07
Wizard
hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.
 
Posts: 1,083
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.
hius07 is offline   Reply With Quote
Old 06-16-2024, 06:45 PM   #10
hatuluang
Zealot
hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.
 
hatuluang's Avatar
 
Posts: 136
Karma: 348662
Join Date: Jan 2023
Location: Indonesia
Device: Kobo Clara 2E
Quote:
Originally Posted by birdbear View Post
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!
Hi, thank you for the patch (2-mark_all_ebooks_as_favorite.lua).
I've managed to put it in Koreader/patches. The question is how to execute it?
TIA
hatuluang is offline   Reply With Quote
Old 06-16-2024, 11:15 PM   #11
hius07
Wizard
hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.
 
Posts: 1,083
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).
hius07 is offline   Reply With Quote
Old 06-16-2024, 11:45 PM   #12
hatuluang
Zealot
hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.hatuluang ought to be getting tired of karma fortunes by now.
 
hatuluang's Avatar
 
Posts: 136
Karma: 348662
Join Date: Jan 2023
Location: Indonesia
Device: Kobo Clara 2E
Quote:
Originally Posted by hius07 View Post
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).
Thank you. I will try it.

Last edited by hatuluang; 06-17-2024 at 10:35 AM.
hatuluang is offline   Reply With Quote
Old 06-21-2024, 12:58 PM   #13
birdbear
Junior Member
birdbear has learned how to buy an e-book online
 
Posts: 6
Karma: 82
Join Date: Sep 2018
Device: Kindle PW2
Quote:
Originally Posted by hatuluang View Post
Hi, thank you for the patch (2-mark_all_ebooks_as_favorite.lua).
I've managed to put it in Koreader/patches. The question is how to execute it?
TIA
User patches are designed to execute at certain times based on how they are named. Check out the wiki for details: https://github.com/koreader/koreader...i/User-patches

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.
birdbear is offline   Reply With Quote
Old 08-04-2024, 11:27 PM   #14
iandol
Enthusiast
iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.
 
iandol's Avatar
 
Posts: 36
Karma: 216612
Join Date: Feb 2022
Device: Kobo Nia
Quote:
Originally Posted by birdbear View Post
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.
Thank you!

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?
iandol is offline   Reply With Quote
Old 08-27-2024, 07:52 AM   #15
fer1803
Enthusiast
fer1803 began at the beginning.
 
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.
fer1803 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate tags before adding books karimnaguib Library Management 4 11-08-2013 01:16 PM
HOLIDAY SPECIAL! 3 FREE “Grandmas’ Favorites” Kindle Recipe Books Marianne39 Self-Promotions by Authors and Publishers 0 12-16-2012 06:02 AM
populate one ID from another? robcohen Library Management 1 02-01-2012 09:32 PM
Quality (stars) doesn't populate jeffla376 Library Management 5 10-03-2011 10:06 PM
How do I populate a custom field on import? himitsuhieki Library Management 7 08-19-2011 03:37 PM


All times are GMT -4. The time now is 09:12 PM.


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