Crates.io | pikchr |
lib.rs | pikchr |
version | |
source | src |
created_at | 2020-10-24 19:13:51.106669+00 |
updated_at | 2025-03-01 10:43:00.973462+00 |
description | PIC-like diagramming language to SVG converter |
homepage | |
repository | https://github.com/kinnison/pikchr |
max_upload_size | |
id | 305076 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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 28th February 2025.
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).