File: gen

package info (click to toggle)
musescore 2.0.3%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 202,532 kB
  • ctags: 58,769
  • sloc: cpp: 257,595; xml: 172,226; ansic: 139,931; python: 6,565; sh: 6,383; perl: 423; makefile: 290; awk: 142; pascal: 67; sed: 3
file content (98 lines) | stat: -rwxr-xr-x 3,692 bytes parent folder | download | duplicates (2)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/sh

if [ "`uname`" = 'Darwin' ]; then
      MSCORE=../build.xcode/mscore/Debug/mscore.app/Contents/MacOS/mscore
      BROWSER=open
else
      MSCORE=../build.debug/mscore/mscore
      BROWSER=rekonq
fi

if [ -n "$VTEST_MSCORE" ]; then
      MSCORE="$VTEST_MSCORE"
fi

case "$MSCORE" in
      /*) ;;
      ~*) ;;
      *) MSCORE="../$MSCORE" ;;
esac

if [ -n "$VTEST_BROWSER" ]; then
      BROWSER="$VTEST_BROWSER"
fi

#
# "compare" - image magick compare program
#
if test -n "$1"; then
      SRC=$1
else
      SRC="mmrest-1 bravura-mmrest gonville-mmrest mmrest-2 mmrest-4 mmrest-5 mmrest-6 mmrest-7 mmrest-8 mmrest-9\
       mmrest-10 fmrest-1 fmrest-2 fmrest-3 fmrest-4 fmrest-5 fmrest-6 measure-repeat-1\
       noteheadposition-1 valign-1 valign-2 valign-3 emmentaler-1 bravura-1 gonville-1 emmentaler-2 bravura-2 gonville-2\
       emmentaler-3 bravura-3 gonville-3 emmentaler-4 bravura-4 gonville-4 emmentaler-5 bravura-5 gonville-5\
       emmentaler-6 bravura-6 gonville-6 emmentaler-7 bravura-7 gonville-7\
       emmentaler-8 bravura-8 gonville-8 emmentaler-9 bravura-9 gonville-9\
       emmentaler-10 bravura-10 gonville-10 emmentaler-11 bravura-11 gonville-11\
       emmentaler-text-1 gonville-text-1 bravura-text-1 musejazz-text-1\
       emmentaler-text-2 gonville-text-2 bravura-text-2 musejazz-text-2\
       emmentaler-text-3 gonville-text-3 bravura-text-3 musejazz-text-3\
       frametext ottava slurs-1 slurs-2 slurs-3 slurs-4 hairpins-1 pedal-1 line-1 line-2 line-3 line-4 line-5 gliss-1 gliss-2\
       chord-layout-1 chord-layout-2 chord-layout-3 chord-layout-4 chord-layout-5\
       chord-layout-6 chord-layout-7 chord-layout-8 chord-layout-9 chord-layout-10\
       chord-layout-11 chord-layout-12 chord-layout-13 chord-layout-14 chord-layout-15 chord-layout-16 cross-1 cross-2\
       accidental-1 accidental-2 accidental-3 accidental-4 accidental-5\
       accidental-6 accidental-7 accidental-8 accidental-9 accidental-10\
       tie-1 tie-2 tie-3 grace-1 grace-2 grace-3 grace-4 tuplets-1 tuplets-2 breath-1\
       harmony-1 harmony-2 harmony-3 harmony-4 harmony-5 harmony-6 harmony-7
       harmony-8 harmony-9 harmony-10 harmony-11 harmony-12\
       beams-1 beams-2 beams-3 beams-4 beams-5 beams-6 beams-7 beams-8 beams-9 beams-10\
       beams-11 beams-12 beams-13 beams-14 beams-15 beams-16 beams-17\
       user-offset-1 user-offset-2 chord-space-1 chord-space-2 tablature-1 image-1\
       lyrics-1 lyrics-2 lyrics-3 lyrics-4 lyrics-5 lyrics-6 lyrics-7 voice-1 voice-2 slash-1 slash-2\
       system-1 system-2 system-3 system-4 system-5 small-1 tremolo-1"
fi

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 > /dev/null 2>&1
      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


$BROWSER $F