char-slop/ai-dots
ai dotfiles
git clone https://git.t4t.associates/char-slop/ai-dots
67898d2
main
files
| src/ | |
| .gitignore | 15 B |
| Cargo.lock | 47.9 KiB |
| Cargo.toml | 291 B |
| README.md | 897 B |
visualize-code
renders a slice of a source file as a syntax-highlighted png (catppuccin latte, ioskeley mono)
for the visualize_code tool in extensions/hashline/visualize-code.ts.
visualize-code < out.png> < path> < first-line> < label> ...< source
stdin is the whole file, so highlighting has full context; path is only used to detect the
language. one line is rendered per label, starting at first-line (1-indexed), until the image
would get big enough for providers to downsample it. the number of lines rendered is printed to
stdout.
building
the fonts are embedded but not committed:
curl -sSLO https://github.com/ahatem/IoskeleyMono/releases/latest/download/IoskeleyMono-NL.zipunzip -j IoskeleyMono-NL.zip'Normal/Unhinted/IoskeleyMonoNL-' {Regular,Bold,Italic,BoldItalic}.ttf-d fontscargo build--release cp target/release/visualize-code ../../libexec/