Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 01-09-2014, 11:13 PM   #16
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,079
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Chris_Snow View Post
Okay...I used this first
Code:
#r2ryesno:"true" and #yesnoread:"false" and #yesno:"true"
and it seems to return what I wanted. That is...the book is ready to read...I haven't read it...and yes, it's on my reading list. Great!

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
In fact, I haven't been able to get any of them to work using yes or no expressions.



Can someone explain how (or where?? ) I use these variables. You're right, they are easier to understand.

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?
not #yesno:true would be UNASSIGNED or False if you have use tristate mode tweak set

{#yesno} is how any custom column is used in a template . Agreed, you would probably do more processing BASED upon the Logical value
theducks is offline   Reply With Quote
Old 01-09-2014, 11:21 PM   #17
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,745
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@theducks and davidfor - syntaxes all of us, so I prefer to fill in the form - see attachment

Chris_Snow - hit the blue button in Prefs->Custom Column with the 'i' to change the names

the value of the blank in a three value yes/No column is 'empty' as in

Code:
not #in_reading_list:"empty" - i.e. then it must be Y or N
#in_reading_list:"empty" - i.e no value, blank, null
BR
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	147
Size:	94.3 KB
ID:	117781  

Last edited by BetterRed; 01-09-2014 at 11:29 PM. Reason: replace attachment
BetterRed is online now   Reply With Quote
Advert
Old 01-10-2014, 12:20 AM   #18
Chris_Snow
Zealot
Chris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipse
 
Posts: 148
Karma: 8170
Join Date: Jul 2013
Device: kobo glo
Quote:
Originally Posted by davidfor View Post
In what way didn't it work? Did you see an error or didn't it show the books you expected? If the latter, are you sure there are books that match the condition? For this sort of thing, I usually build up the query one step at a time. That way I can check from a previous query if there are results that should be on the next.

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.



From memory, the only way to get the blank is with the "false" comparison. So, "#r2ryesno:false". Or, for the books that have not been assigned to any of the lists:

Code:
#r2ryesno:false and #yesnoread:false and #yesno:false
Okay...I didn't get an error, but calibre popped up a dialog box that said something like...
"The search found no books, so the calibre library will be empty. Do you really want to use that search?"
This is telling me that the expression isn't working. The first one I used (with true and false) seemingly returns the correct books.

I think trying them one at a time is a good pointer. I give it a go now.
Chris_Snow is offline   Reply With Quote
Old 01-10-2014, 12:36 AM   #19
Chris_Snow
Zealot
Chris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipse
 
Posts: 148
Karma: 8170
Join Date: Jul 2013
Device: kobo glo
Okay...seems I sussed out the problem...and as usual it was user error - doh!!!

It was the "Read" field that was causing the issue.I was using the
Code:
#yesnoread:no
expression when none of the books I haven't read are marked "no" - they just have a blank space.

So I used the
Code:
#yesnoread:false
and that returned as expected. This makes sense if false means a field unassigned (blank space)

Seems all the geek-speak got the neurons firing on my end!!

Really appreciate all the help. Thx very muchly. Lots of your pointers show me other areas of the program to start investigating.
Chris_Snow is offline   Reply With Quote
Old 01-10-2014, 02:43 AM   #20
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by davidfor View Post
Quote:
And...is NOT the expression for the blank space?
From memory, the only way to get the blank is with the "false" comparison. So, "#r2ryesno:false". Or, for the books that have not been assigned to any of the lists:

Code:
#r2ryesno:false and #yesnoread:false and #yesno:false
Just for completeness ...

The empty value is usually referred to as "undefined".

There are several ways of searching for combinations of the three values normally found in yes/no columns, described in the manual. However, the text currently in the manual isn't quite correct. I have changed it to be:
Quote:
Yes/no custom columns are searchable. Searching for ``false``, ``empty``, or ``blank`` will find all books with undefined values in the column. Searching for ``true`` will find all books that do not have undefined values in the column. Searching for ``yes`` or ``checked`` will find all books with ``Yes`` in the column. Searching for ``no`` or ``unchecked`` will find all books with ``No`` in the column. Note that the words ``yes``, ``no``, ``blank``, ``empty``, ``checked`` and ``unchecked`` are translated; you can use either the current language's equivalent word or the English word. The words ``true`` and ``false`` and the special values ``_yes``, ``_no``, and ``_empty`` are not translated.
The changes were to note that the English words are always available and that the special value "_empty" exists.
chaley is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 06:14 PM.


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