npm install ansi2Parse ansi strings and convert them to html and svg formats
bash
npm i ansi2 -g
cargo binstall ansi2
cargo install ansi2 --features="cli"
`usage
`bash
neofetch | ansi2 > ./neofetch.svg
neofetch | ansi2 --format=svg --theme=vscode > neofetch.svgvitest bench --run | ansi2 --format=html --mode=light > bench.html
vitest bench --run | ansi2 --format=text > bench.txt
vitest bench --run | ansi2 --format=svg --mode=dark | resvg - -c > bench.png
`ansi2
`rs
use ansi2::{Canvas};let canvas = Canvas::new(s);
for row in canvas.pixels.iter() {
for pixel in row.iter() {
// draw pixel
}
}
`ansi2-wasm
`bash
npm i ansi2 -gneofetch | ansi2 > ./neofetch.svg
neofetch | ansi2 --format=svg --theme=vscode > neofetch.svg
`options
$3
`bash
neofetch | ansi2 --format=html > neofetch.html
neofetch | ansi2 --format=svg > neofetch.svg
`$3
vga / vscode / ubuntu
`bash
neofetch | ansi2 --format=svg --theme=vscode > neofetch.svg
`
$3
`bash
neofetch | ansi2 --format=svg --font=./font.ttf > neofetch.svg
`$3
dark / light
`bash
neofetch | ansi2 --format=svg --mode=dark > neofetch.svg
``