View Single Post
Old 05-29-2011, 05:20 PM   #3
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,465
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by captpete View Post
first, Calibre saves books to the Genre directory, creates the sub-grenre directory and then saves the book in a series directory in the Genre directory - not in the sub-genre directory;
Nice to see someone trying to use subitems. I wasn't sure that anyone cared.

Your template says to create a directory named by the genre, then create a directory named by the series inside that directory. Your text implies that you want a directory named by genre, then another directory named by subgenre, then the series.

To do what I think your text says (combined with Manichean's suggestion), try
Code:
{#genre:subitems(0,1)||/}{#genre:subitems(1,2)||/}{series}/{author_sort}_{series}{series_index:>3s|| }{title}
This template should create a directory for the top-level genre if it exists, create a second level for a second-level genre if it exists, then the series if it exists, and so on.

FYI: the template editor in the next release shows a preview of the value produced by the template for the current book (the book selected before editing the template).

One way to play with templates with far less pain is to create a 'play' composite column (column made from other columns), then use F2 to edit the template for this column. No send-to-device or restarts are required, and you see the results immediately on the library view. F2 opens the template editor. Once you are happy, delete the column or (what I do) hide it.
chaley is offline   Reply With Quote