Created
September 3, 2012 06:25
-
-
Save mbohun/3607275 to your computer and use it in GitHub Desktop.
dia_export-diagrams.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# uses the dia http://live.gnome.org/Dia command line interface to | |
# re-generate .png diagrams from .dia files in a directory, this way | |
# - you can get images of diagrams regenerated 'automatically' everytime | |
# you modify a diagram (.dia file) | |
# - you do not have to keep your images in sync with diagrams manually | |
# - you do not need to store .png/.jpg/.svg in repository | |
# - can be run as a hook, inotify, cronjob | |
# | |
DIA=/usr/bin/dia | |
for file in `ls | grep -i ".*\.dia$"` | |
do | |
base=`expr "$file" : '\(.*\)\.dia$'` | |
$DIA --export=$base.png --filter=pixbuf-png $file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment