markdown-tool-0.1.9 is not a library.
markdown-tool
markdown-tool
is a simple command-line utility for converting Markdown documents to various formats and abstract
syntax tree (AST) representations, and vice versa.
Features
- Convert between Markdown, JSON-based AST, and YAML-based AST formats
- Lightweight, zero-dependency CLI
- Easily scriptable in CI/CD workflows or shell scripts
Installation
Install via crates.io (requires Rust and Cargo):
Alternatively, download pre-built packages:
- Debian (
.deb
):
Usage
Usage: markdown-tool convert --from <FROM> --to <TO>
Options:
--from <FROM> Inbound document format. Possible values are: `markdown`, `ast-json`, and `ast-yaml`
--to <TO> Outbound document format. Possible values are: `markdown`, `ast-json`, and `ast-yaml`
Supported Formats
Key | Description |
---|---|
markdown | Standard Markdown text |
ast-json | JSON-formatted abstract syntax tree |
ast-yaml | YAML-formatted abstract syntax tree |
Examples
Convert a Markdown file to JSON AST:
Convert JSON AST back to Markdown:
Convert YAML AST to Markdown:
Pretty-print Markdown:
📚 Documentation
Contributing
Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request on GitHub.
License
Dual-licensed under MIT. See LICENSE for details.