03-18-2024, 10:31 AM | #1 |
Grand Sorcerer
Posts: 11,779
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Options for summarizing the book list
I am considering submitting to @kovid a change to add a new search term to calibre: summarize_booklist:field_name,count, where 'field_name' is the lookup name and 'count' is optional.
This search term does the same thing as the template in this post. Specifically it scans the current book list in order, searching for values in "field_name". If the number of value(s) already seen is less than "count" then it adds the book to the search results. Because it scans the book list in order, you have control over which value(s) it finds first by sorting the book list before doing the search. Because it uses the book list, subsequent "summarize_booklist" searches further summarize what you see. You get back to the "full" book list (subject to VLs) by erasing the "summarize_booklist" search. Here is an example of summarizing the book list by series. The first capture shows several series on the book list, sorted by series. This capture shows the result of the "summarize_booklist:series,1" search: This capture shows the result if the book list was sorted series descending before the "summarize_booklist" above was applied. And finally, this capture shows the result of applying "summarize_booklistublisher,1" to the result of the previous summarize. It isn't clear that I should propose this code. The biggest issue is that it is similar in concept to making a pivot table, but there is no way (and never will be a way) to interactively open and close the sublists. In other words, there is no "button" to show the books in theory hidden behind the displayed book. A second issue is that as mentioned above, the summarization is cumulative. To start over one must erase the current search, or do something like open a VL that does the same thing. This behavior is different from normal calibre searches, which start over each time, ignoring what is displayed. I can't repeat that behavior so there will be confusion, and therefore posts and bug reports. Finally, this search term works only in the GUI. Using it from the command line or calibre server won't work. Still thinking. Your thoughts are welcome. Last edited by chaley; 03-18-2024 at 11:05 AM. |
03-19-2024, 03:45 AM | #2 |
Groupie
Posts: 171
Karma: 158116
Join Date: Oct 2015
Device: Kobo Glo HD (landscape), Kobo Aura One
|
I hope I will find more time to have a deeper look into this but here is my immediately comment:
Some months ago I adjust your "first book of a serie" so that it shows "the oldest (download date) unread book of each author". I assume with your new search I can do that as well. About the second issue, if I understand that correct. This effect is also visible using this new search when you enter any other filter before. E.g. search "David". Search "summarize...". If so, that may confuse. Only as a quick idea: adding parameter-field for sort and sort-order. Could that avoid the cumulative issue as you do not need "to look at the screen"? |
Advert | |
|
03-19-2024, 05:38 AM | #3 | |||
Grand Sorcerer
Posts: 11,779
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Thanks for your thoughts.
Quote:
Quote:
The easiest way to use it would be to use search to filter the book list then save that search as a temporary VL. This permits you to get back to the search result quickly. Next sort the book list in the order you want. Then summarize. Finally, it is reasonable to summarize twice, that is summarize a summary, as I did in the example in the first post. Quote:
However, it might be possible to get the current sort and apply that before doing the summarize. This would eliminate the cumulative effect, with the downsides that
Last edited by chaley; 03-19-2024 at 05:54 AM. |
|||
03-19-2024, 06:24 AM | #4 |
creator of calibre
Posts: 44,015
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm not the greatest fan of the cumulative behavior. It's surprising, different from all the rest of the searching mechanism and likely to generate why does this work this way type bug reports.
If I understand correctly, the use case is basically generating a "report" of some kind over your books? Like series with the last book or whatever? Might be better to have a separate reports tool like there is in the editor, in a popup rather than trying to shoehorn it into the search + book_list view. |
03-19-2024, 06:41 AM | #5 | ||
Grand Sorcerer
Posts: 11,779
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
The "pro" is avoiding adding "stuff" to existing mechanisms. At first blush the "cons" are:
|
||
Advert | |
|
03-19-2024, 06:47 AM | #6 |
creator of calibre
Posts: 44,015
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The rest of calibre would still be available. You could pre-apply any VL or have a button to apply a new one. The popup would function like the existing browse notes or browse annotations popups that are maeant to be used alongside the main calibre window. The main con is its a lot more work to implement. But usage wise it would probably be easier to use.
|
03-19-2024, 10:01 AM | #7 | |
Grand Sorcerer
Posts: 11,779
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
There would be 2 query operators:
One possible modification is not to put the "sort" in the filter but instead to have a separate sort operator. In this case the expression would be
We would probably want to be able to save & load querys. It isn't clear to me that something like this is easier to use then embedding the filtering into the standard search expression. It does have the advantage that all the steps are explicit and allows the sort to change in the middle of the query. That in itself might make it (or something like it) preferable to embedding the filtering. |
|
03-20-2024, 12:01 AM | #8 |
creator of calibre
Posts: 44,015
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'd certainly be in favor of having *some* UI for this. The search language is complex enough as is, having expression builders helps. Ideally this would be a new tab in the existing advanced search dialog, but it may not work there given that is a modal meant only for build expression type operations.
|
03-20-2024, 07:15 AM | #9 | |
Grand Sorcerer
Posts: 11,779
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Assuming I go ahead with this, my goals are:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to create a reading list and add book to the list? | clearskyid | Library Management | 1 | 07-05-2021 12:32 PM |
Calibreserver issue using Book list mode/Custom list | fritskop | Server | 2 | 06-16-2020 01:20 PM |
Wish list -print option for book list | C-novice | Library Management | 3 | 04-16-2017 01:37 AM |
User CP - Options - exclude forum list - working? | derangedhermit | Feedback | 2 | 01-20-2013 12:18 AM |
Add more column options to book list | rgoulde | Calibre | 2 | 10-06-2009 08:03 AM |