diff --git a/scripts/schhist2web b/scripts/schhist2web index dad196b..54f1a70 100755 --- a/scripts/schhist2web +++ b/scripts/schhist2web @@ -78,6 +78,23 @@ EOF } +wrapped_png() +{ + local dir=$1 commit=$2 file=$3 + + mkdir -p "$dir/html_$commit" + echo "" + cat <"$dir/html_$commit/$file.html" + + +$file + + + +EOF +} + + usage() { cat <&1 @@ -346,16 +363,7 @@ for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do echo "$s" >>"$index" s= empty=false - mkdir -p "$out/html_$next" - echo "" >>"$index" - cat <"$out/html_$next/$m.html" - - -$m - - - -EOF + wrapped_png "$out" "$next" "$m" >>"$index" done < <(ls -1 "$out/names") if ! $empty; then echo "$s" >>"$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" \ || exit empty=false - echo "" >>"$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") if ! $empty; then echo "" >>"$index"