1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-29 15:00:18 +02:00

Files in the first commit didn't have an HTML wrapper with PDF link.

- scripts/schhist2web: moved generation of a HTML-wrapped PNG with link to
  PDF to new function wrapped_png
- scripts/schhist2web: generate a PDF with link also for files in the very
  first commit
This commit is contained in:
Werner Almesberger 2010-08-30 20:56:41 -03:00
parent a0cdb1e365
commit 20184edd25

View File

@ -78,6 +78,23 @@ EOF
} }
wrapped_png()
{
local dir=$1 commit=$2 file=$3
mkdir -p "$dir/html_$commit"
echo "<A href=\"html_$commit/$file.html\"><IMG src=\"thumb_$commit/$file.png\"></A>"
cat <<EOF >"$dir/html_$commit/$file.html"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<TITLE>$file</TITLE>
<BODY>
<A href="../pdf_$commit/$file.pdf"><IMG src="../diff_$commit/$file.png"></A>
</BODY>
EOF
}
usage() usage()
{ {
cat <<EOF 2>&1 cat <<EOF 2>&1
@ -346,16 +363,7 @@ for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
echo "$s" >>"$index" echo "$s" >>"$index"
s= s=
empty=false empty=false
mkdir -p "$out/html_$next" wrapped_png "$out" "$next" "$m" >>"$index"
echo "<A href=\"html_$next/$m.html\"><IMG src=\"thumb_$next/$m.png\"></A>" >>"$index"
cat <<EOF >"$out/html_$next/$m.html"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<TITLE>$m</TITLE>
<BODY>
<A href="../pdf_$next/$m.pdf"><IMG src="../diff_$next/$m.png"></A>
</BODY>
EOF
done < <(ls -1 "$out/names") done < <(ls -1 "$out/names")
if ! $empty; then if ! $empty; then
echo "$s<TD valign=\"middle\">" >>"$index" echo "$s<TD valign=\"middle\">" >>"$index"
@ -384,7 +392,10 @@ if [ -d "$cache/ppm_$next" ]; then # could this ever be false ?
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 0,1,0 "$fat" "$fat" \ pngdiff shrink "$thumb" -f $THUMB_OPTS -c 0,1,0 "$fat" "$fat" \
|| exit || exit
empty=false empty=false
echo "<A href=\"diff_$next/$m.png\"><IMG src=\"thumb_$next/$m.png\"></A>" >>"$index" mkdir -p "$out/pdf_$next"
schps2pdf -T NEW -o "$out/pdf_$next/$m.pdf" \
"$cache/ps_$next/$m.ps" || exit
wrapped_png "$out" "$next" "$m" >>"$index"
done < <(ls -1 "$out/names") done < <(ls -1 "$out/names")
if ! $empty; then if ! $empty; then
echo "<TD valign=\"middle\">" >>"$index" echo "<TD valign=\"middle\">" >>"$index"