|
|
#1 |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 434
Karma: 1149617
Join Date: Nov 2012
Location: New Zealand
Device: Kobo Glo
|
Displaying multiple authors (on 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 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,971
Karma: 1780441
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
|
This was discussed in the Kobo forum in http://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.
|
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,473
Karma: 2944574
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.
__________________
Get calibre Notice to all: I can not provide assistance with DRM removal, for legal reasons, so please do not contact me about it. |
|
|
|
|
|
#4 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,971
Karma: 1780441
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
|
@Kovid: I was afraid you were going to say that
I suppose I was hoping for a way to do it via a plugboard. I'll have a look through the code. Do you know of an example similar to this?@anyone: For my curiosity, how do other devices handle this? |
|
|
|
|
|
#5 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,473
Karma: 2944574
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()
__________________
Get calibre Notice to all: I can not provide assistance with DRM removal, for legal reasons, so please do not contact me about it. |
|
|
|
|
|
#6 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,971
Karma: 1780441
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
|
@Kovid: Thanks, that will make it easier.
|
|
|
|
|
|
#7 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,849
Karma: 285886
Join Date: Jan 2010
Location: France
Device: Sony PRS-300, HTC WM6.5, Samsung Galaxy Nexus, HTC Sensation
|
Why can't you do this with a metadata plugboard? Something like
Code:
{authors:'re($, ' & ', ', ')'}
Code:
{authors:'re(re($, '(.*) & '. '\1 and'), ' & ', ', ')'}
__________________
Support calibre developers at no cost to you by using calibre's get books feature. Use Calibre Companion to wirelessly connect your Android phone or tablet to calibre charles.haleys.org/calibre |
|
|
|
|
|
#8 | |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 434
Karma: 1149617
Join Date: Nov 2012
Location: New Zealand
Device: Kobo Glo
|
Quote:
Code:
{authors:'re(re($, '(.*) & ', '\1 and '), ' & ', ', ')'}
|
|
|
|
|
|
|
#9 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,971
Karma: 1780441
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
|
@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 |
|
Member
![]() Posts: 18
Karma: 10
Join Date: Nov 2011
Device: Sony PRS-T1, Kobo Glo
|
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 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,971
Karma: 1780441
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
|
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 |
|
Member
![]() Posts: 18
Karma: 10
Join Date: Nov 2011
Device: Sony PRS-T1, Kobo Glo
|
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 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,971
Karma: 1780441
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
|
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 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,849
Karma: 285886
Join Date: Jan 2010
Location: France
Device: Sony PRS-300, HTC WM6.5, Samsung Galaxy Nexus, HTC Sensation
|
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.
__________________
Support calibre developers at no cost to you by using calibre's get books feature. Use Calibre Companion to wirelessly connect your Android phone or tablet to calibre charles.haleys.org/calibre Last edited by chaley; 04-01-2013 at 09:29 AM. Reason: series, not title, is being added |
|
|
|
|
|
|
#15 |
|
Member
![]() Posts: 18
Karma: 10
Join Date: Nov 2011
Device: Sony PRS-T1, Kobo Glo
|
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 Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 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 Cover not displaying on Kobo Glo | Bronwyn | Kobo Reader | 3 | 12-10-2012 04:02 AM |
| 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 |