aboutsummaryrefslogtreecommitdiffstats
path: root/main/project/attributes/makehtmlpage1res.sh
blob: 0aa8d6a81a83edc0dae24ee7fe3e44f274c3d3d3 (plain)
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
#!/bin/sh
#
# this script generates a html-page with all icons on it

OUT=iconlist1res.html
BG0=#c0c0c0
BG1=#a0a0a0
BG=0
BGCOLOR=$BG0

addrow () {
    echo "<tr bgcolor='$BGCOLOR'>" >> "${OUT}"
    echo "<td><img src='./drawable/${1}.png'>" >> "${OUT}"
    echo "<img style='background:url(./drawable/${1}.png' src='./drawable/strikethru.png'>" >> "${OUT}"
#    echo "<img style='background:url(./drawable/${1}.png' src='./drawable/strikethru1.png'>" >> "${OUT}"
    echo "</td>" >> "${OUT}"
    desc=`grep "${1}_yes" ../../res/values/strings.xml | sed "s/^.*>\(.*\)<.*$/\1/"`
    echo "<td>$desc</td><td>$1</td></tr>" >> "${OUT}"
    BG=$(( $BG + 1 ))
    [ $BG -eq 2 ] && BG=0
    [ $BG -eq 0 ] && BGCOLOR=$BG0
    [ $BG -eq 1 ] && BGCOLOR=$BG1
}

echo "<html><body bgcolor='#b0b0b0'>" > "${OUT}"
echo "<table border=1 cellpadding=2><tr><th>icon</th><th>description</th><th>resource name</th></tr>" >> "${OUT}"

cat iconlist.txt | grep -v "^#" | while read i; do
    name=`echo $i | cut -d "|" -f 1 | sed "s/ //g"`
    addrow attribute_$name
done

echo "</table></body></html>" >> "${OUT}"