Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-11-2016, 09:39 PM   #1
Trel
Connoisseur
Trel began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Jan 2010
Device: Onyx Boox Poke 3
Having problems with composite columns and save/send templates

I made two composite columns

saveseries
Code:
{series}/{series_index:0>2s|| - }{title} - {authors}
and
saveauthor
Code:
{authors_sort}/{title}
My send template is
Code:
{series:lookup(.,saveseries,saveauthor)}
With use subdirectories checked.

When I send, they're showing up as numbers only, which I'm assuming is calibre's internal index number for the book.

I'm not sure what I'm doing wrong here.
Trel is offline   Reply With Quote
Old 09-12-2016, 11:41 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,411
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Your send template must use the lookup names of the custom columns, which always begin with #. Example:
Code:
{series:lookup(.,#saveseries,#saveauthor)}
chaley is offline   Reply With Quote
Advert
Old 09-12-2016, 01:49 PM   #3
Trel
Connoisseur
Trel began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Jan 2010
Device: Onyx Boox Poke 3
Thanks, that looks like it worked.

I was thrown by the documentation ( https://manual.calibre-ebook.com/tem...send-templates )

Might be worth changing this section (anywhere to suggest this, as there's also an errant ' in there too)?

Quote:
1. Create a composite field (call it AA) containing {series}/{series_index} - {title'}. If the series is not empty, then this template will produce series/series_index - title.

2. Create a composite field (call it BB) containing {#genre:ifempty(Unknown)}/{author_sort}/{title}. This template produces genre/author_sort/title, where an empty genre is replaced with Unknown.

3. Set the save template to {series:lookup(.,AA,BB)}. This template chooses composite field AA if series is not empty, and composite field BB if series is empty. We therefore have two completely different save paths, depending on whether or not series is empty.
Changing
Code:
{series:lookup(.,AA,BB)}
to
Code:
{series:lookup(.,#AA,#BB)}

Last edited by Trel; 09-12-2016 at 01:54 PM.
Trel is offline   Reply With Quote
Old 09-12-2016, 02:38 PM   #4
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,411
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Trel View Post
I was thrown by the documentation ( https://manual.calibre-ebook.com/tem...send-templates )

Might be worth changing this section (anywhere to suggest this, as there's also an errant ' in there too)?
I fixed the example in the docs.
chaley is offline   Reply With Quote
Old 09-26-2016, 03:21 PM   #5
Trel
Connoisseur
Trel began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Jan 2010
Device: Onyx Boox Poke 3
Sweet, thank you.
Trel is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Library Closed Plugin] Save Composite Custom Columns chaley Plugins 22 04-11-2020 07:09 AM
composite columns only effect part of data Jade Aislin Library Management 2 04-13-2016 04:54 PM
Color coding and designing composite columns ElMiko Library Management 12 01-04-2015 08:55 PM
Composite column problem combining two tag type columns At_Libitum Recipes 1 08-29-2013 12:31 PM
composite custom columns sorted numerically Doug-W Library Management 2 02-18-2011 02:16 AM


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


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