View Single Post
Old 06-08-2012, 10:43 AM   #1601
Casseres
Junior Member
Casseres began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2012
Device: Kindle Keyboard
I'm not familiar with the formating for the custom column templates, but based on Vaesse's template a few posts earlier, I have:

{series:'test($,re(re($,"(^.*?)\.+?(.*)","\1 & \1.\2"),"\.+?"," - "),field("authors"))'}{series:'test($,re(re(" - Series","(^.*?)\.+?(.*)","\1 & \1.\2"),"\.+?"," - ")," - Author")'}

Which gives me either "SeriesName - Series" or "AuthorFirstLast - Author".

What I would like is "AuthorFirstLast - Author" to appear if there are only 3 or more books by that author that are not in a series. I feel that it would be silly to have a collection for an author if that author only has one book.

If someone could point me to a better explanation rather than http://manual.calibre-ebook.com/template_lang.html - that would be great because it is a bit confusing for me.

Thanks in advance for any insight.

EDIT

I've found some other code which is a little more simple:
{series:'ifempty($, field("authors"))'}{series:'ifempty(" - Series", " - Author")'}
except the second part always gives me " - Series".

Last edited by Casseres; 06-08-2012 at 11:54 AM.
Casseres is offline