View Single Post
Old 09-05-2022, 04:18 PM   #1
Jahlon
Member
Jahlon began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2022
Device: Kindle
Question about save to disk template

I have read about the calibre template language here but still am not sure how to do exactly what I want to do. I would like to write one template that will do the following:

If the book has a series:
{series}/{series_index:0>3s} - {title}/{title} - {authors}

but if the book has no series:
{author_sort}/{title}/{title} - {authors}

From reading about how to do conditionals, I have the following:
{series:||/{series_index:0>3s} - }{title}/{title} - {authors}

This will result in only books with series getting placed in a series subfolder, but I can't figure out how to do the "else", where when the book does not have a series it will instead get placed in an author subfolder. Is there any way to do this? Maybe it is obvious and I am just missing it...
Jahlon is offline   Reply With Quote