View Single Post
Old 06-01-2010, 07:04 PM   #5
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by ctop
This is an excellent idea. How would I go about that?
Copy txtmlizer.py and name it something like markdownmlizer.py. Then make the changes to markdownmlizer.py like you were doing previously to have it write markdown formatting in the appropriate places.

Supporting the MarkdownMLizer would be the easiest part. In the txt output.py file all you would need to do is add an option (--markdown-output for example) and in the convert function assign the writer variable to the MarkdownMLizer object. For example:

Code:
def convert(self, oeb_book, output_path, input_plugin, opts, log):
    if opts.markdown-output:
        writer = MarkdownMLizer(log)
    else:
        writer = TXTMLizer(log)
    txt = writer.extract_content(oeb_book, opts)
Quote:
Originally Posted by ctop
Could this be a bug?
Most likely yes. Open a ticket so it can be looked into.
user_none is offline   Reply With Quote