Quote:
Originally Posted by Rob557
I tried two approaches:
a) first tried setting up a custom user-defined column to get a re-formatted author name by using the above function in the template definition for the column when it is created (as suggested by the general approach of "using templates in custom columns" at the link "http://manual.calibre-ebook.com/template_lang.html"), and
b) also tried using "swap_around_comma" as a type of general expression within the context of a "search and replace" bulk metadata edit copying the authors column to a general user-defined text column.
In both cases above I was unable to figure out the correct syntax, and tried things like {authors:swap_around_comma()} and tried {swap_around_comma(authors)} and {swap_around_comma(LN,FN)}. Has anyone seen any further documentation on this function, or can provide the syntax for using this function in the context of either of the above approaches, or some alternative bulk edit approach?
|
It would be helpful if you tell us what didn't work. I tried both a) and b) and they worked except for books that have multiple authors.
To reinforce unboggling's comment: templates operate on all the authors at once. Using swap_around_comma() on a book with multiple authors such as "Blogs, Joe & Sneeze, Sam" will produce "Joe & Sneeze, Sam Blogs. The bulk metadata method overcomes the multiple author problem because it processes the authors one at a time.