How to: convert asciidoc book to epub/mobi formats

Many open source books are written in asciidoc, in order to read the book in kindle, I have to convert it to mobi file. Here’s a quick note on how to convert files.

  1. Use asciidoctor to convert asciidoc book to docbook
  2. Use pandoc to convert to epub
  3. Use Calibre to convert epub to mobi
asciidoctor -d book -b docbook5 book.asciidoc -o output.docbook
pandoc -f docbook -t epub output.docbook -o book.epub

Then use Calibre to convert epub to mobi files