blob: e20d3bf123e83985d8c4decf95fa736c842e9ae8 [file] [log] [blame]
Fred Drake89201561998-05-07 14:53:55 +00001#! /bin/sh
2#
Fred Drakef6b6bbc1998-08-11 14:10:40 +00003# Drive HTML generation for a Python manual.
Fred Drake89201561998-05-07 14:53:55 +00004#
Fred Drakef43ce001999-02-16 20:05:43 +00005# This is probably *not* useful outside of the standard Python documentation,
6# but suggestions are welcome and should be sent to <python-docs@python.org>.
Fred Drakef6b6bbc1998-08-11 14:10:40 +00007#
8# The first arg is required and is the designation for which manual to build;
9# api, ext, lib, ref, or tut. All other args are passed on to latex2html.
Fred Drake89201561998-05-07 14:53:55 +000010
11WORKDIR=`pwd`
12cd `dirname $0`/..
13srcdir=`pwd`
14cd $WORKDIR
15
16part=$1; shift 1
17
18TEXINPUTS=$srcdir/$part:$TEXINPUTS
19export TEXINPUTS
20
21if [ -d $part ] ; then
Fred Drake323dc701998-05-11 18:41:16 +000022 rm -f $part/*.html
Fred Drake89201561998-05-07 14:53:55 +000023fi
24
Fred Drakef6b6bbc1998-08-11 14:10:40 +000025echo "latex2html -init_file $srcdir/perl/l2hinit.perl -dir $part" \
Fred Drakea4565b01998-05-15 17:14:17 +000026 "${1:+$@} $srcdir/$part/$part.tex"
Fred Drakef4166a41998-05-08 04:00:56 +000027latex2html \
28 -init_file $srcdir/perl/l2hinit.perl \
Fred Drake7777e361998-11-30 20:27:31 +000029 -address '<hr>Send comments to <a href="mailto:python-docs@python.org">python-docs@python.org</a>.' \
Fred Drakea4565b01998-05-15 17:14:17 +000030 -dir $part \
Fred Drakef4166a41998-05-08 04:00:56 +000031 ${1:+$@} \
Fred Drakef43ce001999-02-16 20:05:43 +000032 $srcdir/$part/$part.tex || exit $?
Fred Drake89201561998-05-07 14:53:55 +000033
Fred Drakefcf57ad1999-02-16 20:28:25 +000034# copy in the stylesheet
35echo "cp $srcdir/html/style.css $part/$part.css"
36cp $srcdir/html/style.css $part/$part.css || exit $?
37
Fred Drakef43ce001999-02-16 20:05:43 +000038echo "(cd $part; $srcdir/tools/node2label.pl \*.html)"
Fred Drake89201561998-05-07 14:53:55 +000039cd $part
Fred Drakef43ce001999-02-16 20:05:43 +000040$srcdir/tools/node2label.pl *.html || exit $?