11 $dir =~ /([^\/]*)\
/?$/;
14 print "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?> <!-- -*- xml -*- -->\n";
17 print "<sheet xmlns=\"http://www.lysator.liu.se/~alla/dia/dia-sheet-ns\">\n";
19 print " <name>$name</name>\n";
20 print " <description>DESCRIBE $name</description>\n";
22 print " <contents>\n";
24 opendir(DIR
, $dir) || die "can't opendir $dir: $!";
25 my @shapes = grep { /\.shape$/ && -f
"$dir/$_" } readdir(DIR
);
28 foreach my $shape (@shapes) {
29 $shape =~ s/(.*)\.shape$/$1/;
30 print " <object name=\"$name - $shape\">\n";
31 print " <description>DESCRIBE $shape</description>\n";
35 print " </contents>\n";