I am trying to get my files to save to template using a hierarchy tag structure.
So, example, say I have a recipe book, it would like like this in Calibre:
Title: Favourite Recipes
Author: Various Authors
Tag:600 Technology.640 - Recipes
Fiction:Non-Fiction (Custom column)
and
Title:IT
Author:Stephen King
Tag:800 Literature
Fiction:Fiction
I am trying to save these to disk using a template to split the fiction and non-fiction.
So far, I have got the following:
Code:
program:
middle = contains(
field('#fiction'),
'Non-Fiction',
strcat(field('tags'),"/",field('title'),' - ',field('author'),""),
strcat(field('author_sort'),'/',field('title'))
);
strcat(field('#fiction'),'/',middle)
but, it would be nice to be able to split the tags into a folder structure, eg.
- Non-Fiction\600 Technology\640 - Recipes\Favourite Recipes - Various Authors
- Fiction\King, Stephen\IT
I've tried playing around with
{tags:subitems(0,1)||/} but I just cannot get it to work.
Any help would be appreciated.