Quote:
If I can create a whole bunch of templates, does that mean that I can create a lot of different versions based on the libaries I have?
|
Yes. This is something where you use the general program mode within the template language like I show in post #7
Quote:
I would much prefer a option like I posted yesterday with counting and then adding them to a folder called: Multiple Crossovers, that would make them much easier to find.
|
You can use the "Template program mode" - something like this:
Code:
program:
tmp1 = template('{#fandom_main:sublist(0,2,\,)} - {#fandom_secondary:sublist(0,2,\,)}/{author}/{title} ({#story_id})');
tmp2 = template('Multiple Crossovers/{author}/{title} ({#story_id})');
cmp(
count(
field('#fandom_main'),
','),
2,
tmp1,
tmp2,
tmp2)
tmp1 and tmp2 are two different templates (you can adust it like you need it). cmp compares two values and give in this case two different templates depending on count back. You need to use the function field() to use the values of the metadata. ',' is the separator for the values (change it to what you need, e.g. '&'). In this example the template 1 is used if count is less than 2.
Reference:
https://manual.calibre-ebook.com/gen...p-x-y-lt-eq-gt
https://manual.calibre-ebook.com/tem...l-program-mode