1998-05-07 14:53:55 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
1998-08-11 14:10:40 +00:00
|
|
|
# Drive HTML generation for a Python manual.
|
1998-05-07 14:53:55 +00:00
|
|
|
#
|
1999-02-16 20:05:43 +00:00
|
|
|
# This is probably *not* useful outside of the standard Python documentation,
|
|
|
|
# but suggestions are welcome and should be sent to <python-docs@python.org>.
|
1998-08-11 14:10:40 +00:00
|
|
|
#
|
|
|
|
# The first arg is required and is the designation for which manual to build;
|
|
|
|
# api, ext, lib, ref, or tut. All other args are passed on to latex2html.
|
1998-05-07 14:53:55 +00:00
|
|
|
|
|
|
|
WORKDIR=`pwd`
|
|
|
|
cd `dirname $0`/..
|
|
|
|
srcdir=`pwd`
|
|
|
|
cd $WORKDIR
|
|
|
|
|
1999-04-29 18:28:48 +00:00
|
|
|
use_logical_names=true
|
|
|
|
|
|
|
|
if [ "$1" = "--numeric" ] ; then
|
1999-10-29 20:51:43 +00:00
|
|
|
use_logical_names=false
|
1999-04-29 18:28:48 +00:00
|
|
|
shift 1
|
|
|
|
fi
|
|
|
|
|
1998-05-07 14:53:55 +00:00
|
|
|
part=$1; shift 1
|
|
|
|
|
|
|
|
TEXINPUTS=$srcdir/$part:$TEXINPUTS
|
|
|
|
export TEXINPUTS
|
|
|
|
|
|
|
|
if [ -d $part ] ; then
|
1998-05-11 18:41:16 +00:00
|
|
|
rm -f $part/*.html
|
1998-05-07 14:53:55 +00:00
|
|
|
fi
|
|
|
|
|
1998-08-11 14:10:40 +00:00
|
|
|
echo "latex2html -init_file $srcdir/perl/l2hinit.perl -dir $part" \
|
1998-05-15 17:14:17 +00:00
|
|
|
"${1:+$@} $srcdir/$part/$part.tex"
|
1998-05-08 04:00:56 +00:00
|
|
|
latex2html \
|
1999-05-03 14:27:45 +00:00
|
|
|
-no_auto_link \
|
1998-05-08 04:00:56 +00:00
|
|
|
-init_file $srcdir/perl/l2hinit.perl \
|
1999-10-29 20:51:43 +00:00
|
|
|
-address '<hr>See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.' \
|
1998-05-15 17:14:17 +00:00
|
|
|
-dir $part \
|
1998-05-08 04:00:56 +00:00
|
|
|
${1:+$@} \
|
1999-02-16 20:05:43 +00:00
|
|
|
$srcdir/$part/$part.tex || exit $?
|
1998-05-07 14:53:55 +00:00
|
|
|
|
1999-05-03 14:27:45 +00:00
|
|
|
cp $part/$part.html $part/index.html
|
|
|
|
|
1999-02-16 20:28:25 +00:00
|
|
|
# copy in the stylesheet
|
|
|
|
echo "cp $srcdir/html/style.css $part/$part.css"
|
|
|
|
cp $srcdir/html/style.css $part/$part.css || exit $?
|
|
|
|
|
1999-10-29 20:51:43 +00:00
|
|
|
if $use_logical_names ; then
|
1999-04-29 18:28:48 +00:00
|
|
|
echo "(cd $part; $srcdir/tools/node2label.pl \*.html)"
|
|
|
|
cd $part
|
|
|
|
$srcdir/tools/node2label.pl *.html || exit $?
|
|
|
|
else
|
|
|
|
echo "Skipping use of logical file names due to --numeric."
|
|
|
|
fi
|