okami.mom/albedo
git clone https://git.nkp.pet/okami.mom/albedo
2e306d5
main
albedo-render
Turns part of a source file into pictures of the code, with syntax colors and
line numbers, so the model can look at code the way a person does. albedo's
view extension runs it when the model calls view_code or view_diff.
It colors the whole file, so a range that starts inside a comment or string still looks right. Long lines wrap at 79 columns with an arrow marking the wrap, and long ranges are split into several images.

Install it with ./install.sh (needs cargo), which puts the binary in
priv/bin.
1# albedo-render 2 3Turns part of a source file into pictures of the code, with syntax colors and 4line numbers, so the model can look at code the way a person does. albedo's 5`view` extension runs it when the model calls `view_code` or `view_diff`. 6 7It colors the whole file, so a range that starts inside a comment or string 8still looks right. Long lines wrap at 79 columns with an arrow marking the 9wrap, and long ranges are split into several images. 10 11 12 13Install it with `./install.sh` (needs cargo), which puts the binary in 14`priv/bin`.