View Single Post
Old 08-05-2013, 01:12 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: 45,432
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Some things that jump out at me:

You should not change self.options in __init__ as it is meant to be a class level variable. Instead define your own options and set the epub output options explicitly before calling the base class convert()

You should have **kwargs in __init__

Generally speaking, I'd suggest not subclassing EPUbOutput, instead create your own plugin class, and simply call the epub output plugin in your convert() method. Since this is python, you dont really need ot sub-class, you can monkey patch instead.
kovidgoyal is offline   Reply With Quote