Changing html back to markdown
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits ahead of elisehuard:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
README.md
Rakefile
nwodkram.gemspec

README.md

Nwodkram

nwodkram (markdown in reverse) is a tool to reverse html into markdown.

Usage

The gem reopens class String and adds a to_markdown method. When valid html is given, it returns markdown.

html = File.open('page.html', 'r') {|f| f.read }
markdown = html.to_markdown

Use case

My use case was to migrate a blog from wordpress.com to something more civilised (and self-hosted).

Supports

tags:

p, a, img, ul, ol, li, h1, h2, h3, em, strong, blockquote

rubies: tested with MRI ruby 1.8.7 and 1.9.2 (preview1)

TODO

The tool doesn't support the full markdown syntax.

If this tool gets used, I could extend it. For now, it's suffient for my limited purposes.