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.
- Use asciidoctor to convert asciidoc book to docbook
- Use pandoc to convert to epub
- 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
when i convert the epub to mobi with calibre the code snipts missed up , any help !
It depends on the problem, but I think you can try to convert to AZW3 because it support more features and styles which kind of equivalent of epub.
References:
– https://www.mobileread.com/forums/showthread.php?t=263478
why not just use asciidoc to convert to epub and mobi? http://asciidoctor.org/docs/convert-asciidoc-to-epub/
Thanks, good to know this option, it makes the steps much simpler. The downside is it’s still in alpha and has a long list of todos: https://github.com/asciidoctor/asciidoctor-epub3/blob/master/WORKLOG.adoc. To me, the svg support is one of the required features. Anyway, I will keep an eye on it and would try this solution next time.
According to step 1
pandoc -f docbook -t epub out.docbook -o book.epub
should rather be
pandoc -f docbook -t epub output.docbook -o book.epub
Another thing: cross references seem not to be working using this approach 🙁