Quote:
Originally Posted by chaley
What exactly are you trying to do?
If you are trying to find a template language function that returns the number of (for example) epubs in the library, there isn't one. Template functions operate on individual books, not on a database.
If you are trying to find the number of formats for a specific book, then use the count function, as in {:'count(field('formats'), ',')'}.
|
I'm trying to export my books with the book formats as the top folder. my current template is:
{#supercat}/{tags}/{authors}/{title} - {authors}
what I want is something like:
{formats}/{#supercat}/{tags}/{authors}/{title} - {authors}
except I want a case where if there are multiple formats per book that a copy of each format gets placed in separate folders. Not where I would end up with folders like:
"EPUB, MOBI, TXT".
In a case like this, I want each book to get routed to:
EPUB/{#supercat}/{tags}/{authors}/{title} - {authors}
MOBI/{#supercat}/{tags}/{authors}/{title} - {authors}
TXT/{#supercat}/{tags}/{authors}/{title} - {authors}
Hope this is clear. I know I can get my hands dirty and write a custom script but I don't want to do so if there is an existing easier way of doing it.