Dear Furbland,
I was able to spin up this bash script as an example. Feel free to take
a look; use at your own risk.
-William
On 9/25/26 11:13 AM, Furbland Channel 2 wrote:
Hello, I’m wanting to (on-demand, relatively quickly) pass an LY file via stdin
and then receive rendered png output from stdout. I’ve tried this with the
`lilypond' binary, but no matter what I do it takes a very long time and
generates a ton of extra formats that I don’t need. Anyone have any ideas?
#!/usr/bin/env bash
# example usage:
# $ cat rep.ly | ./lily-to-png > output2.png
lily_file=$(mktemp)
cat > $lily_file
lilypond -dcrop --png -o "$lily_file" "$lily_file"
cat "$lily_file.cropped.png"
rm "$lily_file.cropped.png" "$lily_file.png" "$lily_file"