I wrote a “blog” engine called Modest some time ago, and released an even more modest version which is literally just a Makefile + discount. Especially interesting given the number of posts which criticize complicated blog engines these days.
I would strongly suggest taking a look at Pandoc, it is an N:M document conversion tool that supports markdown, html, pdf, epub, etc. With readers and writers for markdown and html, meaning it can convert from HTML into markdown.
The need for html -> md was a one time need for this purpose (though, I didn’t realize pandoc did that, and will consider it the future). I’ve looked at pandoc before, but we’ll look again. What I’m doing now though, works completely fine for me though.