ManningAsciiDoc is a Rake buildsystem for generating Manning DocBook and PDF files from AsciiDoc.
- Outputs HTML5, Manning DocBook and PDF files from AsciiDoc source files.
- Generates whole book and individual chapter files.
- Validates all Manning DocBook files.
- Separates source content from outputted files.
- Uses an AsciiDoctor post-process filter plugin (rather than faffing with XSLT or regexes).
- Easily customisable.
ManningAsciiDoc currently generates valid Manning DocBook for my book Git in Practice which makes use of prefaces, parts, notes, callouts and various other features. It has been tested with varying AsciiDoc input but may need fixes for your book (patches are welcome).
Ensure you have
libxml installed on your system and setup
ManningAsciiDoc by running:
git clone git://github.com/mikemcquaid/ManningAsciiDoc.git cd ManningAsciiDoc gem list --installed --local bundler || gem install bundler bundle install
If you wish to generate PDF files please contact Manning and obtain a copy of
AAMakePDF and download and extract it into the
AAMakePDF directory (so
there should be a file named
ManningAsciiDoc assumes that your book's source files a particular format. I've provided a sample repository for this at https://github.com/mikemcquaid/SampleManningAsciiDocBook.
You can see (and customize) the various assumptions that are made in the Rakefile. HTML5, whole book XML and PDF output rely on the preface/parts/chapters being sorted by filename.
You can now generate the HTML5, Manning DocBook or PDF output with:
rake html5 rake docbook rake pdf
This will output
book.pdf in the
subdirectory (and copy all images under it).
I recommend you make
./input/ a separate (private) Git repository and
./output/ a checkout of the Subversion directory you will use for submission
ManningAsciiDoc is licensed under the MIT License. The full license text is available in [LICENSE.txt](https://github.com/mikemcquaid/ManningAsciiDoc/blob/master/LICENSE .txt).