6 个版本
0.2.5 | 2024 年 6 月 10 日 |
---|---|
0.2.4 | 2024 年 6 月 7 日 |
0.2.2 | 2024 年 5 月 21 日 |
0.1.0 | 2024 年 4 月 20 日 |
在 解析实现 中排名第 2172
用于 2 crate
43KB
1.5K SLoC
解析 ansi 字符串并将其转换为 html 和 svg 格式
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
}
}
自定义字体
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
依赖
~2.4–3MB
~60K SLoC