Convert AsciiDoc document to AST using the IntelliJ AsciiDoc Plugin parser
- Clone the repository using
--recurse-submodules
- Make sure that you have Java 11 installed (you can use SDKMAN!)
- Build a jar
./gradlew app:shadowJar
java --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED -jar app/build/libs/app-all.jar foo.adoc
The Java application can also read AsciiDoc content from STDIN when the command ends with -
:
cat foo.adoc | java --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED -jar app/build/libs/app-all.jar -
NOTE: jpackage
is only available on Java >= 17.
Create a .deb/.rpm/.msi/.dmg (depending on the OS you are running...):
$ /usr/lib/jvm/java-17/bin/jpackage -n asciidoc-ast --main-class net.pdp7.asciidoc.App --main-jar app-all.jar --input app/build/libs/ --java-options "--add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED"
You can also use --type app-image to create a self-contained directory with a binary.