![]() |
#1 |
Enthusiast
![]() ![]() 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? |
![]() |
![]() |
![]() |
#2 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
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:
That works fine for multiples UNLESS they are mixed Fn Ln & Ln, Fn ![]() ![]() Hey Kovid, could flip comma be added to the tag browser context (for author)? |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | ||
Enthusiast
![]() ![]() Posts: 49
Karma: 102
Join Date: Sep 2010
Location: 52.88504N 06.85904E
Device: PC
|
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:
Quote:
|
||
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,356
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.
|
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() ![]() Posts: 49
Karma: 102
Join Date: Sep 2010
Location: 52.88504N 06.85904E
Device: PC
|
Okay, I'll polish up my python skills...
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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()]]')'} |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |