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 10-16-2022, 01:25 AM   #1
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Template search: book_producer metadata

Hi all!

I'd like to do a template search for """book_producer""" containing "^calibre" with (formats:#=1 and formats: pdf). As shown in Calibre manual, that publication metadata field is available:
Click image for larger version

Name:	MWSnap0841 2022-10-16, 02_15_31.png
Views:	112
Size:	65.8 KB
ID:	197191

This thread provides some examples (https://www.mobileread.com/forums/sh...d.php?t=347884) however i couldn't figure how to do write that query.

Screenshot below shows what I tried, but that was just guesswork:
Click image for larger version

Name:	MWSnap0838 2022-10-16, 02_06_55.png
Views:	101
Size:	30.5 KB
ID:	197192
Any help is appreciated.
Comfy.n is offline   Reply With Quote
Old 10-16-2022, 08:33 AM   #2
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,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
Hi all!

I'd like to do a template search for """book_producer""" containing "^calibre" with (formats:#=1 and formats: pdf). As shown in Calibre manual, that publication metadata field is available:
Attachment 197191

This thread provides some examples (https://www.mobileread.com/forums/sh...d.php?t=347884) however i couldn't figure how to do write that query.

Screenshot below shows what I tried, but that was just guesswork:
Attachment 197192
Any help is appreciated.
In both my production library and test library, "book_producer" is always empty. Do you have an example where it isn't? If so, what does it contain?

Last edited by chaley; 10-16-2022 at 09:00 AM.
chaley is offline   Reply With Quote
Advert
Old 10-16-2022, 01:51 PM   #3
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
In both my production library and test library, "book_producer" is always empty. Do you have an example where it isn't? If so, what does it contain?
I can retrieve its value from CLI, with ebook-meta. Most pdf files have a value set:

Click image for larger version

Name:	MWSnap0846 2022-10-16, 14_45_41.png
Views:	65
Size:	6.1 KB
ID:	197202

I have attached pics showing the values I'd like to filter, and two pdf files that contain the book-producer value.
Attached Thumbnails
Click image for larger version

Name:	MWSnap0845 2022-10-16, 14_32_44.png
Views:	61
Size:	56.8 KB
ID:	197203   Click image for larger version

Name:	MWSnap0844 2022-10-16, 14_32_22.png
Views:	53
Size:	67.8 KB
ID:	197204  
Attached Files
File Type: pdf tmp2.pdf (673.1 KB, 40 views)
File Type: pdf tmp1.pdf (1.72 MB, 36 views)
Comfy.n is offline   Reply With Quote
Old 10-16-2022, 02:58 PM   #4
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
In both my production library and test library, "book_producer" is always empty. Do you have an example where it isn't? If so, what does it contain?
Ah, I think I see. I tried creating a custom column with {book_producer}, but it seems that's not a searchable field.

Welp. I could see many uses for that search, if it were doable.. (and I was pretty sure it was)
Comfy.n is offline   Reply With Quote
Old 10-16-2022, 03:28 PM   #5
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,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
Ah, I think I see. I tried creating a custom column with {book_producer}, but it seems that's not a searchable field.

Welp. I could see many uses for that search, if it were doable.. (and I was pretty sure it was)
I thought that might be the case. I looked through the code and found many references to the field when processing OPFs during import and conversion but I couldn't find anywhere where it was stored into calibre's database. As you say, "welp".

In the future, you can use the template dialog to do similar tests rather than create a column. This saves updating last_modified and triggering the backup.
chaley is offline   Reply With Quote
Advert
Old 10-16-2022, 03:50 PM   #6
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post

In the future, you can use the template dialog to do similar tests rather than create a column. This saves updating last_modified and triggering the backup.
Noted! That would be another question I've been wanting to ask. been seeing more than usual updates to last_modified, and couldn't figure what was triggering those.
Comfy.n is offline   Reply With Quote
Old 10-16-2022, 09:44 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
book_producer is epub specific metadata, it's not in the standard set of builtin fields calibre supports in its database. It's present in the Metadata cclass because calibre sets it in epub files in various scenarios.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Template Search: Exact matching ownedbycats Library Management 3 04-03-2022 05:01 PM
Template: Converting a search & replace into a template ownedbycats Library Management 11 03-26-2021 04:32 AM
Bulk metadata Search/Replace: template function question meghane_e Library Management 3 01-24-2019 09:32 PM
template or search feature question bulldogmo Calibre 2 08-06-2014 06:34 PM


All times are GMT -4. The time now is 05:25 AM.


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