View Single Post
Old 07-19-2013, 07:59 AM   #4
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,455
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Capricorn View Post
Hi Chaley,

Thanks for that tip. I did not know it worked in that sequence.

I changed the config of the device to:
{author_sort: shorten (80, -, 20)}/{title} - {series_index} {series}

and then I tried. What I found on the device, was a folder named "shorten_unknown function" with the epub file inside this folder.
So, it looks like the function "shorten" is not recognized or not valid for the parameter author_sort.
When I look at the help file http://manual.calibre-ebook.com/template_lang.html, to me, it looks like it should work. Or is my understanding still too limited? Or a bug or...?

Many thanks for any further info,
Capricorn
The problem is the space after the "shorten". Calibre assumes that it is part of the function name. Although this isn't really a bug, it is silly behavior and I will change it.

Remove the space and it should work. Also note that the spaces around the minus are significant -- they will be in the output.
chaley is offline   Reply With Quote