Quote:
Originally Posted by sheygetz
OK, it seems
Code:
Source template:{tags}
Destination field:authors
does the trick.
|
Sorry about author_sort vs authors issue, the Kindle formats do not use the "authors" field, they only have the "author_sort" field so I got confused which one to use. Apparently calibre treats it as the authors field, which does make sense if I actually think about it. But you figured it out without me.
"author_sort" was correctly set, but it was also being ignored altogether.
Quote:
How can I truncate the author_sort here
Code:
Source template:{author_sort}: {title}
Destination field:title
to the first author's surname, please?
I found this somewhere
Code:
{author_sort:re(([^\,]+)(\,|$)(.*),\1)}
would it do the trick, and do I really need all of these brackets. I can't find explanations for them in the online help.
|
That code
will give you just the first author surname, using a
regex, the calibre guide is here:
http://manual.calibre-ebook.com/regexp.html and
those brackets/parentheses are vital. The first parentheses tell the regex to store the match as \1, to use later, the second parentheses allow you to search for (either|or), and the third parentheses, well, actually they are unnecessary. But it doesn't hurt either.