Class AsciiDocCompiler

java.lang.Object
pro.verron.officestamper.asciidoc.AsciiDocCompiler

public final class AsciiDocCompiler extends Object
Facade utilities to parse AsciiDoc and compile it to different targets.
  • Method Details

    • toDocx

      public static org.docx4j.openpackaging.packages.WordprocessingMLPackage toDocx(String asciidoc)
      Compiles the AsciiDoc source text directly to a WordprocessingMLPackage.
      Parameters:
      asciidoc - source text
      Returns:
      package with rendered content
    • toDocx

      public static org.docx4j.openpackaging.packages.WordprocessingMLPackage toDocx(AsciiDocModel model)
      Compiles the parsed model to a WordprocessingMLPackage.
      Parameters:
      model - parsed model
      Returns:
      package with rendered content
    • toModel

      public static AsciiDocModel toModel(String asciidoc)
      Parses AsciiDoc source text into an AsciiDocModel.
      Parameters:
      asciidoc - source text
      Returns:
      parsed model
    • toScene

      public static javafx.scene.Scene toScene(String asciidoc)
      Compiles the AsciiDoc source text directly to a JavaFX Scene.
      Parameters:
      asciidoc - source text
      Returns:
      scene with rendered content
    • toScene

      public static javafx.scene.Scene toScene(AsciiDocModel model)
      Compiles the parsed model to a JavaFX Scene.
      Parameters:
      model - parsed model
      Returns:
      scene with rendered content
    • toHtml

      public static String toHtml(String asciidoc)
      Compiles the AsciiDoc source text directly to HTML.
      Parameters:
      asciidoc - source text
      Returns:
      HTML representation
    • toHtml

      public static String toHtml(AsciiDocModel model)
      Compiles the parsed model to HTML.
      Parameters:
      model - parsed model
      Returns:
      HTML representation
    • toAsciidoc

      public static String toAsciidoc(org.docx4j.openpackaging.packages.WordprocessingMLPackage pkg)
      Compiles a WordprocessingMLPackage into the textual AsciiDoc representation used by tests. This mirrors the legacy Stringifier output to preserve expectations.
      Parameters:
      pkg - a Word document package
      Returns:
      textual representation
    • toModel

      public static AsciiDocModel toModel(org.docx4j.openpackaging.packages.WordprocessingMLPackage pkg)
      Parses a Word document into an AsciiDocModel.
      Parameters:
      pkg - a Word document package
      Returns:
      parsed model
    • toAsciidoc

      public static String toAsciidoc(AsciiDocModel model)
      Compiles the parsed model to its textual AsciiDoc representation.
      Parameters:
      model - parsed model
      Returns:
      textual representation