mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-23 01:17:11 +02:00
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
This commit is contained in:
parent
337f13a0df
commit
ab89a00f5c
@ -238,6 +238,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
index="$out/index.html"
|
index="$out/index.html"
|
||||||
|
all=
|
||||||
{
|
{
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
@ -259,10 +260,19 @@ EOF
|
|||||||
<TR bgcolor="$FNAME_COLOR">
|
<TR bgcolor="$FNAME_COLOR">
|
||||||
EOF
|
EOF
|
||||||
while read m; do
|
while read m; do
|
||||||
|
ps="$cache/ps_$head/$m.ps"
|
||||||
|
if [ -r "$ps" ]; then
|
||||||
mkdir -p "$out/pdf_$head"
|
mkdir -p "$out/pdf_$head"
|
||||||
schps2pdf -o "$out/pdf_$head/$m.pdf" "$cache/ps_$head/$m.ps" || exit
|
schps2pdf -o "$out/pdf_$head/$m.pdf" "$ps" || exit
|
||||||
echo "<TD><A href="pdf_$head/$m.pdf"><B>$m</B></A>"
|
all="$all \"$ps\""
|
||||||
|
echo "<TD><A href=\"pdf_$head/$m.pdf\"><B>$m</B></A>"
|
||||||
|
else
|
||||||
|
echo "<TD><B>$m</B>"
|
||||||
|
fi
|
||||||
done < <(ls -1 "$out/names")
|
done < <(ls -1 "$out/names")
|
||||||
|
proj=`basename "$sch" .sch`
|
||||||
|
eval schps2pdf -t \""$proj-"\" -o \""$out/pdf_$proj.pdf"\" $all
|
||||||
|
echo "<TD><A href=\"pdf_$proj.pdf\">All sheets</A>"
|
||||||
} >"$index"
|
} >"$index"
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ while true; do
|
|||||||
shift 2;;
|
shift 2;;
|
||||||
-t) [ -z "$2" ] && usage
|
-t) [ -z "$2" ] && usage
|
||||||
toc=true
|
toc=true
|
||||||
prefix="$1"
|
prefix="$2"
|
||||||
shift 2;;
|
shift 2;;
|
||||||
-*)
|
-*)
|
||||||
usage;;
|
usage;;
|
||||||
@ -44,9 +44,8 @@ done
|
|||||||
in=${1:--}
|
in=${1:--}
|
||||||
shift
|
shift
|
||||||
|
|
||||||
cat "$in" |
|
|
||||||
eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=\""$out\"" -f \
|
eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=\""$out\"" -f \
|
||||||
`for n in "$in" "$@"; do \
|
`for n in "$in" "$@"; do \
|
||||||
name=\`basename "$n" .ps\` \
|
echo "<(sheet=\`basename \"$n\" .ps\`;
|
||||||
echo "<($toc && echo '[ /Title (${name#$prefix}) /OUT pdfmark';
|
$toc && echo '[ /Title ('\"\\${sheet#$prefix}\"') /OUT pdfmark';
|
||||||
cat \"$n\";)"; done`
|
cat \"$n\";)"; done`
|
||||||
|
Loading…
Reference in New Issue
Block a user