Parse ansi strings and convert them to html and svg formats
cargo install ansi2
cargo binstall ansi2
neofetch | ansi2 --format=svg --theme=vscode > neofetch.svg
npm run bench:run | ansi2 --format=svg | resvg - -c > bench.png
npm run bench:run | ansi2 --format=html | resvg - -c > bench.html
npm run bench:run | ansi2 --format=text | resvg - -c > bench.text
use ansi2::{Canvas};
let canvas = Canvas::new(s);
for row in canvas.pixels.iter() {
for pixel in row.iter() {
// draw pixel
}
}
npm i ansi2 -g
neofetch | ansi2 --format=svg --theme=vscode > ./neofetch.svg
neofetch | ansi2 --format=html > neofetch.html
neofetch | ansi2 --format=svg > neofetch.svg
vga / vscode / ubuntu
neofetch | ansi2 --format=svg --theme=vscode > neofetch.svg