View Single Post
Old 05-06-2025, 04:45 PM   #324
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,460
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
the lookups are case-sensitive? Did not know.
They can be. As said in the calibre API and error dialogs:
Quote:
The lookup name must begin with a '#'. All remaining characters must be lower case letters, digits or underscores. The character after the '#' must be a letter. The lookup name must not end with the suffix '_index'.
There may be some cases such as search that aren't case sensitive, but I would be astonished if that is true in very many places.

For example, this python template works:
Code:
python:
def evaluate(book, context):
	db = context.db.new_api
	return str(db.field_for('tags', book.id))
This one doesn't:
Code:
python:
def evaluate(book, context):
	db = context.db.new_api
	return str(db.field_for('Tags', book.id))
chaley is offline   Reply With Quote