Thread: custom export
View Single Post
Old 10-11-2011, 06:39 AM   #6
iomari doesn't litteriomari doesn't litter
iomari's Avatar
Posts: 139
Karma: 100
Join Date: Aug 2003
Location: Nigeria
Device: galaxy tab
Originally Posted by chaley View Post
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:


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.
iomari is offline   Reply With Quote