Ubuntu 15.10 で asciidoctor を使って groovy-ssh のドキュメントのPDFを生成する件
諸事情により 相当大きなサイズのファイルを scp でサーバにアップロードすることがあるのだが... のエントリーでお世話になった Gradle SSH Plugin ですが、そのドキュメントが asciidoc で書かれていて素敵だったので asciidoc と asciidoctor について調べた話です。
事前準備
Ubuntu 15.10 上で試しています。 まずは必要なツールをインストールしておきます。
sudo apt-get install asciidoctor
sudo gem install coderay
sudo gem install asciidoctor-pdf --pre
Gradle SSH Plugin ドキュメント(asciidoc)を入手
Gradle SSH Plugin のドキュメントは groovy-ssh にあるようなので取得します。
git clone https://github.com/int128/groovy-ssh.git
ドキュメントを HTML と PDF へ変換
asciidoc ソースのあるディレクトリへ移動して変換します。
cd groovy-ssh/docs/src/docs/asciidoc
asciidoctor -b html5 index.adoc
asciidoctor -r asciidoctor-pdf -b pdf index.adoc
これで index.html と index.pdf が生成されました。
以上です。