A few HTML to Markdown converters written in javascript, Python, Ruby, PHP and C#
Posted by jpluimers on 2014/07/24
It’s not perfect, but makes the conversion a heck of a lot easier:
to-markdown – an HTML to Markdown converter written in javascript (of which sources are on github).
[Edit 20150919: added more converters: now at least there is competition (:]
Not perfect either: html.md (click on the Demo button at the bottom of the page to test), but it can be ran from the console as well (there is an npm package for it):
html.md is a pure JavaScript library for converting HTML in to valid Markdown (sources are on github as well).
A JavaScript version without a browser demo, but with another npm package is html2markdown:
html2markdown – Javascript Implementation for converting HTML to Markdown text.
Then there is this Python script and module aaronsw/html2text:
html2text – Convert HTML to Markdown-formatted text.
Pandoc – though supporting many conversion formats – is not as good from html to markdown as the others: Try pandoc!
For people using Ruby, there are the gems reverse_markdown and html2markdown:
reverse_markdown – Ruby gem to convert html into markdown.
html2markdown – simple and flexible html to markdown converter.
In C#, there is a library with tests, but without a console front-end baynezy/Html2Markdown:
Html2Markdown – A library for converting HTML to markdown syntax in C#.
Finally I found something for PHP lovers: html-to-markdown:
html-to-markdown – Convert HTML to Markdown with PHP
I don’t have time to test them all now, so I go with the first two for now until I run in trouble (they both run in the browser which is very convenient), then test the others until I’ve the least trouble.
–jeroen
Leave a Reply