View Single Post
Old 11-02-2017, 12:23 AM   #15
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by Kuram View Post
Hmm. I'm okay with loading Fn Ln to my device, but I really don't want to modify my entire library to conform to it. Is there some way to modify that plugboard so that the author/author_sort input of "Ln, Fn" is modified to "Fn Ln" when sideloaded? Can regex be used in plugboards to accomplish this?
Calibre might have an internal function that handles it, but writing a regex from scratch that works with every name would be complicated, because there are some names that don't fit into a simple "Fn, Ln" pattern.

For example: "Walter M. Miller Jr." (or "Walter M. Miller, Jr."), when written with surname first is "Miller, Walter M. Jr." (or "Miller, Walter M., Jr."). A simple regex that assumed everything after the comma was first names would not work. correctly in this case.
GeoffR is offline   Reply With Quote