AsciiDog is an implementation in Groovy of the popular lightweight markup language AsciiDoc (another popular implementation is Asciidoctor).
There is no official AsciiDoc grammar yet, but people are showing interest to create one.
This project is still in very early stage, and not ready for any kind of usage.
# ePug library
git clone https://github.com/SuperMMX/epug.git
# build and publish
cd epug
./gradlew publishToMavenLocal
# AsciiDog
git clone https://github.com/SuperMMX/asciidog.git
# Convert README.adoc to html5 and epub
cd asciidog
./gradlew run -Pargs="-i README.adoc -b html5,epub -o build"
# View build/README.html and build/README.epub
-
Structure
-
Document header
-
Title
-
Author
-
Basic document attribute
-
-
-
Directive
-
Include
-
-
General block
-
Attribute, ID, Title
-
Section
-
-
Styled Block
-
Verse
-
Quote
-
Open block
-
-
List
-
Ordered list
-
Markdown style: 1. / 2. etc.
-
-
Unordered list
-
-
Block Macro
-
Image
-
-
Inline
-
Attributes: role / class
-
Formatting
-
Strong
-
Emphasis
-
Mark
-
-
Attribute reference
-
Cross reference
-
Link
-
-
Template-based backend
-
Basic HTML5 backend
-
Basic ePub3 backend
-
Support vertical writing mode by passing option
-Ooutput-writing-mode=vrl
Backend: To render and save the rendered result
There are different types of plugins:
-
Parser: To parse text into AST nodes
-
Builder: To create AST nodes with DSL
-
Processor: To create, delete and transform the AST nodes
-
Renderer: To render AST nodes for a backend
Sample plugin suite:
-
CriticMarkup, including parsers, builders and templates for html5 backend