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 07-14-2022, 09:39 AM   #1
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,362
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Small changes to Library Search

The following changes are in calibre 6.1:
  • "Super-quoting" of strings. Getting the backslashes right when doing regex and template searches can be difficult. To fix that you can now "super-quote" a string using a pair of triple quotes ("""text"""). A super-quoted string is used unchanged. No escape processing is done. Examples
    • #authors:"""~(\[editor|translator\])""" -- find books with the words 'editor' or 'translator' in brackets. The backslashes to escape the brackets don't need to be doubled.
    • template:"""program: book_count('tags:^"' & $series & '"', 0) != 0#@#:n:1""" -- find books with the series name contained in tags of any book. The single and double quotes in the template don't need double escaping. NB and for completeness: the search below will find books with the series name in its own tags instead of in any tag in the library:
      template:"""program: if $series && $series inlist $tags then 1 fi#@#:n:1"""
    Super-quoting works with all search types so you can use it when you would otherwise need double escapes.

    Programmers might know this syntax as "docstrings"
  • Change the template part of the advanced search dialog to use super-quoting.
  • Pass some of the currently selected books to the template editor available from the template section of the advanced search dialog. This helps debug the templates without needing to run the search.

Last edited by chaley; 07-16-2022 at 04:26 AM. Reason: Added more explanation
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Library search ctop KOReader 4 01-27-2021 08:55 PM
Search library and ondevice AlanB Library Management 4 07-22-2018 01:53 PM
Across library search with context Naddesh ePub 3 04-10-2017 11:09 AM
search within all books in library occum Calibre 2 12-05-2012 02:00 PM
Classic Search the Library? drzenitram Barnes & Noble NOOK 8 08-04-2010 02:02 PM


All times are GMT -4. The time now is 06:40 AM.


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