Take a markdown file in a blown out ePub and generate a .mobi and .epub ebook from it. ebook-convert is a Calibre command line app.