View Single Post
Old 11-26-2012, 08:32 AM   #7
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ousire View Post
i'm afraid i have no idea what any of that means

am i just supposed to replace the {series} with {:'series_sort()'} ? i tried that and got an error:
calibre, version 0.9.7
ERROR: Invalid template: <p>The template {:'series_sort()'}{series_index:0>2s| #| - }{title} is invalid:<br>'NoneType' object has no attribute 'series'

i really dont know anything at all about coding or templates, and the template program mode link made no sense to me
Sorry. In the end, templates are a program language.

Your assumption was correct. The exception is a bug. I have fixed that problem for the next calibre release. In the meantime, you can use the following template (in general program mode) that does the same thing but doesn't toss that error.
Code:
program: strcat(series_sort(), template('{series_index:0>2s| #| -  }{title}'))
chaley is offline   Reply With Quote