|
|
Thread Tools | Search this Thread |
04-08-2013, 06:15 AM | #1 |
Grand Sorcerer
Posts: 11,932
Karma: 7208979
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Question: addition of "virtual libraries" (was "base search restriction")
I am considering adding a new variant of search restriction and would appreciate comments on the idea.
A common need I have is to operate on subsets of my library as "virtual libraries". For example, I want to look at "unread" books as a virtual library, having all operations such as searches see only these books. This is why I originally added search restrictions to calibre way-back-when. However, from time to time I want to apply a restriction on the virtual library, for example to operate on a particular genre of unread books. Restrictions can to this as well, but it is a bother to create the search (current_restriction AND #genre:foo) and then apply it as the current restriction. Also, some plugins use restrictions, and because they change the restriction it is hard to get them to operate on a restricted set of books. The new feature I am considering might be called a "base restriction". You would set this restriction somehow, and from that point it would be automatically ANDed with any temporary search restriction entered in the current restriction box. The net effect would be to move the idea of "virtual library" a bit further down into calibre, permitting you to set it then use all of calibre including restrictions without worrying about whether you are still seeing only the virtual library. The questions: 1) Am I the only one who has this need? If very few people have the need then it is not worth adding visible complexity to calibre to support it. 2) Would it be acceptable to set the "base restriction" in preferences -> behavior, near where the startup restriction is set? I am very leery of taking screen real estate for what is a rather esoteric capability. 3) Should the setting be persistent, surviving calibre restarts? I don't need this, but ... 4) How should the GUI show that a base restriction has been set? Is using the current coloring of the "(N of M)" information sufficient? (It is for me.) 5) Any other comments? EDIT: The feature has been added and a beta is available. See this post for the beta. Post 12 provides an overview of what it looks like. Last edited by chaley; 04-14-2013 at 03:08 AM. |
04-08-2013, 06:52 AM | #2 |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Being able to set a restriction to a already set virtual library may come in handy and seems to be a natural extension of the feature.
I always have my library open to a restricted view and possibly if working on a project having a persistent 2nd level restriction might be of use. Possibly changing the first restriction from Restrict to to Virtual Library (I think naming the dropdown list Virtual Library would be more descriptive of its use) and have the second level restriction referred to as Restrict to or Restricted view. As long as you find value in this I do not think it increases the complexity of this feature beyond its current level. It is one of those things I may not use often but will be nice to have when the urge hits me. Looking forward to changes you may implement. Last edited by DoctorOhh; 04-08-2013 at 06:55 AM. |
Advert | |
|
04-08-2013, 06:56 AM | #3 |
creator of calibre
Posts: 44,333
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you want to do this, I suggest going the whole hog and creating virtual libraries. Create a submenu in in the popup menu of the calibre button (the one used to switch libraries), which can have entries that look like:
Code:
Virtual libraries -> Create a virtual library Remove virtual library _____________ Virtual sub-library 1 Virtual sub-library 2 ... A good place to indicate the use of a virtual library is the title bar. Currently it reads || library name || you can change that when switching virtual libraries to something like || library name :: virtual library name || |
04-08-2013, 07:02 AM | #4 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
I'm not doing the work so a +1 is easy for me to get behind, but as it stands now the restrict to virtual libraries are the best, least used feature of calibre. Changing the presentation and the implementation as suggested would be a great step in having everyone get the most out of this great feature. |
|
04-08-2013, 07:07 AM | #5 | ||||
null operator (he/him)
Posts: 20,929
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I think I'd use it, but not high priority Quote:
Quote:
I wish all Restrictions could be flagged as persistent Quote:
BR Last edited by BetterRed; 04-08-2013 at 07:24 AM. Reason: error correction & grammar |
||||
Advert | |
|
04-08-2013, 07:08 AM | #6 |
creator of calibre
Posts: 44,333
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Oh and in case it wasn't clear, I am advocating that the current restrictions behavior become the "base" restriction, while the new feature becomes the easily switchable one. In particular, there is no need to persist the virtual library across a restart and no need for another setting to specify that a library always open with a given virtual library. Both of those are possible with the current restrictions feature, so they dont need to be duplicated.
|
04-08-2013, 07:15 AM | #7 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
But as I said easy for me to speak since I won't be doing the work. |
|
04-08-2013, 07:20 AM | #8 |
creator of calibre
Posts: 44,333
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It doesn't really matter which is the base and which isn't. The actual operation is an AND, which is order independent.
In particular you would be able to use virtual libraries without using restrictions and vice versa. The question really is whether virtual libraries need to have the same set of persistence features as restrictions, namely, specifying a VL at startup, and perhaps for the content server as well. Certainly, I imagine VL will become the primary way to use search restrictions in calibre. The restrict to dropdown will only be used when an additional level of restriction is needed. |
04-08-2013, 07:23 AM | #9 | |
Grand Sorcerer
Posts: 11,932
Karma: 7208979
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Assuming we use your suggestion and add virtual libraries to the library menu: what is the relationship between - a virtual library and the current preferences -> behavior -> restriction at startup? - what is in the restrictions box and the current preferences -> behavior -> restriction at startup? - what is in the restrictions box and the virtual library menu? Currently a startup restriction is shown in the "restrict to" box. That means that the startup restriction can (and does) go away frequently, which tells me that it is not a "virtual library". Are you suggesting that the startup restriction no longer populate that box, but instead be added (somehow) to the virtual libraries that the user can choose from? |
|
04-08-2013, 07:24 AM | #10 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Sounds great! |
|
04-08-2013, 07:29 AM | #11 |
creator of calibre
Posts: 44,333
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In fact thinking about it some more, regarding the UI, we can probably get rid of the Restrict to dropdown and replace it with a button that says
"Virtual library" When clicked the button pops up a menu with the choices I described below, in addition, an extra submenu that says "Additional restriction" which will allow the use of the current restrict to feature. That will make the feature more discoverable, as opposed to putting it inside the library menu. In such a case Doctor-Ohh is right and the VL feature should become the "base". i.e. it should be used in Preferences->Behavior and in the content server. |
04-08-2013, 07:39 AM | #12 |
creator of calibre
Posts: 44,333
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Too many posts
Here's my updated proposal, disregard everything in my previous posts: Name the feature Virtual Libraries The UI Replace the Restrict to dropdown with a new button that says "Virtual Libraries" This button when clicked will popup a menu with the entries: Code:
Create VL Remove VL Additional restriction -> same as current restrict to popup _____ VL 1 VL 2 No VL If an "additional restriction" is applied it is also indicated in the title bar as || library name :: VL name :: restriction name || The current (m of n ) labels shows m of n where n is the number of books in the fully restricted library, i.e. with VL and additional restriction (if any) applied. The startup option should be changed to using a VL, which is indicated in the title bar as before. There are probably some wrinkles to work out with this proposal. EDIT: A VL should not depends on saved searches, that is, it should allow the use of simple searches. A VL is defined as (friendly name, search). The friendly name will be used in the UI (titlebar/menus/etc.) Last edited by kovidgoyal; 04-08-2013 at 07:45 AM. |
04-08-2013, 07:58 AM | #13 |
null operator (he/him)
Posts: 20,929
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Virtual Library sounds like marketing jargon to me.
The manual uses the word Filter in a similar context on command line switches I suggest the terms Primary and Secondary Filter be used, then there is little doubt as to which comes first (takes precedence) and what's being done - "filtering' - as in selecting the books that meet the criteria - nothing virtual about that, it's real. BR Last edited by BetterRed; 04-08-2013 at 08:19 AM. |
04-08-2013, 08:23 AM | #14 | |
Grand Sorcerer
Posts: 11,932
Karma: 7208979
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The change can be fully compatible with existing code and plugins if the "virtual library" button is put on the tool bar (either a new button or an addition to the library button) instead of replacing the existing combo box, or if both the button and the combo box are on the main gui. |
|
04-08-2013, 09:18 AM | #15 |
creator of calibre
Posts: 44,333
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@chaley: Thanks to the dynamic nature of python, maintaining compatibility is easy. We just create a dummy object that exposes the same API (a minimal subset) as the current combobox object and get the actual restriction from the new code.
@BR: Filtering is used to denote filtering the current book list alone, not the entire library, which a restriction does. Restrictions are not filters. And one of the motivations for this change is to make this feature both easier to discover and describe. Virtual library meets both those goals. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Sharpness" and "Kobo Styling" question? | EldRick | Kobo Reader | 3 | 11-19-2012 09:25 AM |
Question about disable indexing permanently by disabling access to "Search Indexes" | WS64 | Kindle Developer's Corner | 1 | 12-17-2011 05:51 PM |
E-Books Achat d'E.books & "restriction géographique" | choup | Forum Français | 112 | 07-19-2010 11:52 AM |
Question - Does iLiab have the "search" & "annotation, highlighting" features? | HiSoC8Y | iRex | 5 | 07-01-2009 04:37 PM |