4 releases

0.1.3 Sep 20, 2023
0.1.2 Aug 8, 2023
0.1.1 May 8, 2021
0.1.0 Oct 24, 2020

#119 in Visualization

Download history 208/week @ 2024-07-19 90/week @ 2024-07-26 90/week @ 2024-08-02 336/week @ 2024-08-09 204/week @ 2024-08-16 140/week @ 2024-08-23 207/week @ 2024-08-30 151/week @ 2024-09-06 151/week @ 2024-09-13 194/week @ 2024-09-20 172/week @ 2024-09-27 301/week @ 2024-10-04 340/week @ 2024-10-11 331/week @ 2024-10-18 292/week @ 2024-10-25 250/week @ 2024-11-01

1,271 downloads per month
Used in 12 crates (4 directly)

MIT/Apache

295KB
7K SLoC

C 7K SLoC // 0.1% comments Rust 163 SLoC // 0.0% comments

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).

Dependencies

~0.4–325KB