Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is pretty interesting. For the book I'm co-authoring at the moment[0] I ended up putting together my own toolchain, including:

1. A dead-simple web IDE for asciidoc with live preview[1]

2. A script for checking for common AsciiDoc mistakes (e.g. an unterminated table will mess up all text following it).

3. A script which enforces the house style.

4. A makefile which runs docker (of course) to build the book with Manning styling.

5. A buildbot configuration on my server to run 2, 3 and 4 above on `git push` and move the generated pdf and docx into a directory served by nginx.

Though it may seem like a lot, this investment has been totally worth it - the ability to push a change and be viewing the updated pdf in ~1 minute is very liberating. I can't imagine what it'd be like to not have this kind of thing in place. I can share some more of the above if there's interest.

If you're ever thinking of writing a book yourself, I'd highly recommend making the investment into a process like the above (or a tool like GitBook, though I've never tried it and it seems to be more than just a build tool) so you can get the boring stuff out of the way and focus on what you want to be doing - writing.

[0] http://docker-in-practice.github.io/ [1] https://github.com/aidanhs/AsciiDocIde



We did the same for our book about Groovy language. Our Jenkins-based build was:

- checking markdown for grammar errors

- transforming the markdown into doc files, required by the publisher (Packt), with all the Word formatting applied

- compile the Groovy code in the examples and verify the code with a Linter


I've written a book for Packt, and I'm in the middle of another - I'd kill for a Markdown converter for their Word format. Any chance you've open sourced it?


drop me an email - contact details in my profile


Very interesting, thanks for sharing. Can this toolchain produce epubs/kindles too?


At present it uses asciidoctor[1] to go from asciidoc to docbook, then to .docx via pandoc[2] and .pdf via a Manning-provided tool (for styling reasons).

pandoc is pretty incredible. As you can see from its page, it can produce epubs and many other things - it's likely that with pandoc and a docbook file you can build a pipeline to take you wherever you need. For your purposes, you'd probably go from EPUB to kindle with KindleGen.

[1] http://asciidoctor.org/ [2] http://johnmacfarlane.net/pandoc/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: