0.06
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
simple and flexible html to markdown converter
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Simple html to Markdown ruby gem Code Climate

We love markdown, cause it is friendly to edit. So we want everything to be markdown

RSpec is our promise

p = HTMLPage.new :contents => '<strong>haha</strong>'
p.markdown.should == '**haha**'
p.contents = '<strong>hehe</strong>'
p.markdown!.should == '**hehe**'

# you can also define your own node parse
p.strong do |node,contents|
  "strong text : **#{contents}**"
end
p.markdown!.should be_include('strong text')

Installation

  • gem
gem install html2markdown
  • Rails Gemfile
gem 'html2markdown'

CLI usage

  • prints to stdout
html2markdown [file]
  • redirect to a new markdown file.
html2markdown index.html > index.md

Donation

Buy me a Kindle book 📖