pandoc
convert all the (text) things, check out pandoc
convert markdown to html
pandoc README.md -o README.html
convert html to markdown
pandoc README.html -o README.md
convert anything to markdown
also extract attachments
pandoc input.epub -t gfm --extract-media=./images -o output.md
pandoc input.epub -t gfm-raw_html --extract-media=./images -o output.md