|
|
Thread Tools | Search this Thread |
11-23-2010, 01:32 PM | #1 |
calibre/Sigil Developer
Posts: 4,617
Karma: 2124234
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Possible new feature: Adding a r/c menu option to add to user category items
I just "discovered" a use for a Calibre feature today ("Manage User Categories) to allow me to build various "lists" such as favourite authors etc, all very cool!
However I think the feature could be improved if you did not have to always go into the manage dialog to add to a user category. When you have a large database it is a bit painful to scroll up/down the list to find an author etc, plus it as not as convenient as a right-click on your library view could be. So I started playing with the source code and have a very simple working implementation with the user category hard-coded (i.e. works for me, if no-one else cares/wants it then no problem). However I could submit the changes as a patch if it was developed a bit further. There are various ways the context menu could be structured. From a user perspective I think the simplest to use (least clicks) would be for the user category name to appear as a sub-menu a bit like this: Code:
Add to user category ==> User Category 1 ==> Selected authors Selected series Selected tags Selected publishers User Category 2 ==> ... etc (1.1) interrogate the database, or (1.2) interrogate a cache, or (1.3) interrogate a tweak option value Option (1.1) is likely undesired for performance reasons, and option (1.3) might be considered too complex for users and prone to becoming out of date as users add/remove categories in the tag viewer. I would need some guidance to implement option (1.2) and also the issue with caches is of course knowing all the places they need to be refreshed. The alternative approach is to force the user through a popup dialog. Personally I hate popups where they can be avoided, but I can accept that in this situation if the above is unacceptable/undesired then it seems the only alternative. So the menu could look like this: Code:
Add to user category ==> Selected authors... Selected series... Selected tags... Selected publishers... (2.1) A simple popup list where the user chooses a category to add to (like remove format dialog), or (2.2) Re-use the existing Manage User categories dialog I would prefer option (2.1) here as a user I think though more work to code it. Option (2.2) would be possible by butchering the existing code a bit. For instance when the dialog is in this 'mode' rather than displaying "all" authors/tags/publishers etc on the LHS you restrict it to just data from the selected row(s). However the user would still need to first select the category, then select all the values on the LHS and the button to add them to your category. Lots more clicks, and more clicks suck imho. Anyone have any thoughts on this? Would love to see the feature or really not bothered? Guidance would be appreciated if someone would like to see it as a patch, or else it will just stay forever in my local copy of Calibre... |
11-23-2010, 01:39 PM | #2 |
Well trained by Cats
Posts: 29,703
Karma: 54369092
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I think what you are asking for is called "Saved Searches" (upper right)
Once made, you can use them as implied or to Restrict view: which allows you to still search within the restricted view. Management can be done in the Tag view window |
11-23-2010, 01:50 PM | #3 | |
calibre/Sigil Developer
Posts: 4,617
Karma: 2124234
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
What I do want to do is be able to build lists of series or authors that I intend to "revisit" in future. There is no meaningful "subset" that I could restrict my view to which reduces the authors down to a manageable level, given my favourite authors list for instance could include any one of them? I understand I "could" construct my lists as a saved search by building monstrous "or" expressions, however this is pretty nasty to maintain and I think the "user categories" feature is better suited? Or am I missing something? |
|
11-23-2010, 02:01 PM | #4 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Why not just tag the books for that author "FavoriteAuthor" then search for that tag or tag the books "FavoriteSeries" and then search for that tag (and save the search)? I tag with "ToRead" to indicate it's a specific book I want to read (later), but you can do it at the series or author level, instead of at the book level, if you prefer.
|
11-23-2010, 02:14 PM | #5 |
creator of calibre
Posts: 43,796
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
you can get the list of user categories by interogating
self.model().db.field_metadata see field_metadata.py for details |
11-23-2010, 02:26 PM | #6 | |
calibre/Sigil Developer
Posts: 4,617
Karma: 2124234
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
Similarly I am still trying to consolidate my various book collections into Calibre and are working through author by author to update metadata, resolve duplicates, find better formats, create wishlist books for missing entries etc. So I am recording per author that I am "done" with them. I was doing this in a spreadsheet, but instead adding these to a user category list will work better than adding yet more tags across every book? I think the tag viewer works well when you have a relatively small subset, which user categories allows you to make, and lets me drill into stuff with just a couple of clicks rather than typing search queries and sorting/scrolling through results to drill down to the same effect. Lots of ways to skin the cat, one of the great features of Calibre |
|
11-23-2010, 02:56 PM | #7 |
calibre/Sigil Developer
Posts: 4,617
Karma: 2124234
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Excellent, thanks for the heads up Kovid. I wasn't sure where field_metadata fit into the picture until I found that tag_view.py rebuilds the list of user categories in field_metadata when it's model is refreshed. Sound just what I was after, thanks.
|
11-23-2010, 03:31 PM | #8 | |
calibre/Sigil Developer
Posts: 4,617
Karma: 2124234
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
Problem (1) is that means if you add a new user category you won't see it in the menu until you restart. Not the end of the world given how rare you would add new ones. However the bigger problem (2) is that it "appears" that in the genesis method of the user action I don't have access to the model? I've tried a number of permutations such as self.model(), self.gui.model(), self.gui.library_view.model() but keep getting hit with AttributeError:'xxx' object has no attribute 'model'. I would presume that the model has not been initialised at the time the menus are created? Is there a plan B or is this approach scuppered? Apologies for being dense. |
|
11-23-2010, 03:43 PM | #9 |
creator of calibre
Posts: 43,796
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
use initialization_complete rather than genesis
|
11-23-2010, 04:48 PM | #10 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
To be sure I understand, you would select books, then you would right click, choose "Add to user category" which would expand to list all the created user categories , and you would choose one of the user categories, which would then expand to show these options: "Selected authors" or ... or "Selected series" or Selected Tags"? Behind the scenes, all the authors in all the selected books would be assigned to the selected user category if you chose "Selected authors"? Would you assign all the tags on all the selected books if you chose "Selected Tags"? |
|
11-23-2010, 06:38 PM | #11 |
calibre/Sigil Developer
Posts: 4,617
Karma: 2124234
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Job done - thanks very much to Kovid for the pointers.
Starson17 - yes that is exactly the behaviour. Depending on the sub-menu you select I build a unique list of authors/tags/series/publishers from the rows selected. Any that don't already exist in the user category are then added to it. As mentioned above the one minor issue is that you have to restart Calibre to get new user categories to appear in the menu but that is no big deal once you know that. I've attached a screenshot, and probably tomorrow submit it in a day or two as a patch in case anything else comes up or other suggestions arise. |
11-24-2010, 05:21 AM | #12 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Just curious, if someone hasn't created any "User categories" what will they see when they hover over the "Add to user category" menu?
|
11-24-2010, 05:57 AM | #13 | |
calibre/Sigil Developer
Posts: 4,617
Karma: 2124234
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
If someone has a better suggestion I'm all ears. |
|
11-24-2010, 06:50 AM | #14 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Looking at the screenshot, the top level talks about "Favourite Auth" but then point to Authors, Series, etc. Perhaps the nintermediate level should just be "Favourites" and "Processed" as it does not seem to be limited to Authors?
Let us know when the patch is available - I would be interested in downloading it and seeing how it works in more detail. |
11-24-2010, 06:56 AM | #15 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suggestion: Selecting a user-defined Category should show all of the books in it | Daemon | Calibre | 6 | 08-23-2010 01:19 PM |
Author category: feature request! | alexxxm | Calibre | 1 | 08-18-2010 07:21 PM |
Feature Request - Edit File Option | fcoulter | Calibre | 10 | 07-22-2010 12:56 AM |
Power Mode option in diagnostics menu? | scarab1 | Ectaco jetBook | 0 | 02-28-2010 10:59 PM |