Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
gen_png_from_dot.bash
#!/usr/bin/env bash
if [ -z "$1" ]; then
>&2 echo "Usage: gen_png_from_dot <dot_file> <png_location=exports>"
exit 1
fi
while inotifywait -e close_write "$1";
do `which dot` -Tpng -o "${2:-exports}/${1%???}.png" "$1";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.