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 11-14-2023, 02:34 PM   #1
msel
Connoisseur
msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.
 
msel's Avatar
 
Posts: 71
Karma: 143132
Join Date: Sep 2010
Device: Kindle Keyboard 3G
Question {id} as template in Generate Cover

Hello,

i want to add the ID (the integer value) of a book to the cover. The lookup name is {id}. But when I add this value in a cover template I'll get an error:
EXCEPTION: Value: unknown field id

My template and the error message is attached.

Greetings, Maria
Attached Thumbnails
Click image for larger version

Name:	2023-11-14_20-27.png
Views:	105
Size:	93.6 KB
ID:	204699   Click image for larger version

Name:	2023-11-14_20-28.png
Views:	93
Size:	51.7 KB
ID:	204700  
msel is offline   Reply With Quote
Old 11-14-2023, 03:50 PM   #2
BetterRed
null operator (he/him)
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: 21,689
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I had problems with using {id}… can't recall exactly where, might have been in the book jacket. I never liked the column name 'id' anyway, so I created a virtual column called book_row/Book # and when I used it the problem went away.

Click image for larger version

Name:	Screenshot 2023-11-15 074023.jpg
Views:	66
Size:	63.1 KB
ID:	204701

BR

Last edited by BetterRed; 11-14-2023 at 08:23 PM.
BetterRed is offline   Reply With Quote
Advert
Old 11-14-2023, 09:34 PM   #3
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,296
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes database fields like id are not available for covers as covers need to be generated for standalone books as well, for example, when generating a cover for an epub without one on the command line.
kovidgoyal is offline   Reply With Quote
Old 11-14-2023, 10:08 PM   #4
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by msel View Post
Hello,

i want to add the ID (the integer value) of a book to the cover. The lookup name is {id}. But when I add this value in a cover template I'll get an error:
EXCEPTION: Value: unknown field id

My template and the error message is attached.

Greetings, Maria
There appears to be a workaround.

Create a custom column (I called mine 'fakeid'), 'Column built from other columns', with the template '{id}'.

Then use {#fakeid} in your cover template.

I'm using calibre 6.29 in Windows 10, 'Generate Cover' plugin is current.
kjdavies is offline   Reply With Quote
Old 11-14-2023, 10:29 PM   #5
BetterRed
null operator (he/him)
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: 21,689
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kjdavies View Post
There appears to be a workaround.

Create a custom column (I called mine 'fakeid'), 'Column built from other columns', with the template '{id}'.

Then use {#fakeid} in your cover template.

I'm using calibre 6.29 in Windows 10, 'Generate Cover' plugin is current.
The OP is using the built in Generate Cover tool… look at screenshots in post #1.

BR
BetterRed is offline   Reply With Quote
Advert
Old 11-14-2023, 10:36 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,997
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
FWIW I think this {id} on cover is a real bad idea.

There are things that trigger an ID change.
I used to include {id} in my file name, when all of a sudden updating a book got a different file ID than before and I had multiples of the (supposed) same book on my device.
theducks is online now   Reply With Quote
Old 11-14-2023, 10:53 PM   #7
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by BetterRed View Post
The OP is using the built in Generate Cover tool… look at screenshots in post #1.

BR
Indeed, I did as well (but didn't say so, oops).
kjdavies is offline   Reply With Quote
Old 11-14-2023, 10:58 PM   #8
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by theducks View Post
FWIW I think this {id} on cover is a real bad idea.

There are things that trigger an ID change.
I used to include {id} in my file name, when all of a sudden updating a book got a different file ID than before and I had multiples of the (supposed) same book on my device.
I concur. I move files between libraries fairly frequently (faster to move a thousand files to a working library for cleanup and move them back to my bigger library when done than it is to do cleanup in place) and get new IDs all the time. For similar reasons I don't link books, either.

However, we were asked 'is this a good idea?', but 'how can I do this?'.

"I didn't ask 'how big is the room?', I said 'I cast fireball'."

People who pay me ignore my advice on best practice (and I have been paid a lot fixing these situations), so I no longer judge... besides, I have enough weird questions of my own to try to talk someone else out of theirs.
kjdavies is offline   Reply With Quote
Reply

Tags
exception, field, unknown, {id}


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove cover or generate default cover in content server ilovejedd Server 2 09-24-2018 11:02 AM
Generate cover? MikeKReader Calibre 4 04-16-2017 09:21 PM
0.9.5 Generate Cover plugin pbw Plugins 2 11-03-2012 10:45 AM
Generate cover Schaapje82 Calibre 13 09-05-2010 12:02 PM
Generate Cover Mythlandia Calibre 27 06-27-2010 08:02 PM


All times are GMT -4. The time now is 08:50 AM.


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