Install Asciidoctor Command Line Tool – Part Three

If you need background as to why i had to do this, read about this in part one.

If you need to install ruby or the gem manager on your windows XP system, then read about it in part two.

You need ruby and the gem manager on your XP system before you can install the asciidoctor gem. If you’ve followed my previous post, by now you should have a ruby devkit on your C:\ drive and you will need to have changed into your devkit folder, before you run the gem install command below :

// --------------------------------
$ dir
HP_Owner@HP-PAVILLION c:\devkit >
$ gem install asciidoctor --platform=ruby
Fetching: asciidoctor-0.1.4.gem (100%)
Successfully installed asciidoctor-0.1.4
1 gem installed
Installing ri documentation for asciidoctor-0.1.4...
Installing RDoc documentation for asciidoctor-0.1.4...

Confirm Success

Now it’s time to confirm we’ve successfully installed this gem, so see the following joblog from my install session :

$ asciidoctor -v
Usage: asciidoctor [OPTION]... FILE...
Translate the AsciiDoc source FILE or FILE(s) into the backend output format (e.g., HTML 5, DocBook 4.5, etc.)
By default, the output is written to a file with the basename of the source file and the appropriate extension.
Example: asciidoctor -b html5 source.asciidoc

-v, --verbose enable verbose mode (default: false)
 -b, --backend BACKEND set output format backend (default: html5)
 -d, --doctype DOCTYPE document type to use when rendering output: [article, book, manpage, inline] (default: article)
 -o, --out-file FILE output file (default: based on input file path); use - to output to STDOUT
 --safe set safe mode level to safe (default: unsafe)
 enables include macros, but restricts access to ancestor paths of source file
 provided for compatibility with the asciidoc command
 -S, --safe-mode SAFE_MODE set safe mode level explicitly: [unsafe, safe, server, secure] (default: unsafe)
 disables potentially dangerous macros in source files, such as include::[]
 -s, --no-header-footer suppress output of header and footer (default: false)
 -n, --section-numbers auto-number section titles in the HTML backend; disabled by default
 -e, --eruby ERUBY specify eRuby implementation to render built-in templates: [erb, erubis] (default: erb)
 -C, --compact compact the output by removing blank lines (default: false)
 -a key[=value],key2[=value2],...,
 --attribute a list of document attributes to set in the form of key, key! or key=value pair
 unless @ is appended to the value, these attributes take precedence over attributes
 defined in the source document
 -T, --template-dir DIR a directory containing custom render templates that override the built-in set (requires tilt gem
 may be specified multiple times
 -E, --template-engine NAME template engine to use for the custom render templates (loads gem on demand)
 -B, --base-dir DIR base directory containing the document and resources (default: directory of source file)
 -D, --destination-dir DIR destination output directory (default: directory of source file)
 --trace include backtrace information on errors (default: false)
 -h, --help show this message
 -V, --version display the version


Look for the asciidoctor version number in the details. Ok, i used the wrong option as -v should have been uppercase as -V so try that and you should see something similar to this :

Asciidoctor 0.1.4 []

Nice one ! 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s