Skip to content

Instantly share code, notes, and snippets.

@SamuelMarks
Created March 9, 2015 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamuelMarks/b8e6c33621d5182c501e to your computer and use it in GitHub Desktop.
Save SamuelMarks/b8e6c33621d5182c501e to your computer and use it in GitHub Desktop.
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