Skip to content

kinnison/pikchr

Repository files navigation

Pikchr - Diagram renderer

Taken from the pikchr homepage:

Pikchr (pronounced like "picture") is a PIC-like markup language for diagrams in technical documentation. Pikchr is designed to be embedded in fenced code blocks of Markdown (or in similar mechanisms in other markup languages) to provide a convenient means of showing diagrams.

This crate wrappers the pikchr.c version downloaded from that website on the 23rd August 2023.

You can use it as follows:

use pikchr::{Pikchr, PikchrFlags};

let piccy = Pikchr::render(
    diagram_str,
    None,
    PikchrFlags::default()).unwrap();

println!("{}", piccy);

There is a little helper program that reads a Pikchr file named on the command line and renders it as SVG to the standard output:

cargo run -p pikchr-cli -q foo.pikchr > foo.svg

You can install it with cargo install pikchr-cli (cargo install --path=pikchr-cli from the source tree).

About

pikchr diagram rendering crate

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt

Stars

Watchers

Forks

Packages

No packages published