<commit_before>= asciidoctor-ant Task
========================
:asciidoc-url: http://asciidoc.org
:asciidoctor-url: http://asciidoctor.org
:asciidoctorj-url: https://github.com/asciidoctor/asciidoctorj
:issues: https://github.com/binout/asciidoctor-ant/issues
:ant-url: http://ant.apache.org/
:ant-classloader-url: http://enitsys.sourceforge.net/ant-classloadertask/
:issue-url: https://github.com/asciidoctor/asciidoctorj/issues/107
:binout-repo: http://repository-binout.forge.cloudbees.com/release/org/asciidoctor/asciidoctor-ant/

image:https://buildhive.cloudbees.com/job/binout/job/asciidoctor-ant/badge/icon["Build Status", link="https://buildhive.cloudbees.com/job/binout/job/asciidoctor-ant/"]

The asciidoctor-ant is the unofficial means of using {asciidoctor-url}[Asciidoctor] to render all your {asciidoc-url}[AsciiDoc] documentation using {ant-url}[Apache Ant].

== Installation

=== Prerequesites

* Ant (minimun Ant 1.8.0)
* {ant-classloader-url}[ant-classloadertask], as a workaround of known {issue-url}[issue] of {asciidoctorj-url}[Asciidoctor java integration].

=== Download

You can download the uber jar of asciidoctor-ant in {binout-repo}[binout repository]. This jar contains the Ant task and its dependencies : JRuby and {asciidoctorj-url}[asciidoctorj].

=== Declaration

[source,xml]
----
...
    <target name="asciidoctor-def">
        <taskdef resource="net/jtools/classloadertask/antlib.xml" classpath="lib/ant-classloadertask.jar"/>          <1>
        <classloader loader="thread" classpath="lib/asciidoctor-ant.jar"/>                                           <1>
        <taskdef name="asciidoctor" classname="org.asciidoctor.ant.AsciidoctorAntTask"/>
    </target>
...
----

<1> "lib" is a directory containing ant-classloadertask and the uber jar asciidoctor-ant.jar

== Usage

[source,xml]
----
...
   <asciidoctor sourceDirectory="src/test/resources" outputDirectory="target"/>
...
----

=== Configuration options

There are several configuration options that the asciidoctor-ant Task uses. The options are similar to asciidoctor-maven-plugin :

sourceDirectory:: the source directory of Asciidoc files (mandatory)
sourceDocumentName:: an override to process a single source file; defaults to all files in `${sourceDirectory}`
outputDirectory:: the ouput directory (mandatory)
imagesDir:: defaults to `images`, which will be relative to the directory containing the source files
backend:: defaults to `docbook`
doctype:: defaults to `article`
eruby:: defaults to erb, the version used in jruby
headerFooter:: defaults to `true`
compact:: defaults to `false`
sourceHighlighter:: enables and sets the source highlighter (currently `coderay` or `highlightjs` are supported)
embedAssets:: Embedd the CSS file, etc into the output, defaults to `false`<commit_msg>Add templateEngine and templateDirs<commit_after>= asciidoctor-ant Task
========================
:asciidoc-url: http://asciidoc.org
:asciidoctor-url: http://asciidoctor.org
:asciidoctorj-url: https://github.com/asciidoctor/asciidoctorj
:issues: https://github.com/binout/asciidoctor-ant/issues
:ant-url: http://ant.apache.org/
:ant-classloader-url: http://enitsys.sourceforge.net/ant-classloadertask/
:issue-url: https://github.com/asciidoctor/asciidoctorj/issues/107
:binout-repo: http://repository-binout.forge.cloudbees.com/release/org/asciidoctor/asciidoctor-ant/

image:https://buildhive.cloudbees.com/job/binout/job/asciidoctor-ant/badge/icon["Build Status", link="https://buildhive.cloudbees.com/job/binout/job/asciidoctor-ant/"]

The asciidoctor-ant is the unofficial means of using {asciidoctor-url}[Asciidoctor] to render all your {asciidoc-url}[AsciiDoc] documentation using {ant-url}[Apache Ant].

== Installation

=== Prerequesites

* Ant (minimun Ant 1.8.0)
* {ant-classloader-url}[ant-classloadertask], as a workaround of known {issue-url}[issue] of {asciidoctorj-url}[Asciidoctor java integration].

=== Download

You can download the uber jar of asciidoctor-ant in {binout-repo}[binout repository]. This jar contains the Ant task and its dependencies : JRuby and {asciidoctorj-url}[asciidoctorj].

=== Declaration

[source,xml]
----
...
    <target name="asciidoctor-def">
        <taskdef resource="net/jtools/classloadertask/antlib.xml" classpath="lib/ant-classloadertask.jar"/>          <1>
        <classloader loader="thread" classpath="lib/asciidoctor-ant.jar"/>                                           <1>
        <taskdef name="asciidoctor" classname="org.asciidoctor.ant.AsciidoctorAntTask"/>
    </target>
...
----

<1> "lib" is a directory containing ant-classloadertask and the uber jar asciidoctor-ant.jar

== Usage

[source,xml]
----
...
   <asciidoctor sourceDirectory="src/test/resources" outputDirectory="target"/>
...
----

=== Configuration options

There are several configuration options that the asciidoctor-ant Task uses. The options are similar to asciidoctor-maven-plugin :

sourceDirectory:: the source directory of Asciidoc files (mandatory)
sourceDocumentName:: an override to process a single source file; defaults to all files in `${sourceDirectory}`
outputDirectory:: the ouput directory (mandatory)
imagesDir:: defaults to `images`, which will be relative to the directory containing the source files
backend:: defaults to `docbook`
doctype:: defaults to `article`
eruby:: defaults to erb, the version used in jruby
headerFooter:: defaults to `true`
compact:: defaults to `false`
templateDir:: disabled by default, defaults to `null`
templateEngine:: disabled by defaultÈ
sourceHighlighter:: enables and sets the source highlighter (currently `coderay` or `highlightjs` are supported)
embedAssets:: Embedd the CSS file, etc into the output, defaults to `false`
{'fraction_non_alphanumeric': 0.13367203924316748, 'fraction_numerical': 0.003153468815697267, 'mean_word_length': 4.658077304261645, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6556008', 'n_tokens_mistral': 1776, 'n_tokens_neox': 1784, 'n_words': 463}