Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-24-2018, 03:28 PM   #1
sciurius
Enthusiast
sciurius doesn't littersciurius doesn't litter
 
sciurius's Avatar
 
Posts: 49
Karma: 102
Join Date: Sep 2010
Location: 52.88504N 06.85904E
Device: PC
swap_around_comma and multiple authors

My library has all authors in LN, FN format (both authors and author_sort).

The builtin swap_around_comma nicely handles the transformation of LN, FN to FN LN. But it is not capable to deal with multiple authors (e.g., LN1, FN1 & LN2, FN2).
I assume this limitation is intentional.

What would be the best way to transform a value with multiple authors?
sciurius is offline   Reply With Quote
Old 02-24-2018, 03:40 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by sciurius View Post
My library has all authors in LN, FN format (both authors and author_sort).

The builtin swap_around_comma nicely handles the transformation of LN, FN to FN LN. But it is not capable to deal with multiple authors (e.g., LN1, FN1 & LN2, FN2).
I assume this limitation is intentional.

What would be the best way to transform a value with multiple authors?
Are you using the Quality check Plugin?

That works fine for multiples UNLESS they are mixed Fn Ln & Ln, Fn

Fix the books with biggest losers , then hand fix the others (that also get flipped to the wrong way)
Hey Kovid, could flip comma be added to the tag browser context (for author)?
theducks is offline   Reply With Quote
Advert
Old 02-25-2018, 03:42 AM   #3
sciurius
Enthusiast
sciurius doesn't littersciurius doesn't litter
 
sciurius's Avatar
 
Posts: 49
Karma: 102
Join Date: Sep 2010
Location: 52.88504N 06.85904E
Device: PC
Quote:
Originally Posted by theducks View Post
Are you using the Quality check Plugin?
All of the time!

But in this case it is not a one-time fix, but I need a custom column with the flipped values.

Quote:
That works fine for multiples UNLESS they are mixed Fn Ln & Ln, Fn
Fortunately, I've eliminated all those already.

Quote:
Hey Kovid, could flip comma be added to the tag browser context (for author)?
That would be nice, indeed!
sciurius is offline   Reply With Quote
Old 02-25-2018, 07:31 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can create your own template function to do what you need, the template language allows the creation of custom functions.
kovidgoyal is offline   Reply With Quote
Old 02-25-2018, 09:02 AM   #5
sciurius
Enthusiast
sciurius doesn't littersciurius doesn't litter
 
sciurius's Avatar
 
Posts: 49
Karma: 102
Join Date: Sep 2010
Location: 52.88504N 06.85904E
Device: PC
Okay, I'll polish up my python skills...
sciurius is offline   Reply With Quote
Advert
Old 02-25-2018, 02:54 PM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Try
Code:
{authors:'list_re_group($, ' & ', '', '(.*)', '[[$:swap_around_comma()]]')'}
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Authors pdurrant Calibre 33 12-21-2017 12:37 PM
Multiple authors AlexBell Upload Help 2 04-17-2015 01:56 AM
Authors smart list for books with multiple authors -bug? SergeyGomanyuk Marvin 1 03-29-2014 04:14 AM
Calibre authors LN, FN to FN LN "swap_around_comma" Rob557 Library Management 13 07-12-2012 08:53 AM
Multiple authors ntome Library Management 2 02-10-2012 05:53 PM


All times are GMT -4. The time now is 01:38 AM.


MobileRead.com is a privately owned, operated and funded community.