Skip to content

Commit 4b475c9

Browse files
author
p12
committed
Images: move inheritance diagram related files to a separate directory
1 parent 8f125cf commit 4b475c9

34 files changed

+20
-12
lines changed

images/generate.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,28 @@
1717
# along with this program. If not, see http://www.gnu.org/licenses/.
1818

1919
mkdir -p "output"
20+
mkdir -p "output/inheritance"
2021

21-
for i in $(find -iname "*.dot")
22+
for i in $(find inheritance -iname "*.dot")
2223
do
24+
25+
o=${i#*/}
26+
27+
outdir="output/inheritance/"
2328
infile="$i"
24-
outfile="output/$i.svg"
25-
mapfile="output/$i.map"
26-
wikimapfile="output/$i.wikimap"
27-
tmpsvgfile="output/$i.tmpsvg"
28-
tmpdotfile="output/$i.tmpdot"
29+
setfile="inheritance/settings-dot"
30+
outfile="$outdir/$o.svg"
31+
mapfile="$outdir/$o.map"
32+
wikimapfile="$outdir/$o.wikimap"
33+
tmpsvgfile="$outdir/$o.tmpsvg"
34+
tmpdotfile="$outdir/$o.tmpdot"
2935

30-
python preprocess.py $infile $tmpdotfile
36+
python preprocess.py $infile $setfile $tmpdotfile
3137
dot -Tsvg -o$tmpsvgfile $tmpdotfile
3238
xsltproc --novalid fix_svg-dot.xsl $tmpsvgfile > $outfile
3339
dot -Timap $tmpdotfile | sed 1d | awk '{sub(/,/, " ", $3); sub(/,/, " ", $4); print $1" "$3" "$4" [["$2"]]"; };' > $mapfile
3440

35-
wikiimage=$(echo $i | sed 's/\.\///' | sed 's/\.dot//')
41+
wikiimage=$(echo $o | sed 's/\.\///' | sed 's/\.dot//')
3642
echo "{{inheritance diagram|image=$wikiimage.svg|notes={{{notes|}}}|map=" > $wikimapfile
3743
cat $mapfile >> $wikimapfile
3844
echo "}}" >> $wikimapfile
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)