Calibre authors LN, FN to FN LN "swap_around_comma"
In a sub-library I have a large number of books where the "authors" field is the same as "author_sort" (i.e. LN, FN) and I was trying to figure out how to do a bulk metadata edit in order to reformat all the "authors" names to FN LN for overall library consistency.
The link "http://manual.calibre-ebook.com/template_lang.html" refers to the function "swap_around_comma(val)" but I couldn't figure out how to use it in the context of a bulk edit of the metadata.
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?
Thanks ...Rob
|