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, 05: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, 11: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
Old 01-14-2024, 11: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:	267
Size:	32.5 KB
ID:	205814   Click image for larger version

Name:	FileManager_2023-06-19_162047.png
Views:	288
Size:	479.2 KB
ID:	205815  
strangelove42 is offline   Reply With Quote
Old 01-16-2024, 10: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, 01: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
Old 01-26-2024, 03: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,100
Karma: 3592591
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 online now   Reply With Quote
Old 01-30-2024, 05:57 AM   #7
jonnyl
Connoisseur
jonnyl can eat soup with a fork.jonnyl can eat soup with a fork.jonnyl can eat soup with a fork.jonnyl can eat soup with a fork.jonnyl can eat soup with a fork.jonnyl can eat soup with a fork.jonnyl can eat soup with a fork.jonnyl can eat soup with a fork.jonnyl can eat soup with a fork.jonnyl can eat soup with a fork.jonnyl can eat soup with a fork.
 
Posts: 87
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.
jonnyl is offline   Reply With Quote
Old 02-03-2024, 05: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-04-2024, 12:18 AM   #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,100
Karma: 3592591
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 online now   Reply With Quote
Old 06-16-2024, 07:45 PM   #10
hatuluang
Teluk Biru
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: 152
Karma: 348662
Join Date: Jan 2023
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-17-2024, 12:15 AM   #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,100
Karma: 3592591
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 online now   Reply With Quote
Old 06-17-2024, 12:45 AM   #12
hatuluang
Teluk Biru
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: 152
Karma: 348662
Join Date: Jan 2023
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 11:35 AM.
hatuluang is offline   Reply With Quote
Old 06-21-2024, 01: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-05-2024, 12:27 AM   #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, 08: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 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


All times are GMT -4. The time now is 04:21 AM.


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