ansi2

Crates.ioansi2
lib.rsansi2
version0.2.5
sourcesrc
created_at2024-04-20 02:32:18.036862
updated_at2024-06-10 05:36:51.751479
descriptionansi2
homepagehttps://github.com/ahaoboy/ansi2
repositoryhttps://github.com/ahaoboy/ansi2
max_upload_size
id1214291
size50,802
阿豪 (ahaoboy)

documentation

README

Parse ansi strings and convert them to html and svg formats

neofetch | ansi2 --format=svg --theme=vscode > neofetch.svg

npm run bench:run | ansi2 --format=svg | resvg - -c > bench.png

ansi2

use ansi2::{Canvas};

let canvas = Canvas::new(s);
for row in canvas.pixels.iter() {
  for pixel in row.iter() {
      // draw pixel
  }
}

custom font

neofetch | ansi2 --format=svg --theme=vscode --font=./font.ttf > ./neofetch.svg

16colo

https://16colo.rs/pack/laz17/ll-darlaakacrystal.ans

cat ./ll-darlaakacrystal.ans | ansi2 --format=svg --width=80 > ll-darlaakacrystal.svg

Commit count: 16

cargo fmt