Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-07-2010, 01:00 PM   #1
pliz
Junior Member
pliz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2010
Device: nook
helloworld plugin does nothing

Here is how to replicate:

1. Ubuntu 9.10
2. Install calibre by
Quote:
sudo python -c "import urllib2; exec urllib2.urlopen('http://status.calibre-ebook.com/linux_installer').read(); main()"
3. Download the zip file suggested in documentation
4. Install it by:
Quote:
calibre-customize -a helloworld_plugin.zip
5. Open calibre, check the plugin is installed
6. Try converting an .fb2 book to epub
7. Open epub with view in specific format and check metadata

Publisher is unchanged from previous (NONE in my case)

What am I doing wrong? I'd like to scrap a plugin for postprocessing epubs after conversion to include fonts and necessary corrections. However, can't even start since the only examle python plugin I could find (helloworld) does not even work for me.

Suggestions are welcomed!
pliz is offline   Reply With Quote
Old 01-07-2010, 01:11 PM   #2
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,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
IIRC that plugin only works for LRF output. If you're looking for example plugins, the calibre source code is full of them. A lot of calibre functionality is implemented as plugins. There's no real difference between a builtin and a custom plugin.
kovidgoyal is offline   Reply With Quote
Old 01-07-2010, 01:17 PM   #3
pliz
Junior Member
pliz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2010
Device: nook
1. The source code of that plugin explicitly says:
file_types = set(['epub', 'lrf']) # The file types that this plugin will be applied to

I do not see a reason why it would not work on epub. Is there one?

2. Can you point exactly to a file that is a FileTypePlugin in calibre source tree? The only one I found with grep is HTML2ZIP plugin, which is a part of
pluginize/src/calibre/customize/builtins.py

Where else to look?

Thank you!
pliz is offline   Reply With Quote
Old 01-07-2010, 01:20 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,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The reason it only works for LRF is because the whole postprocess set of plugins only work for lrf (this is an oversight from the time when calibre's conversion susbsytem was refactored, I forgot to migrate the postprocess plugins).

If you want to write a postprocess plugin,I suggest waiting for the next release, when this will be rectified.
kovidgoyal is offline   Reply With Quote
Old 01-07-2010, 01:22 PM   #5
pliz
Junior Member
pliz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2010
Device: nook
Thanks! Any estimate when is the next release?
pliz is offline   Reply With Quote
Old 01-07-2010, 01:28 PM   #6
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,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre is released typically once every six days
kovidgoyal is offline   Reply With Quote
Old 01-07-2010, 01:31 PM   #7
pliz
Junior Member
pliz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2010
Device: nook
Wow! Superimpressive! This means that Sunday I will be able to write that postprocessing plugin for epub. Great!

Thanks!
pliz is offline   Reply With Quote
Old 01-07-2010, 01:33 PM   #8
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,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No guarantees, a release has been known to take as long as 8 days on occasion
kovidgoyal is offline   Reply With Quote
Old 01-11-2010, 02:56 AM   #9
pliz
Junior Member
pliz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2010
Device: nook
Thanks a lot! The new release 0.6.33 made the helloworld plugin work and my modification seems to be doing something also.

BTW, is it known where nook mounts its hard drive (the path relative to the root) internally? The one that is displayed as nook when inserted into a USB port of a linux machine? I could save some space by pointing to the fonts at a common location instead of zipping the fonts right into .epub
pliz is offline   Reply With Quote
Old 01-11-2010, 11:15 AM   #10
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,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Dunno, I've never actually used a Nook, the driver in calibre was written using user supplied data.
kovidgoyal is offline   Reply With Quote
Old 04-18-2010, 04:03 AM   #11
pliz
Junior Member
pliz began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2010
Device: nook
Did the system break again in the latest versions? hello world plugin seems to not work again
pliz is offline   Reply With Quote
Old 04-18-2010, 04:23 AM   #12
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,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Not that I am aware of. I used a 3rd party plugin just the other day. The only thing I can think of is to make sure your helloworld plugin has its name set.

Last edited by kovidgoyal; 04-18-2010 at 05:11 AM.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DR800 FB2 plugin yuri_b iRex 15 05-02-2011 09:18 PM
New Plugin Type Idea: Library Plugin cgranade Plugins 3 09-15-2010 12:11 PM
metadata plugin redneck_momma Plugins 1 05-21-2010 08:41 PM
Calibre Plugin zdavatz Plugins 17 05-20-2010 01:08 PM
iLiad First HelloWorld tutorial, a n00b primer First Hello World Tutorial, a n00b primer mind iRex Developer's Corner 13 09-19-2008 09:43 AM


All times are GMT -4. The time now is 11:09 PM.


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