html2markdown updated

2007 April 30
by darkness

I just uploaded html2markdown 0.3. This changes list item indentations (hanging indent, indentation of multiple paragraphs in a list item) and hopefully handles raw HTML (i.e., HTML that is not possible to generate with “Markdown markup,” at least in Markdown.pl) better.

I’ve got a few things I want to do to html2markdown before I announce it on the Markdown list:

  • Make a setup.py for it
  • Maybe clean up test cases, since they’re currently rather non-standard in how they’re generated and run (maybe I could depend on python-markdown instead of Markdown.pl being in the path and executable)
  • Check to make sure it has a sane interface when used as a library (import html2markdown; print html2markdown.convert("---"))
  • Make a nicer web page for it

There may be a few more code cleanups too.

By the way, thanks to Karl Mowatt-Wilson for pointing out that html2markdown and python-markdown don’t get together too well sometimes. That led to the changes in indentation and maybe another fix or two in html2markdown, and I also filed several bugs with python-markdown where it differs from Markdown.pl.

2 Comments leave one →
2008 March 24
Ramon permalink

Nice library, but I can’t seem to get it to work. Shouldn’t this work?

from html2markdown import html2markdown

html = “”"My titleThis is a test”"”
print “CONVERTING “+html
print html2markdown(html)

2008 March 24
darkness permalink

It seems that my web log ate your HTML. Can you either re-enter it (maybe as entities, then?) or mail me the sample to darkness@caliginous.net? Thanks, darkness

Leave A Comment

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS