Parse ansi strings and convert them to html and svg formats
## install
It is recommended to use npm, it will compress svg using svgo
```bash
npm i ansi2 -g
cargo binstall ansi2
cargo install ansi2 --features="cli"
```
## usage
```bash
vitest bench --run | ansi2 --format=svg --mode=dark | resvg - -c > bench.png
cat ./assets/ghostty.png | ansi2 -f=ans
```
## [ansi2](./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](./ansi2-wasm)
```bash
npm i ansi2 -g
```
## options
### format
```bash
```
### theme
vga / vscode / ubuntu
```bash
### font
```bash
### mode
dark / light
```bash
## example
### neofetch
<div align="center">
<a href="https://github.com/ahaoboy/neofetch">
<img src="assets/win11.svg">
</a>
</div>
### vitest
<div align="center">
<a href="https://github.com/ahaoboy/ansi2">
<img src="assets/vitest.svg">
</a>
</div>