View Single Post
Old 07-12-2012, 07:12 AM   #7
Rob557
Zealot
Rob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-books
 
Posts: 108
Karma: 810
Join Date: Jul 2012
Device: Kobo
Quote:
Originally Posted by chaley View Post
... To use template functions in bulk search/replace, you must select "template" as the source field. ... You can see examples of using swap_around_comma in single function mode and template program mode in the thread containing this post.
Quote:
Originally Posted by chaley View Post
For completeness, here is a template in template program mode that works with both FN LN and LN, FN for most names. This template will fail for author names like Joe Blogs, PhD, which is one reason it isn't the default.
Code:
{authors:'contains($, ',', swap_around_comma($), $)'}
Thank you chaley. In the bulk metadata edit's search and replace screen, with {template} selected as the search field, {authors:'contains($, ',', swap_around_comma($), $)'} in the template field and a temporary user-defined text column as my destination field, the conversion from "last-name, first-name" to "first-name last-name" worked great.

Thanks again for your help on this, and the other alternative provided by unboggling !

The only lingering question related to this process is whether there is a search technique within Calibre to identify author names that contain two commas, so that complication can be more simply resolved prior to running the bulk edit?
Rob557 is offline   Reply With Quote