Skip to content

SuperMMX/asciidog

Repository files navigation

AsciiDog

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.

Quick Start

# 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

Features

Parser

  • 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

Converter

  • AST Walker

  • Chunked output

Backend & Renderer

  • Template-based backend

  • Basic HTML5 backend

  • Basic ePub3 backend

  • Support vertical writing mode by passing option -Ooutput-writing-mode=vrl

Builder

AsciiDoc builder to create the AST easily

Plugin Infrastructure

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

TODO

  • Table

  • Create include node instead of hiding it in reader

Issues

Rendering

About

AsciiDoc in Groovy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages