View Single Post
Old 09-19-2014, 06:36 AM   #576
DMee
Zealot
DMee began at the beginning.
 
Posts: 116
Karma: 10
Join Date: Jun 2011
Location: Stockport, UK
Device: ipad, iphone, kindle
Quote:
Originally Posted by eschwartz View Post
Ah, yes.

The brackets are reserved in template mode. That's why I like general program mode. Well, that and you can limit yourself to only using one custom column.

Use the general program mode version found here: http://manual.calibre-ebook.com/temp...l-program-mode
Simply fix the "stripped" variable.
Getting there :-)

I changed formulas to

stripped = re(field('series'), '^(A|The|An)\s+', '');
shortened = shorten(stripped, 8, '-' ,6);
initials = re(stripped, '[\s]?([^\s]{1,3})[^\s]+(\s|$)', '\1');

But summats wrong

Worlds Without End
becomes
WorWitEn

Missing "d"?
Also is it poss to have it as

Wor-Wit-End

Also, is it feasible to add in the code we rejigged when doing series with fractions? you had a prog to decide which formula to use to reformat the series link properly depending on size of highest number and presence of fractions :-)
DMee is offline   Reply With Quote