Date:2010-08-27 18:07:15 (8 years 10 months ago)
Author:Werner Almesberger
Commit:5761b6e650547ae99574d54b210e5aebe875d8dd
Message:schhist2web: better technical and visual quality of HTML output.

- scripts/schhist2web: don't "exit 1" on success (duh ?)
- scripts/schhist2web: use proper HTML intro with DOCTYPE
- scripts/schhist2web: add date tag at the end
- scripts/schhist2web: define all Web colors at the beginning
- scripts/schhist2web: assign background different from the rest to file
names
- scripts/schhist2web: translate <, >, and & meta-characters in "git log"
output
Files: scripts/schhist2web (3 diffs)

Change Details

scripts/schhist2web
22
33OUTDIR=_out
44THUMB_OPTS="-w 3 -d 60 -c 0.5,0.5,0.5 -n 1,1,0"
5BG_COLOR="f0f0ff"
6FNAME_COLOR="#b0f0ff"
7SEP_COLOR="#000000"
58
69
710shrink()
...... 
127130
128131index="$out/index.html"
129132cat <<EOF >"$index"
133<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
130134<HTML>
131135<BODY>
132<TABLE bgcolor="#f0f0ff" callpadding=1>
133<TR>
136<TABLE bgcolor="$BG_COLOR" callpadding=1>
137<TR bgcolor="$FNAME_COLOR">
134138EOF
135139for m in `ls -1 "$out/names"`; do
136140    echo "<TD><B>$m</B>" >>"$index"
...... 
178182    (
179183        cat <<EOF
180184$s<TD valign="middle">
181<TABLE bgcolor="#000000" cellspacing=0 width="100%"><TR><TD></TABLE>
185<TABLE bgcolor="$SEP_COLOR" cellspacing=0 width="100%"><TR><TD></TABLE>
182186EOF
183187    mkdir -p "$out/diff_$next" "$out/thumb_$next"
184188        echo "<PRE>"
185        git log --pretty=short $n..$next
189        git log --pretty=short $n..$next |
190          sed 's/&/&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'
186191        echo "</PRE>"
187192    ) >>"$index"
188193    fi
189194    next=$n
190195done
191196
192echo "</TABLE>" >>"$index"
197cat <<EOF >>"$index"
198</TABLE>
199<HR>
200`date -u '+%F %X'` UTC
201</BODY>
202</HTML>
203EOF
193204exit 1

Archive Download the corresponding diff file



interactive