10-19-2010, 11:33 AM | #1 |
Grand Sorcerer
Posts: 27,871
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Epub plugin dev
I have a plugin that modifies epubs on import. It seems to work fine, but the cover thumbnail does not show (nor is the cover image present in the library folder) after the successful import.
If I open the metadata editor and click on the "set the cover from the selected format" button, it correctly extracts the cover image and the thumbnail shows when browsing the library. If I re-import the modified epub, it finds the cover image just fine... which leads me to believe it's a priority/order of operation type issue. When does Calibre attempt to extract the Epub cover in relation to import plugins? If it happens before any import plugins, is there a way to force Calibre to repeat the cover extraction routine from within my plugin? It's a picky little detail, but I'd rather not have to click that "set the cover from the selected format" button every time I import an epub. Last edited by DiapDealer; 10-19-2010 at 11:36 AM. |
10-19-2010, 11:41 AM | #2 |
Resident Curmudgeon
Posts: 75,788
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What does your plugin do to the ePub?
|
Advert | |
|
10-19-2010, 12:13 PM | #3 | |
Grand Sorcerer
Posts: 27,871
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Suffice it to say, that the epub's cover is unavailable when the import process begins (and that appears to be when Calibre's Epub metadata reader attempts to extract the cover). For whatever reason. Let's say it's because there is no cover. After my plugin runs, the cover is available (let's say it's because my plugin inserts a cover), but it's too late in the import process for Calibre to retrieve it properly. I know my plugin does this correctly because I can click that "set cover from selected format" button, and it works. I just need to know what code is behind that button... and can I simulate "clicking" that button from my plugin? Or is it possible to prioritize my plugin to run before Calibre's built-in 'Read EPUB metadata' plugin? |
|
10-19-2010, 12:50 PM | #4 |
creator of calibre
Posts: 44,302
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There's no way to do it from within the plugin, at least at the moment. Open a ticket for it, and I'll see if I can setup a hook for it.
I'm travelling this week so it will be a little while before I can look at it. |
10-19-2010, 01:15 PM | #5 |
Grand Sorcerer
Posts: 27,871
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Thanks for the response. It's no biggie, but I'll open a ticket and look for it sometime in the future.
EDIT: Ticket created (#7245) Last edited by DiapDealer; 10-20-2010 at 08:54 AM. Reason: Added ticket number |
Advert | |
|
10-22-2010, 09:15 PM | #6 | |
Kindle Enthusiast
Posts: 243
Karma: 1818
Join Date: Jul 2010
Location: San Diego, CA
Device: Kindle 3G Graphite, Kindle Fire
|
Quote:
Thanks, DiapDealer! |
|
10-23-2010, 03:04 AM | #7 |
Addict
Posts: 385
Karma: 6514
Join Date: Aug 2010
Location: Denmark
Device: Kindle 3 3G+Wifi, Oasis
|
And Thanx TomF ! I missed that
|
10-26-2010, 02:03 PM | #8 |
Guru
Posts: 739
Karma: 1018859
Join Date: Jun 2008
Location: Near Seattle
Device: kindle1, K3, K3G (thanks MR), iTouch, Kindle Touch
|
Not sure anyone realizes how fabulous these plugins are. They eliminate the need to install both python and pycrypto. Calibre does it all. Profound thanks to DiapDealer.
A couple of easy steps and you are there. |
10-27-2010, 04:44 PM | #9 | |
Fear The Turtle!
Posts: 866
Karma: 4035032
Join Date: Sep 2009
Location: Margaritaville
Device: KV, Kobo Forma, Kobo A1LE, KO3, K3
|
Quote:
Also, once a certain plugin is added, do I just add the book to Calibre & the plugin does it's magic? Thanks for any help/direction you can provide! |
|
10-27-2010, 08:22 PM | #10 |
Guru
Posts: 869
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
The plugins in question should be listed under File type plugins.
See the included readme files to find how to configure them. Once configured, they should do their work when you add a book to calibre. |
10-27-2010, 09:17 PM | #11 |
Fear The Turtle!
Posts: 866
Karma: 4035032
Join Date: Sep 2009
Location: Margaritaville
Device: KV, Kobo Forma, Kobo A1LE, KO3, K3
|
Thanks for the info. I've been playing around with it for a little while now & I finally figured it out.
|
10-28-2010, 01:34 PM | #12 | |
Fanatic
Posts: 578
Karma: 613022
Join Date: Aug 2010
Location: New Zealand
Device: kobo glo, kobo touch (dead), kindle touch, android phone
|
Quote:
Thanks |
|
10-30-2010, 03:38 PM | #13 | |
Grand Sorcerer
Posts: 27,871
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
10-30-2010, 03:43 PM | #14 |
creator of calibre
Posts: 44,302
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
you're welcome
|
11-10-2010, 08:05 PM | #15 | |
Wizard
Posts: 1,952
Karma: 213930
Join Date: Oct 2009
Location: Middelfart, Denmark
Device: Kindle paper white
|
Quote:
|
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any web-to-epub plugin for internet browser? | bthoven | ePub | 7 | 07-10-2011 05:14 AM |
Installing dev environment | bran | iRex Developer's Corner | 13 | 09-28-2010 05:43 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |
iLiad /dev/ttyS1? | -Thomas- | iRex Developer's Corner | 0 | 05-04-2008 07:16 PM |