View Single Post
Old 09-30-2010, 02:27 PM   #178
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,463
Karma: 10684861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
I really like the template language and conditional fields.

You might consider adding another example to the documentation
Code:
{author_sort}/{series}/{series}{series_index:0>3s|[|] - }{title} - {authors}
so the result would be
Code:
Asimov, Isaac/Foundation series/Foundation series[001] - The Foundation - Isaac Asimov
This example demonstrates that you can use conditional prefix, suffix with formatting of the series number
I was trying to test how some ... aehm ... not-very-obvious ... combinations in Templates work ;-)


Also, there seems to be a typo in documentation
Quote:
If a particular book does not have a particular piece of metadata, the field in the template is automatically removed for that book. Consider, for example:

{author_sort}/{series}/{title} {series_index}

If a book has a series, the template will produce:

{Asimov, Isaac}/Foundation/Second Foundation - 3

and if a book does not have a series:

{Asimov, Isaac}/Second Foundation

(calibre automatically removes multiple slashes and leading or trailing spaces).
- extra {} around author in the result
- extra space dash space ' - ' in the result between 'Second foundation' and series number.

Last edited by kacir; 09-30-2010 at 02:33 PM.
kacir is offline   Reply With Quote