This is the main binary for the command line processor. Think of it as the equivalent to
the asciidoctor tool.
cargo run --all-features -- --help
AsciiDoc toolchain
Usage: acdc <COMMAND>
Commands:
convert Convert AsciiDoc documents to various output formats
inspect Inspect AST structure of AsciiDoc documents
tck Run TCK compliance tests (reads JSON from stdin)
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print versionConvert AsciiDoc documents to various output formats (HTML, terminal).
acdc convert [OPTIONS] [FILES]...Inspect the AST structure of AsciiDoc documents. Useful for debugging and understanding how acdc parses documents. Only available with --features inspect.
acdc inspect [OPTIONS] <FILE>Check the converters README for details.
acdc-cli uses Cargo feature flags to enable optional converters and development tools. Here’s what’s available:
-
html(default) - HTML5 converter with Asciidoctor-compatible styling -
manpage- Manpage converter -
markdown- Markdown converter with CommonMark and GitHub Flavored Markdown support -
terminal- Terminal converter with ANSI color support
-
highlighting- Enable syntax highlighting for source blocks in HTML output (uses syntect)
-
inspect- AST inspection tool for debugging parser output -
tck- Technology Compatibility Kit for spec compliance testing
For convenience, you can use these feature groups:
-
all-backends- Enables both HTML and terminal converters -
dev-tools- Enables the inspect tool -
test-tools- Enables the TCK tool
Build with terminal converter:
cargo build --features terminalBuild with all backends:
cargo build --features all-backendsBuild with development tools:
cargo build --features dev-toolsBuild with everything:
cargo build --all-featuresConvert a file to HTML:
acdc convert document.adocConvert with terminal backend:
acdc convert --backend terminal document.adocTerminal output with pager disabled:
acdc convert --backend terminal --no-pager document.adocConvert to embeddable HTML (no DOCTYPE, html, head, body):
acdc convert --embedded document.adoc
# or short form
acdc convert -e document.adocInspect document AST:
acdc inspect document.adoc --show-locations