Skip to content

Instantly share code, notes, and snippets.

What would you like to do? Export all .drawio files in folder to PDF and PNG while preserving history. Very useful as a post-commit hook.
rm -f *.pdf
rm -f *.png
COMMIT=$(git rev-parse HEAD)
for f in *.drawio
/Applications/ --export --all-pages --output $f.pdf $f
/Applications/ --export --all-pages --output $f.png $f
cp $f.pdf history/$f.${COMMIT::8}.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment