View Single Post
Old 11-22-2022, 03:35 PM   #1
JLC42
Member
JLC42 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2022
Device: Kobo Aura One
Question How to achieve this via 'save to disk' in Calibre?

When I save a book to my device I want the save template to output the filename as such:

Author - Title (Book X)

Example: Stephen King - The Two Dead Girls (Book 1)

I currently have the following template:
Code:
{authors} - {title:re(:, - )}
I want to add a field so that if a book is in a series (only if it's part of a series) will add the paratheses followed by the word book and then the actual number book.

If I do:
Code:
{authors} - {title:re(:, - )} (Book {series_index:>3s})
The filename would output as:

Stephen King - The Two Dead Girls (Book 1)

But if I save to disk a book that isn't in a series I would get the following:

Stephen King - Billy Summers (Book )

How can I get the template to put "(Book X)" only if the book is listed in a series?
JLC42 is offline   Reply With Quote