Date:2010-08-30 09:13:20 (13 years 6 months ago)
Author:Werner Almesberger
Commit:ab89a00f5c51602a5f2b2b7a991bcbd8b1ccea84
Message:Generate a PDF with the all the current sheets.

- scripts/schhist2web: don't generate PDF for sheets that no longer exist
at HEAD
- scripts/schhist2web: generate a PDF containing all sheets existing at
HEAD
- scripts/schps2pdf: prefix was set to the wrong argument
- scripts/schps2pdf: removed left-over (and functionless) cat into gs
- scripts/schps2pdf: corrected quoting of the TOC entry
Files: scripts/schhist2web (2 diffs)
scripts/schps2pdf (2 diffs)

Change Details

scripts/schhist2web
238238
239239
240240index="$out/index.html"
241all=
241242{
242243    cat <<EOF
243244<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
...... 
259260<TR bgcolor="$FNAME_COLOR">
260261EOF
261262    while read m; do
262    mkdir -p "$out/pdf_$head"
263    schps2pdf -o "$out/pdf_$head/$m.pdf" "$cache/ps_$head/$m.ps" || exit
264    echo "<TD><A href="pdf_$head/$m.pdf"><B>$m</B></A>"
263    ps="$cache/ps_$head/$m.ps"
264    if [ -r "$ps" ]; then
265        mkdir -p "$out/pdf_$head"
266        schps2pdf -o "$out/pdf_$head/$m.pdf" "$ps" || exit
267        all="$all \"$ps\""
268        echo "<TD><A href=\"pdf_$head/$m.pdf\"><B>$m</B></A>"
269    else
270        echo "<TD><B>$m</B>"
271    fi
265272    done < <(ls -1 "$out/names")
273    proj=`basename "$sch" .sch`
274    eval schps2pdf -t \""$proj-"\" -o \""$out/pdf_$proj.pdf"\" $all
275    echo "<TD><A href=\"pdf_$proj.pdf\">All sheets</A>"
266276} >"$index"
267277
268278
scripts/schps2pdf
3232    shift 2;;
3333    -t) [ -z "$2" ] && usage
3434    toc=true
35    prefix="$1"
35    prefix="$2"
3636    shift 2;;
3737    -*)
3838    usage;;
...... 
4444in=${1:--}
4545shift
4646
47cat "$in" |
48  eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=\""$out\"" -f \
49    `for n in "$in" "$@"; do \
50      name=\`basename "$n" .ps\` \
51      echo "<($toc && echo '[ /Title (${name#$prefix}) /OUT pdfmark';
52      cat \"$n\";)"; done`
47eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=\""$out\"" -f \
48  `for n in "$in" "$@"; do \
49    echo "<(sheet=\`basename \"$n\" .ps\`;
50      $toc && echo '[ /Title ('\"\\${sheet#$prefix}\"') /OUT pdfmark';
51    cat \"$n\";)"; done`

Archive Download the corresponding diff file



interactive