![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 148
Karma: 8170
Join Date: Jul 2013
Device: kobo glo
|
Adding Two or more Search expressions into one - how?
Greetings,
I have a couple of virtual libraries setup to return a certain set of books. They are pretty basic using two custom columns 1 = Reading List (SE = #yesno:yes) 2 = Ready2Read (SE = #r2ryesno:yes) There is also a column 3 = Read (SE = #yesnoread:yes) They are all columns that show a tick, a red circle x, or a blank space as an option. Now what I'd like to achieve is to alter the above so that when I use the "Ready2Read" virtual library, it will still use the current expression (#r2ryesno:yes), but also Reading List = No and Read = No. I've tried all sorts of things, but I can't get it to work. These expression things are tough for an old-boy like me ![]() ![]() Much appreciated. (This is by far the hardest part of calibre of me) ![]() |
![]() |
![]() |
![]() |
#2 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
#r2ryesno:yes and #yesno:no and #yesnoread:no
A cool thing you might not be aware of is the ability to search using the tag browser (click once, and it matches the field, click twice and it matches everything BUT the tag) and chain your searches!!! If you hold down Ctrl while you select elements in the tag browser, the search will be constructed to match all elements. There is a button on the bottom, "Alter Tag Browser". It will let you switch between "Search type when selecting multiple items" - "match any of the items" and "match all of the items" |
![]() |
![]() |
![]() |
#3 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
All you really need to do is use the word "and" to require both searches. The search box uses boolean operators.
|
![]() |
![]() |
![]() |
#4 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
(#r2ryesno:"true") and (#yesno:"false") and (#yesnoread:"false")
IMO the parentheses make it easier to read From another old boy - you'll probably find it a lot easier to if you change the name of those variables to in_reading_list, ready_to_read and have_read Last edited by BetterRed; 01-09-2014 at 08:05 PM. |
![]() |
![]() |
![]() |
#5 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#6 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
![]() |
![]() |
![]() |
#7 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 148
Karma: 8170
Join Date: Jul 2013
Device: kobo glo
|
Hey Guys...I thought this was an English forum
![]() ![]() Thx for the help. I'll try some of these suggestions and see how I go. I have fairly basic needs as far as calibre goes, but with each little thing I learn, I realise it can do so much more. Knowing what to do with it all is also something I have to think about. I don't use the tag browser, but maybe I need to give it another look? Off to try the formulas. Once I see how the expressions are grouped and used, I can usually suss things myself. Thx. Edit: One more thing...what do you use to call the blank space? (They are all columns that show a tick, a red circle x, or a blank space as an option.) Last edited by Chris_Snow; 01-09-2014 at 09:23 PM. |
![]() |
![]() |
![]() |
#8 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#9 | |||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Code:
#r2ryesno:true Code:
#r2ryesno:no or #r2ryesno:yes Quote:
![]() Code:
#r2ryesno:yes and (#yesno:no and #yesnoread:no) Code:
#r2ryesno:yes and not (#yesno:yes or #yesnoread:yes) Code:
#r2ryesno:false and #yesno:false and #yesnoread:false Quote:
Last edited by davidfor; 01-09-2014 at 10:39 PM. Reason: Had some quotes where they shouldn't have been in the searches. |
|||
![]() |
![]() |
![]() |
#10 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
it is: true
not "true" The former is a logical the later is a string (word) |
![]() |
![]() |
![]() |
#11 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 148
Karma: 8170
Join Date: Jul 2013
Device: kobo glo
|
|
![]() |
![]() |
![]() |
#12 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
|
![]() |
![]() |
![]() |
#13 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 148
Karma: 8170
Join Date: Jul 2013
Device: kobo glo
|
Okay...I used this first
Code:
#r2ryesno:"true" and #yesnoread:"false" and #yesno:"true" But with the expressions that were stated later in the thread I found they didn't work - eg Code:
#r2ryesno:yes and #yesnoread:no and #yesno:yes Quote:
I've realised my original problem was that I wasn't using the "and" part of the expression, but I'd like to get this yes/no working if I can. And...is NOT the expression for the blank space? |
|
![]() |
![]() |
![]() |
#14 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
![]() |
![]() |
![]() |
#15 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
So, I would start with "#r2ryesno:yes". Then change to "#r2ryesno:yes and #yesnoread:no" before going to the final query. If that didn't seem to work, I would try "#r2ryesno:yes and #yesno:yes" and look through the list for what should have matched the full query. Quote:
Code:
#r2ryesno:false and #yesnoread:false and #yesno:false |
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search expressions | icychocolatechip | Library Management | 6 | 06-14-2013 01:17 AM |
Adding books - need help with regular expressions | tweebee | Library Management | 10 | 08-05-2011 08:58 PM |
Adding private commands to the search bar | Leeron | Kindle Developer's Corner | 8 | 07-07-2011 02:53 AM |
adding paragraphs marks in search/replace | bobcdy | Sigil | 5 | 06-12-2011 05:18 PM |
Custom Regular Expressions for adding book information | bigbot3 | Calibre | 1 | 12-25-2010 06:28 PM |