| 
			
			 | 
		#1 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				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 12:36 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,784 
				Karma: 150249619 
				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?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				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?  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				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.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				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 09:54 AM. Reason: Added ticket number  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | |
| 
			
			
			
			 Kindle Enthusiast 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 243 
				Karma: 1818 
				Join Date: Jul 2010 
				Location: San Diego, CA 
				
				
				Device: Kindle 3G Graphite, Kindle Fire 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Thanks, DiapDealer!  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 385 
				Karma: 6514 
				Join Date: Aug 2010 
				Location: Denmark 
				
				
				Device: Kindle 3 3G+Wifi, Oasis 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			And Thanx TomF ! I missed that
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#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.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | |
| 
			
			
			
			 Fear The Turtle! 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 868 
				Karma: 4067244 
				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 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 877 
				Karma: 2676800 
				Join Date: Sep 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.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Fear The Turtle! 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 868 
				Karma: 4067244 
				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.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#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  
		 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#13 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  
		 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#14 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			you're welcome  
		
	
		
		
		
		
		
		
		
		
		
		
	
	 
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#15 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,952 
				Karma: 213930 
				Join Date: Oct 2009 
				Location: Middelfart, Denmark 
				
				
				Device: Kindle paper white 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  
		 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Any web-to-epub plugin for internet browser? | bthoven | ePub | 7 | 07-10-2011 06:14 AM | 
| Installing dev environment | bran | iRex Developer's Corner | 13 | 09-28-2010 06:43 PM | 
| New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 01:11 PM | 
| iLiad /dev/ttyS1? | -Thomas- | iRex Developer's Corner | 0 | 05-04-2008 08:16 PM |