Date:2010-08-31 01:56:41 (9 years 20 days ago)
Author:Werner Almesberger
Commit:20184edd252241fd0a874628e63bf0bdb788e6f0
Message: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
Files: scripts/schhist2web (3 diffs)

Change Details

scripts/schhist2web
7878}
7979
8080
81wrapped_png()
82{
83    local dir=$1 commit=$2 file=$3
84
85    mkdir -p "$dir/html_$commit"
86    echo "<A href=\"html_$commit/$file.html\"><IMG src=\"thumb_$commit/$file.png\"></A>"
87    cat <<EOF >"$dir/html_$commit/$file.html"
88<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
89<HTML>
90<TITLE>$file</TITLE>
91<BODY>
92<A href="../pdf_$commit/$file.pdf"><IMG src="../diff_$commit/$file.png"></A>
93</BODY>
94EOF
95}
96
97
8198usage()
8299{
83100    cat <<EOF 2>&1
...... 
346363    echo "$s" >>"$index"
347364    s=
348365    empty=false
349    mkdir -p "$out/html_$next"
350    echo "<A href=\"html_$next/$m.html\"><IMG src=\"thumb_$next/$m.png\"></A>" >>"$index"
351    cat <<EOF >"$out/html_$next/$m.html"
352<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
353<HTML>
354<TITLE>$m</TITLE>
355<BODY>
356<A href="../pdf_$next/$m.pdf"><IMG src="../diff_$next/$m.png"></A>
357</BODY>
358EOF
366        wrapped_png "$out" "$next" "$m" >>"$index"
359367    done < <(ls -1 "$out/names")
360368    if ! $empty; then
361369     echo "$s<TD valign=\"middle\">" >>"$index"
...... 
384392    pngdiff shrink "$thumb" -f $THUMB_OPTS -c 0,1,0 "$fat" "$fat" \
385393          || exit
386394    empty=false
387    echo "<A href=\"diff_$next/$m.png\"><IMG src=\"thumb_$next/$m.png\"></A>" >>"$index"
395    mkdir -p "$out/pdf_$next"
396    schps2pdf -T NEW -o "$out/pdf_$next/$m.pdf" \
397      "$cache/ps_$next/$m.ps" || exit
398    wrapped_png "$out" "$next" "$m" >>"$index"
388399    done < <(ls -1 "$out/names")
389400    if ! $empty; then
390401     echo "<TD valign=\"middle\">" >>"$index"

Archive Download the corresponding diff file



interactive