Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 10-19-2010, 11:33 AM   #1
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
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.
DiapDealer is offline   Reply With Quote
Old 10-19-2010, 11:41 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,887
Karma: 128597114
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?
JSWolf is offline   Reply With Quote
Advert
Old 10-19-2010, 12:13 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
What does your plugin do to the ePub?
It's really kind of irrelevant to my question. I don't say that to be a smartass, but rather in an attempt to stay within the forum rules.

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?
DiapDealer is offline   Reply With Quote
Old 10-19-2010, 12:50 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
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.
kovidgoyal is online now   Reply With Quote
Old 10-19-2010, 01:15 PM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
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
DiapDealer is offline   Reply With Quote
Advert
Old 10-22-2010, 09:15 PM   #6
TomF
Kindle Enthusiast
TomF once ate a cherry pie in a record 7 seconds.TomF once ate a cherry pie in a record 7 seconds.TomF once ate a cherry pie in a record 7 seconds.TomF once ate a cherry pie in a record 7 seconds.TomF once ate a cherry pie in a record 7 seconds.TomF once ate a cherry pie in a record 7 seconds.TomF once ate a cherry pie in a record 7 seconds.TomF once ate a cherry pie in a record 7 seconds.TomF once ate a cherry pie in a record 7 seconds.TomF once ate a cherry pie in a record 7 seconds.TomF once ate a cherry pie in a record 7 seconds.
 
TomF's Avatar
 
Posts: 243
Karma: 1818
Join Date: Jul 2010
Location: San Diego, CA
Device: Kindle 3G Graphite, Kindle Fire
Quote:
Originally Posted by DiapDealer View Post
It's really kind of irrelevant to my question. I don't say that to be a smartass, but rather in an attempt to stay within the forum rules.
If anyone is interested in exactly what this plugin does, they can look on a certain Alf's blog for Tools 2.0 (see the first post dated February 11, 2010 "Continuing..." and entry #18 dated October 18, 2010 "New Version of the Tools Available" at the bottom).

Thanks, DiapDealer!
TomF is offline   Reply With Quote
Old 10-23-2010, 03:04 AM   #7
pchrist7
Addict
pchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animals
 
pchrist7's Avatar
 
Posts: 385
Karma: 6514
Join Date: Aug 2010
Location: Denmark
Device: Kindle 3 3G+Wifi, Oasis
And Thanx TomF ! I missed that
pchrist7 is offline   Reply With Quote
Old 10-26-2010, 02:03 PM   #8
Leep
Guru
Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.
 
Leep's Avatar
 
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.
Leep is offline   Reply With Quote
Old 10-27-2010, 04:44 PM   #9
93terp
Fear The Turtle!
93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.
 
93terp's Avatar
 
Posts: 866
Karma: 4035032
Join Date: Sep 2009
Location: Margaritaville
Device: KV, Kobo Forma, Kobo A1LE, KO3, K3
Quote:
Originally Posted by Leep View Post
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.
I have said plugins from toolsv2.0, but haven't played around with them too much yet. When I add one of these plugins to Calibre, I couldn't find where Calibre was putting it; in other words, I couldn't tell/verify if it was actually added.

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!
93terp is offline   Reply With Quote
Old 10-27-2010, 08:22 PM   #10
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
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.
sherman is online now   Reply With Quote
Old 10-27-2010, 09:17 PM   #11
93terp
Fear The Turtle!
93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.
 
93terp's Avatar
 
Posts: 866
Karma: 4035032
Join Date: Sep 2009
Location: Margaritaville
Device: KV, Kobo Forma, Kobo A1LE, KO3, K3
Quote:
Originally Posted by sherman View Post
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.
Thanks for the info. I've been playing around with it for a little while now & I finally figured it out.
93terp is offline   Reply With Quote
Old 10-28-2010, 01:34 PM   #12
kiwipippa
Fanatic
kiwipippa ought to be getting tired of karma fortunes by now.kiwipippa ought to be getting tired of karma fortunes by now.kiwipippa ought to be getting tired of karma fortunes by now.kiwipippa ought to be getting tired of karma fortunes by now.kiwipippa ought to be getting tired of karma fortunes by now.kiwipippa ought to be getting tired of karma fortunes by now.kiwipippa ought to be getting tired of karma fortunes by now.kiwipippa ought to be getting tired of karma fortunes by now.kiwipippa ought to be getting tired of karma fortunes by now.kiwipippa ought to be getting tired of karma fortunes by now.kiwipippa ought to be getting tired of karma fortunes by now.
 
kiwipippa's Avatar
 
Posts: 578
Karma: 613022
Join Date: Aug 2010
Location: New Zealand
Device: kobo glo, kobo touch (dead), kindle touch, android phone
Quote:
Originally Posted by Leep View Post
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.
To everyone involved in this - you are legends. It really is as easy as leep says. I want to kiss you all!

Thanks
kiwipippa is offline   Reply With Quote
Old 10-30-2010, 03:38 PM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Read metadata only after on import plugins have run when adding books to GUI

Closes tickets: 7245
Thank you so much for making this change!
DiapDealer is offline   Reply With Quote
Old 10-30-2010, 03:43 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you're welcome
kovidgoyal is online now   Reply With Quote
Old 11-10-2010, 08:05 PM   #15
lene1949
Wizard
lene1949 ought to be getting tired of karma fortunes by now.lene1949 ought to be getting tired of karma fortunes by now.lene1949 ought to be getting tired of karma fortunes by now.lene1949 ought to be getting tired of karma fortunes by now.lene1949 ought to be getting tired of karma fortunes by now.lene1949 ought to be getting tired of karma fortunes by now.lene1949 ought to be getting tired of karma fortunes by now.lene1949 ought to be getting tired of karma fortunes by now.lene1949 ought to be getting tired of karma fortunes by now.lene1949 ought to be getting tired of karma fortunes by now.lene1949 ought to be getting tired of karma fortunes by now.
 
lene1949's Avatar
 
Posts: 1,952
Karma: 213930
Join Date: Oct 2009
Location: Middelfart, Denmark
Device: Kindle paper white
Quote:
Originally Posted by TomF View Post
If anyone is interested in exactly what this plugin does, they can look on a certain Alf's blog for Tools 2.0 (see the first post dated February 11, 2010 "Continuing..." and entry #18 dated October 18, 2010 "New Version of the Tools Available" at the bottom).

Thanks, DiapDealer!
Thanks for the directions... It never occurred to me to look at a post for February...
lene1949 is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 03:36 AM.


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