#!C:\Perl\bin\perl.exe
#
# Convert an entire directory of DOT files to jpegs
#
# The output type can be easily changed by changing the 
# system call below.  To change the type, change "-Tjpeg"
# to "-Tpng" to get png output.  If this is changed, be
# sure to also change the file extension from "-o$1.jpg"
# to "-o$1.png"
#

$dotdir = "./output";

@files = glob("$dotdir/*.dot");

for $file (@files) {
    print "$file\n";
    if ($file =~ /^(.*)\.dot$/) {
	`dot -Tjpeg -o$1.jpg $file`
    }
}
