View Single Post
Old 08-10-2011, 10:16 PM   #1
yo123
Junior Member
yo123 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2011
Device: Kindle 3
Extend PDB output format

Hi,

I am trying to write an output plugin to extend the PDB output formats.

PDB itself is only a container. Currently Calibre supports the following three output formats inside PDB. They can be selected from the PDB output dialog page before converting a ebook.

FORMAT_WRITERS = {
'doc': palmdoc_writer,
'ztxt': ztxt_writer,
'ereader': ereader_writer,
}

I have had the Writer and PDBOuput classes figured out for the plugin.

class HaodooWriter(FormatWriter):
class HaoDooPdbOutput(calibre.ebooks.pdb.output.PDBOutpu t):

However, I am stuck at how to add this extra writer to the dialog page.
I assumed that I need to make the above dictionary to become:

FORMAT_WRITERS = {
'doc': palmdoc_writer,
'ztxt': ztxt_writer,
'ereader': ereader_writer,
'haodoo': haodoo_writer,
}

and also make it to be loaded by Calibre UI. How can I realize this using the plugin mechanism without changing Calibre codes?

Any pointer/suggestion would be deeply appreciated.

Thanks in advance.

Jack
yo123 is offline   Reply With Quote