Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-24-2014, 04:54 PM   #1
Hampshire Nanny
Guru
Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.
 
Hampshire Nanny's Avatar
 
Posts: 614
Karma: 8064562
Join Date: Aug 2009
Device: Sony PRS-505, Kindle 3 KB, iPad2
Question on search syntax

I've created a set of tags to indicate where I obtained a particular eBook. These use the format of source:xxxx such as source:BaenFree, source:ProjectGutenberg, source:Mobileread, source:Fictionwise, etc.

I want to locate any books in the library that don't have a source tag. I can do this:

not tags:"=source:ArthurClassic" and not tags:"=source:Baen eBooks" and not tags:"=source:BaenFree" and not tags:"=source:Goodreads" and not tags:"=source:ManyBooks" and not tags:"=source:Mobileread"

But what I really want is a generic search. I tried

not tags:"=source:*"

but that didn't work. Obviously I don't know how to indicate a match for any and all characters. (And I have a suspicion that this has something to do with regular expressions which I simply don't seem to be able to understand.)
Hampshire Nanny is offline   Reply With Quote
Old 07-24-2014, 05:09 PM   #2
chaley
Grumpy old git
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: 9,309
Karma: 3007144
Join Date: Jan 2010
Location: UK
Device: Reader
Quote:
Originally Posted by Hampshire Nanny View Post
But what I really want is a generic search. I tried

not tags:"=source:*"

but that didn't work. Obviously I don't know how to indicate a match for any and all characters. (And I have a suspicion that this has something to do with regular expressions which I simply don't seem to be able to understand.)
Try
Code:
not tags:"~^source:"
which is a regular expression search saying find any tags not beginning with "source:". The star in your attempt is superfluous because you don't care what follows the colon. If you actually want to ensure that there is at least one character after the colon then use
Code:
not tags:"~^source:."
chaley is offline   Reply With Quote
Advert
Old 07-25-2014, 04:08 PM   #3
Hampshire Nanny
Guru
Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.
 
Hampshire Nanny's Avatar
 
Posts: 614
Karma: 8064562
Join Date: Aug 2009
Device: Sony PRS-505, Kindle 3 KB, iPad2
Quote:
Originally Posted by chaley View Post
Try
Code:
not tags:"~^source:"
which is a regular expression search saying find any tags not beginning with "source:". The star in your attempt is superfluous because you don't care what follows the colon. If you actually want to ensure that there is at least one character after the colon then use
Code:
not tags:"~^source:."
Chaley, thanks for responding. I have lots of conventional tags which don't start with "source:". Will your searches include those? (examples, "Science Fiction" "Biography")

What I really want is to find only the books that have no tag that starts with "source:". These books may or may not have other tags.
Hampshire Nanny is offline   Reply With Quote
Old 07-25-2014, 04:27 PM   #4
chaley
Grumpy old git
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: 9,309
Karma: 3007144
Join Date: Jan 2010
Location: UK
Device: Reader
Quote:
Originally Posted by Hampshire Nanny View Post
Chaley, thanks for responding. I have lots of conventional tags which don't start with "source:". Will your searches include those? (examples, "Science Fiction" "Biography")

What I really want is to find only the books that have no tag that starts with "source:". These books may or may not have other tags.
The rules aren't clear to me. Given the following books, what should happen?
  1. A book that has no tags.
  2. A book that has tags but no tags beginning with source:
  3. A book that has some tags that begin with source: and some tags that do not
  4. A book that has only tags beginning with source:
chaley is offline   Reply With Quote
Old 07-26-2014, 12:26 AM   #5
Hampshire Nanny
Guru
Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.Hampshire Nanny ought to be getting tired of karma fortunes by now.
 
Hampshire Nanny's Avatar
 
Posts: 614
Karma: 8064562
Join Date: Aug 2009
Device: Sony PRS-505, Kindle 3 KB, iPad2
Quote:
Originally Posted by chaley View Post
The rules aren't clear to me. Given the following books, what should happen?
  1. A book that has no tags. -- should appear in the search results
  2. A book that has tags but no tags beginning with source: -- should appear in the search results
  3. A book that has some tags that begin with source: and some tags that do not -- should not appear
  4. A book that has only tags beginning with source: -- should not appear
My goal is to identify any book that does not have a source attribute/tag. I want to know where every book came from and if I forgot to create the tag when I imported the book, I want to rectify that.

Thanks again for helping me out.
Hampshire Nanny is offline   Reply With Quote
Advert
Old 07-26-2014, 12:56 AM   #6
BetterRed
null operator
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: 16,481
Karma: 19147594
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Hampshire Nanny - why not
Code:
not tags:"source:"
My understanding is that would find all books that don't have a tag containing the string «source:»

It would exclude books that have a tag with «source:» in the middle or end of a tag, but do such tags actually exist in your library, e.g.
Code:
«tomato source: bottle»
«python source:»
«source:»
You can find the last with a search for
Code:
tags:"=source:"
BR

Last edited by BetterRed; 07-26-2014 at 12:59 AM.
BetterRed is offline   Reply With Quote
Old 07-26-2014, 03:03 AM   #7
chaley
Grumpy old git
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: 9,309
Karma: 3007144
Join Date: Jan 2010
Location: UK
Device: Reader
@Hampshire Nanny: The search I suggested in post 2 should do exactly what you want, find any book that does not have a tag beginning with source:.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Either/Or Search Syntax? PatNY Library Management 4 09-05-2013 06:15 AM
command line syntax for search filter cybmole Calibre 5 06-26-2013 07:55 AM
Need help with search syntax PatNY Library Management 6 05-20-2013 01:41 PM
search question Gregg Bell Sigil 11 04-03-2013 05:17 PM
Help with search syntax please. rwelbourn Library Management 3 04-16-2011 02:07 AM


All times are GMT -4. The time now is 04:11 PM.


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