aasvg 1.0.0

Convert ASCII art diagrams to SVG with automatic light/dark mode support
Documentation
  • Coverage
  • 100%
    9 out of 9 items documented4 out of 4 items with examples
  • Size
  • Source code size: 417.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.4 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • bearcove/aasvg-rs
    35 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • fasterthanlime

aasvg-rs

Crates.io Documentation License

A Rust port of aasvg, which converts ASCII art diagrams into SVG.

example

CLI Usage

cargo install aasvg-cli

# Convert a file
aasvg input.txt -o output.svg

# Or use stdin/stdout
cat input.txt | aasvg > output.svg

Library Usage

use aasvg::render;

let diagram = r#"
    +-----+     +-----+
    |     |---->|     |
    +-----+     +-----+
"#;

let svg = render(diagram);

The output SVG automatically supports light and dark mode via CSS prefers-color-scheme.

Attribution

This project is a Rust port of Martin Thomson's aasvg, which itself uses the diagram rendering code from Morgan McGuire's Markdeep.

Related projects:

  • goat - A Go implementation that reimplements the Markdeep algorithm

License

BSD-2-Clause, matching the original aasvg license.