-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
gen
executable file
·61 lines (52 loc) · 1.71 KB
/
gen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
#
# "compare" - image magick compare program
#
if test -n "$1"; then
echo hallo?
SRC=$1
else
SRC="mmrest-1 bravura-mmrest mmrest-2 mmrest-4 mmrest-5 mmrest-6 mmrest-7 mmrest-8 mmrest-9\
fmrest-1 fmrest-2 fmrest-3 fmrest-4 fmrest-5 fmrest-6 measure-repeat-1 \
noteheadposition-1 valign-1 emmentaler-1 bravura-1 emmentaler-2 bravura-2\
emmentaler-3 bravura-3 emmentaler-4 bravura-4 emmentaler-5 bravura-5\
emmentaler-6 bravura-6 emmentaler-7 bravura-7\
emmentaler-8 bravura-8 emmentaler-9 bravura-9 emmentaler-10 bravura-10\
emmentaler-11 bravura-11 frametext ottava"
fi
MSCORE=../build.debug/mscore/mscore
DPI=130
F=vtest.html
rm -rf html
mkdir html
cd html
for src in $SRC; do
echo process ../$src
cp ../$src-ref.png .
../$MSCORE ../$src.mscz -r $DPI -o $src.png
compare $src-1.png $src-ref.png $src-diff.png
done
cp -f ../style.css .
rm -f $F
echo "<html>" >> $F
echo " <head>" >> $F
echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">" >> $F
echo " </head>" >> $F
echo " <body>" >> $F
echo " <div id=\"topbar\">" >> $F
echo " <span>Current</span>" >> $F
echo " <span>Reference</span>" >> $F
echo " <span>Comparison</span>" >> $F
echo " </div>" >> $F
echo " <div id=\"topmargin\"></div>" >> $F
for src in $SRC; do
echo " <h2 id=\"$src\">$src <a class=\"toc-anchor\" href=\"#$src\">#</a></h2>" >> $F
echo " <div>" >> $F
echo " <img src=\"$src-1.png\">" >> $F
echo " <img src=\"$src-ref.png\">" >> $F
echo " <img src=\"$src-diff.png\">" >> $F
echo " </div>" >> $F
done
echo " </body>" >> $F
echo "</html>" >> $F
konqueror $F