Skip to content
/ ansi2 Public

Parse ansi strings and convert them to html and svg formats

Notifications You must be signed in to change notification settings

ahaoboy/ansi2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

html

neofetch | ansi2 --format=html > neofetch.html

svg

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

theme

vga / vscode / ubuntu

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

example

neofetch

vitest

About

Parse ansi strings and convert them to html and svg formats

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published