View Single Post
Old 03-17-2011, 10:51 AM   #1
mobichuck
Member
mobichuck began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Nov 2010
Device: Kindle 2
Equality searches via the calibredb 'list' option

I'm working on some scripting glue to help me maintain my library, and running into some problems automating Calibre via the calibredb command-line program.

I'm wanting to implement equality (instead of the default 'contains') searching via 'calibredb list' (using -s), but I can't get it to work like I think it should.

I have two books, "The Twins", and "Time of the Twins".

In the Calibre GUI, if I enter this search criteria:

Code:
title:"=The Twins"
I get what I would expect: the single book that exactly matches "The Twins", and "Time of the Twins" is left out.

But when I try and do this via the command-line, like so:

Code:
calibredb list -s title:"=The Twins"
I get NO results back. If I remove the equality indicator, it returns BOTH "The Twins" and "Time of the Twins", which isn't what I want. Ie:

Code:
calibredb list -s title:"The Twins"
works, but is a 'contains' search.


Can anybody tell me what I might be doing incorrectly?

FWIW: I'm trying to see if a book already exists; if it does, I want to get the ID. I have the exact title and author available for my search.
mobichuck is offline   Reply With Quote