This repo holds the backend templates for converting .asciidoc files into .html files in the htmlbook flavor. The repo ships with 2 backends:
htmlbook- a set of templates that can be used directly with theasciidoctorgem. This is a direct source conversionhtmlbook-autogen- a set of templates that can only be used with theorm_asciidoctorgem. This provides some autogeneration abilities.
In this folder there's a script that helps you convert book files written in asciidoc into htmlbook. Before you run it, it assumes you have installed the asciidoctor gem.
Convert a book by running the script like this:
$ ruby scripts/convert_folder PATH_TO_BOOK_REPOSo If my book repo exists in /Documents/MyBook, you would do the following:
$ ruby scripts/convert_book.rb /Documents/MyBookThe 'machine' directory contains a python script that will read a gitenberg yaml file and merge it with a template file using the Jinja2 template engine. A hook for this has been inserted into the htmlbook-autogen conversion. Assumes installation of ./machine/requirements.txt
run the command like this:
$ python ./gitberg-machine/machine.py -m /Documents/MyBook/metadata.yaml /Documents/MyBook/book.html