![]() |
#1 |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
![]()
I do not know whether this is the correct place as both calibre and a Kobo device is involved, so please feel free to move it accordingly.
The situation, which is driving me nuts, is this: I'm trying to convince Kobo to display in MyBooks>Authors any author like: Code:
Asimov, Isaac Code:
Isaac Asimov & Other Guest & ... This always results on the Kobo device as: Code:
Asimov 3 books Isaac 3 books Code:
Asimov, Isaac 3 books Last edited by DrChiper; 09-29-2022 at 11:39 AM. |
![]() |
![]() |
![]() |
#2 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 109
Karma: 194274
Join Date: Jun 2011
Location: Montreal
Device: Kobo, Calibre
|
With my Kobo, I've been using this plugboard by chaley:
Code:
program: re(list_re_group(field('authors'), '&', '.', '(.*)', "program: swap_around_comma($)"), '&', ', ') Last edited by uli; 09-28-2022 at 04:31 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,206
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Your Kobo uses the , to separate authors so sending Asimov, Isaac is sending two single named authors.
|
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
My brain needed some time to apsorb the above.
The short conclusion: it will not work for me. In my case I have already in the calibre DB: Code:
FN LN & FN LN & ... Code:
LN, FN & LN, FN & ... Conclusion: unsolvable problem... or is it? Can we perhaps via plugboard substitute the ',' (=comma) from author_sort into something else (a kind of comma resembling character), like for instance a cedilla (U+0088) ? I tried this with my non-existant calibre template language knowledge and produced something like this (don't laugh): Code:
{program:re(author_sort:list_item(0,&),',', 'U+0088')} (This would try to replace only in the very first author_sort list entry the comma by something else.) But, when this is still feasible, what would be the proper replacement template construct? |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Did you try the template? |
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
If you can guarantee that all authors are FN LN then this template works.
Code:
program: re($authors, ' & ', ', ') |
![]() |
![]() |
![]() |
#8 |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
What I have in my basic metadata is shown in the attachment. What I want to send to Kobo is marked in red from the author_sort list part. Hence:
Code:
author_sort:list_item(0,&) I tested this indeed (it works), but the result is not different from what I can get by using the authors list directly as my content does not contain any commas at all. Hope this clarifies it. |
![]() |
![]() |
![]() |
#9 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Why are you using author_sort? Why not use authors? As in Code:
{authors:list_item(0,&)} Code:
program: swap_around_comma(list_item($author_sort, 0, '&')) |
|
![]() |
![]() |
![]() |
#10 |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
Concerning the Template function editor, I have no clue how to use that
![]() I have tried to get a quick look in Kovid's documentation for clues but I'm afraid I need a brain extension to actually use it. |
![]() |
![]() |
![]() |
#11 | ||
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
Quote:
Because I humbly assumed using author_sort would refrain me from additional string handling as there it contained already exactly the format I want. Quote:
![]() |
||
![]() |
![]() |
![]() |
#12 |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
The good part it hat there are no errors. The bad part is that it still does not provide me what I desire.
I did use author_sort to get the LN, FN combo. I do understand that the comma does not work for Kobo, so in my previous post #5 I figured to replace that comma by some other character which would not be wrongly interpreted by Kobo. The last code simply swaps the LN, FN --> FN LN which is not my intention. I need something like: Code:
program:re(author_sort:list_item(0,&),',', 'U+0088') |
![]() |
![]() |
![]() |
#13 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
If you really want to do that then this should work. I used semicolon because the template parser doesn't support extended character definition sequences and U+0088 doesn't seem to be a proper character. Code:
program:re(list_item($author_sort, '0', '&'),',', ';') |
|
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
BTW: the cedilla is U+00B8. This version of the template uses it instead of a semicolon
Code:
program:re(list_item($author_sort, '0', '&'),',', '¸') |
![]() |
![]() |
![]() |
#15 | |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
Quote:
I decided therefore to make the Authors send to Kobo as LN, FN. My sorting is now fixed on "First Name". Effectively, Kobo sorts on the first word which now happen to be LN. So I see now listed "Whatever, A C 5 books", which is fine. And you were right, cedilla is U+00B8. I just need new glasses ![]() And because I have any books in multiple languages, I also added a feature to express that as well per Author. For interested ones the code is now: Code:
program:strcat(re(list_item($author_sort, '0', '&'),',', '¸'), ' [', $languages, ']') ![]() Addition: FWIW, I found that the single low-9 quotation mark (U+201A) '‚' is even a better choice instead of the cedille as it resembles the comma completely (see 2nd attachment). Code:
program:strcat(re(list_item($author_sort, '0', '&'),',', '‚'), ' [', $languages, ']') Last edited by DrChiper; 09-30-2022 at 10:53 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plugboard usage with KCC generated mobis [noob] | flat__line | Library Management | 5 | 08-29-2015 09:25 AM |
PRS-x50 Metadata Plugboard Device | ilovejedd | Devices | 3 | 02-18-2012 08:57 AM |
I want to add Calibre Plugboard usage to the Kindle Visual Guide... | daffy4u | Amazon Kindle | 19 | 12-19-2010 05:31 PM |
PRS-505 Getting Authors to sort by last name using Calibre's metadata plugboard. | ligelowbee | Sony Reader | 5 | 10-14-2010 12:06 PM |
Simultaneous Device Usage: Unlimited | wallcraft | Amazon Kindle | 2 | 09-07-2009 05:24 PM |