How to Convert Asciidoc Text to HTML using Groovy
Join the DZone community and get the full member experience.Join For Free
Here is how you can convert
asciidoc text using a Groovy script:
// filename: RunAsciidoc.groovy @Grab('org.asciidoctor:asciidoctor-java-integration:0.1.3') import org.asciidoctor.* def asciidoctor = Asciidoctor.Factory.create() def output = asciidoctor.renderFile(new File(args), [:]) println(output);
Now you may run it
groovy RunAsciidoc.groovy myarticle.txt
Many thanks to the
Published at DZone with permission of Zemian Deng, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.