![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Displaying multiple authors (on Kobo Glo)
The problem I have is that for a books with more than one author, with each author listed seperated by ampersands in Calibre's edit metadata author(s) field, only the first author is being displayed on my Kobo Glo.
I have found a rough workaround, which is to enter all authors in the field without using ampersands to seperate them, which requires disabling Calibre's automatic replacement of "and" with an ampersand via the "Splitting multiple author names" tweak. Although this works exactly as I want on the Kobo (and sorts correctly), it is not ideal because I can't automatically set author_sort from authors when editing metadata in Calibre, I have to enter the author_sort manually for each book. I think the real solution might be enter the authors seperated by ampersands and let Calibre split the author names as it wants, and then use a metadata plugboard to convert the authors field to the format that displays properly on the Kobo when the metedata is sent to the device. But exactly how to do this is escaping me. In summary, I think what I want to do is take the authors field in the format: First1 Last1 & First2 Last2 & ... & First(n) Last(n) and convert it via a plugboard to the format: First1 Last1, First2 Last2, ..., First(n-1) Last(n-1) and First(n) Last(n) Any clues how I can do this, or is there a better solution? |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
This was discussed in the Kobo forum in https://www.mobileread.com/forums/sho...d.php?t=202664. There is an issue that the Kobo devices doesn't read the multiple creator elements in the opf file. If the full author list is in the first creator element, it handles that correctly. I couldn't see a way to get calibre to write the full author list as the text or this element.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,149
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@david: You can have the kobo driver do that when sending files to the device, you will need to modify the opf directly using lxml however, since calibre's opf handling code is going to put multiple authors into separate tags.
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
@Kovid: I was afraid you were going to say that
![]() @anyone: For my curiosity, how do other devices handle this? |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,149
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Cant think of an example, but the basic procudure is to follow the set_metadata() function in metadata/epub.py. Something like
Code:
reader = get_zip_reader(stream, root=os.getcwdu()) opf = reader.opf for author in opf.authors_path(opf.metadata): author.getparent().remove(author) and so on (see the authors()->fset function in opf2.py) and then do newopf = StringIO(opf.render()) do the replacing as in set_metadata() |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
@Kovid: Thanks, that will make it easier.
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,318
Karma: 7975240
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Why can't you do this with a metadata plugboard? Something like
Code:
{authors:'re($, ' & ', ', ')'} Code:
{authors:'re(re($, '(.*) & '. '\1 and'), ' & ', ', ')'} |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
Code:
{authors:'re(re($, '(.*) & ', '\1 and '), ' & ', ', ')'} |
|
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
@GeoffR: As you have a solution via the plugboard, I think I will hold off on adding this to the driver at the moment. If something changes, or enough people ask for it, I'll look at it then.
|
![]() |
![]() |
![]() |
#10 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 107
Karma: 2724
Join Date: Nov 2011
Device: Multiple Kobos, multiple Kindles
|
Hi,
I tried this solution, but to no avail. Whatever I do, it only provides "surname, firstname" of one of the authors. Is there somewhere else where I might look? Cheers, Joe |
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
If you have the plugboard set-up correctly when you first send the book, it should work. Can you post or send the book to me? I would like to see the copy after it has been put on the device. If you can't post it here for copyright reasons, send me PM for an email address to send it to.
|
![]() |
![]() |
![]() |
#12 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 107
Karma: 2724
Join Date: Nov 2011
Device: Multiple Kobos, multiple Kindles
|
Hello David,
thank you very much for looking into the problem. I've sent you a PM and can send you the book later. If I look into the embedded content.opf, then the file on the Kobo looks like this: <dc:creator opf:file-as="Fletcher, Jessica & Bain, Donald" opf:role="aut">Fletcher, Jessica</dc:creator> <dc:creator opf:role="aut">Bain, Donald - Murder, She Wrote 01</dc:creator> and the author shown on the Kobo is "Fletcher, Jessica". The original file in my calibre library has the following info in the embedded content.opf: <dc:creator opf:file-as="Fletcher, Jessica" opf:role="aut">Jessica Fletcher</dc:creator> In Calibre I have entered: Gin and Daggers Donald Bain & Jessica Fletcher Murder, She Wrote[1] Cheers, Joachim |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Joachim,
That makes me think you don't have the metadata plugboard set-up correctly. You should have a plugboard for epubs and the KoboTouch (or any device). The source template needs to be set to what GeoffR has above, and the destination field set to "authors". |
![]() |
![]() |
![]() |
#14 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,318
Karma: 7975240
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Could you post all the plugboard templates exactly as written in preferences -> plugboards? The best way to do that is to click on the plugboard expression in the existing plugboards box, copy that to the clipboard (ctrl C on windows), then paste the results in a post. Last edited by chaley; 04-01-2013 at 09:29 AM. Reason: series, not title, is being added |
|
![]() |
![]() |
![]() |
#15 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 107
Karma: 2724
Join Date: Nov 2011
Device: Multiple Kobos, multiple Kindles
|
Ok, then it seems that I somehow incorrectly copied/edited the plugboard. Here is the info of the plug-in configuration and the plugboard:
Plugin KoboTouch Read metadata from files on device Use sub directories Save template: {author_sort} - {series}{series_index:0>2s| | - }{title} column for bookshelves series, author_sort, #classification Delete Empty Bookshelves Create Bookshelves Upload covers for books Set Series information Metadata Plugboard any format KOBOTOUCH Source template {author_sort:'re(re($, '(.*) & ', '\1 and '), ' & ', ', ')'} Destination field author sort Source template {authors:'re(re($, '(.*) & ', '\1 and '), ' & ', ', ')'} Destination field authors The first template (author_sort) I tested only as a last resort, but it didn't change a thing. Result: The author shown for the book is "Fletcher, Jessica". The bookshelf is "Bain, Donald & Fletcher, Jessica". I would be very happy if I set it up incorrectly :-) Regards, Joe |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Glo Cover not displaying on Kobo Glo | Bronwyn | Kobo Reader | 6 | 12-18-2013 12:00 AM |
Multiple authors issue with Kobo Arc | MarcB | Kobo Reader | 0 | 01-07-2013 07:17 PM |
Glo Can kobo glo run android app such as nook glo? | suspect | Kobo Developer's Corner | 1 | 12-28-2012 11:25 PM |
Glo Kobo Glo Freezes multiple time per day | Manfred L | Kobo Reader | 4 | 11-26-2012 12:54 AM |
Kobo & multiple authors | Medieval Guy | Calibre | 7 | 07-02-2010 04:32 PM |