Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-28-2022, 04:07 PM   #1
DrChiper
Bookish
DrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beauty
 
DrChiper's Avatar
 
Posts: 769
Karma: 32500
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2
Thumbs up Plugboard usage for Kobo device: Authors

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
In my calibre DB authors are entered as:
Code:
Isaac Asimov & Other Guest & ...
I tried to use the Metadata plugboards like the attachment below.
This always results on the Kobo device as:
Code:
Asimov        3 books
Isaac         3 books
on 2 rows, while I expected:
Code:
Asimov, Isaac 3 books
What is my mistake?
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2022-09-28 205719.png
Views:	46
Size:	13.1 KB
ID:	196841  

Last edited by DrChiper; 09-29-2022 at 12:39 PM.
DrChiper is offline   Reply With Quote
Old 09-28-2022, 05:19 PM   #2
uli
Zealot
uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.
 
Posts: 101
Karma: 194272
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($)"), '&', ', ')
Edit: This only allows Kobo to sort by LN FN, still will show FN LN, bummer.

Last edited by uli; 09-28-2022 at 05:31 PM.
uli is offline   Reply With Quote
Old 09-29-2022, 01:33 AM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 22,504
Karma: 102454445
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by DrChiper View Post
I tried to use the Metadata plugboards like the attachment below.
This always results on the Kobo device as:
Code:
Asimov        3 books
Isaac         3 books
on 2 rows, while I expected:
Code:
Asimov, Isaac 3 books
What is my mistake?
Your Kobo uses the , to separate authors so sending Asimov, Isaac is sending two single named authors.
DNSB is offline   Reply With Quote
Old 09-29-2022, 04:19 AM   #4
chaley
Grumpy old git
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.
 
chaley's Avatar
 
Posts: 10,815
Karma: 4839693
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by uli View Post
With my Kobo, I've been using this plugboard by chaley:

Code:
program: re(list_re_group(field('authors'), '&', '.', '(.*)', "program: swap_around_comma($)"), '&', ', ')
Edit: This only allows Kobo to sort by LN FN, still will show FN LN, bummer.
For completeness, the plugboard does two things. It first examines each author and converts any "LN, FN" names to "FN LN". It then converts the author list (A & A ...) to (A, A ...).
chaley is offline   Reply With Quote
Old 09-29-2022, 08:16 AM   #5
DrChiper
Bookish
DrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beauty
 
DrChiper's Avatar
 
Posts: 769
Karma: 32500
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2
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 & ...
Hence, this gives automagically in calibre for author_sort:
Code:
LN, FN & LN, FN & ...
Kobo, however, regards ',' (=comma) as an author separation and thus splits any author_sort string into 2 entries: which we (I) do not want.

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.)
I got nowhere.
But, when this is still feasible, what would be the proper replacement template construct?
DrChiper is offline   Reply With Quote
Old 09-29-2022, 08:32 AM   #6
chaley
Grumpy old git
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.
 
chaley's Avatar
 
Posts: 10,815
Karma: 4839693
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DrChiper View Post
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 & ...
Hence, this gives automagically in calibre for author_sort:
Code:
LN, FN & LN, FN & ...
Kobo, however, regards ',' (=comma) as an author separation and thus splits any author_sort string into 2 entries: which we (I) do not want.

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.)
I got nowhere.
But, when this is still feasible, what would be the proper replacement template construct?
I don't understand. The provided template uses authors, not author_sort. If an author has a comma in the name (LN, FN) then the template changes it to FN, LN. It then changes all the & to commas. This is shown by the screen capture.

Did you try the template?
Attached Thumbnails
Click image for larger version

Name:	Clipboard03.jpg
Views:	20
Size:	82.8 KB
ID:	196857  
chaley is offline   Reply With Quote
Old 09-29-2022, 09:04 AM   #7
chaley
Grumpy old git
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.
 
chaley's Avatar
 
Posts: 10,815
Karma: 4839693
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, ' & ', ', ')
chaley is offline   Reply With Quote
Old 09-29-2022, 09:09 AM   #8
DrChiper
Bookish
DrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beauty
 
DrChiper's Avatar
 
Posts: 769
Karma: 32500
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2
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,&)
The provided templates all work, as you correctly remarked, on the authors list.
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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2022-09-29 135508.png
Views:	22
Size:	8.1 KB
ID:	196858  
DrChiper is offline   Reply With Quote
Old 09-29-2022, 09:15 AM   #9
chaley
Grumpy old git
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.
 
chaley's Avatar
 
Posts: 10,815
Karma: 4839693
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DrChiper View Post
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,&)
The provided templates all work, as you correctly remarked, on the authors list.
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.
I understand you saying that you want to send the first author, not all the authors. I also understand you saying that all the authors are already FN LN.

Why are you using author_sort? Why not use authors? As in
Code:
{authors:list_item(0,&)}
If for some reason you really want to use author_sort instead of authors then this does it.
Code:
program: swap_around_comma(list_item($author_sort, 0, '&'))
chaley is offline   Reply With Quote
Old 09-29-2022, 09:17 AM   #10
DrChiper
Bookish
DrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beauty
 
DrChiper's Avatar
 
Posts: 769
Karma: 32500
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2
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.
DrChiper is offline   Reply With Quote
Old 09-29-2022, 09:22 AM   #11
DrChiper
Bookish
DrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beauty
 
DrChiper's Avatar
 
Posts: 769
Karma: 32500
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2
Quote:
Originally Posted by chaley View Post
I understand you saying that you want to send the first author, not all the authors. I also understand you saying that all the authors are already FN LN.
Correct
Quote:
Originally Posted by chaley View Post
Why are you using author_sort? Why not use authors?
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:
Originally Posted by chaley View Post
If for some reason you really want to use author_sort instead of authors then this does it.
Code:
program: swap_around_comma(list_item($author_sort, 0, '&'))
Appreciated. I give it a try
DrChiper is offline   Reply With Quote
Old 09-29-2022, 09:43 AM   #12
DrChiper
Bookish
DrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beauty
 
DrChiper's Avatar
 
Posts: 769
Karma: 32500
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2
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')
But as I am no template specialist, my ideas may be totally wrong.
DrChiper is offline   Reply With Quote
Old 09-29-2022, 10:04 AM   #13
chaley
Grumpy old git
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.
 
chaley's Avatar
 
Posts: 10,815
Karma: 4839693
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DrChiper View Post
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')
But as I am no template specialist, my ideas may be totally wrong.
I don't follow. Lets assume we change the comma to a semicolon. Using author_sort with that change, if you send "Asimov; Isaac" and "Deer; Carl" to the Kobo then it will display the authors sorted incorrectly like this:
  • Deer; Carl
  • Asimov; Isaac
Why? Because the kobo treats the part after the last space as the last name and sorts on that. Is that really what you want?

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', '&'),',', ';')
chaley is offline   Reply With Quote
Old 09-29-2022, 10:37 AM   #14
chaley
Grumpy old git
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.
 
chaley's Avatar
 
Posts: 10,815
Karma: 4839693
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', '&'),',', '¸')
chaley is offline   Reply With Quote
Old 09-29-2022, 12:12 PM   #15
DrChiper
Bookish
DrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beautyDrChiper does all things with Zen-like beauty
 
DrChiper's Avatar
 
Posts: 769
Karma: 32500
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2
Quote:
Originally Posted by chaley View Post
Why? Because the kobo treats the part after the last space as the last name and sorts on that. Is that really what you want?
Yes, its exactly what I wanted. Kobo has a funny way to sort. Take for instance a name as A C Whatever Kobo does not treat the "A" as an initial, so will not sort on it. I had to add explicitly a dot as "A." to force that. In that way I should have change my whole calibre DB to make everything work.

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, ']')
Many thanks for helping me in my quest to force Kobo to behave as I preferred

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, ']')
Attached Thumbnails
Click image for larger version

Name:	screen_001.png
Views:	28
Size:	116.5 KB
ID:	196868   Click image for larger version

Name:	screen_002.png
Views:	13
Size:	116.5 KB
ID:	196882  

Last edited by DrChiper; 09-30-2022 at 11:53 AM.
DrChiper is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugboard usage with KCC generated mobis [noob] flat__line Library Management 5 08-29-2015 10:25 AM
PRS-x50 Metadata Plugboard Device ilovejedd Devices 3 02-18-2012 09:57 AM
I want to add Calibre Plugboard usage to the Kindle Visual Guide... daffy4u Amazon Kindle 19 12-19-2010 06:31 PM
PRS-505 Getting Authors to sort by last name using Calibre's metadata plugboard. ligelowbee Sony Reader 5 10-14-2010 01:06 PM
Simultaneous Device Usage: Unlimited wallcraft Amazon Kindle 2 09-07-2009 06:24 PM


All times are GMT -4. The time now is 10:39 PM.


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