summaryrefslogtreecommitdiffstats
path: root/Doc/tools/mkinfo
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-01-08 15:27:17 (GMT)
committerFred Drake <fdrake@acm.org>1999-01-08 15:27:17 (GMT)
commitc58f346374be696b6351a0b678fe5c3b33a7092c (patch)
treecb9c15e097b65078d0ede0ab4c0fef4ebe240471 /Doc/tools/mkinfo
parent3fe1d326932432b1c27b75e9d3ce79f91dcfe1f8 (diff)
downloadcpython-c58f346374be696b6351a0b678fe5c3b33a7092c.zip
cpython-c58f346374be696b6351a0b678fe5c3b33a7092c.tar.gz
cpython-c58f346374be696b6351a0b678fe5c3b33a7092c.tar.bz2
New support scripts for HTML->info conversion that use Michael Ernst's new
conversion tools.
Diffstat (limited to 'Doc/tools/mkinfo')
-rwxr-xr-xDoc/tools/mkinfo41
1 files changed, 41 insertions, 0 deletions
diff --git a/Doc/tools/mkinfo b/Doc/tools/mkinfo
new file mode 100755
index 0000000..51279a0
--- /dev/null
+++ b/Doc/tools/mkinfo
@@ -0,0 +1,41 @@
+#! /bin/sh
+# -*- Ksh -*-
+
+
+PERL=${PERL:-perl}
+EMACS=${EMACS:-emacs}
+MAKEINFO=${MAKEINFO:-makeinfo}
+
+
+# Normalize file name since something called by html2texi.pl seems to
+# screw up with relative path names.
+FILENAME="$1"
+DOCDIR=`dirname "$FILENAME"`
+DOCFILE=`basename "$FILENAME"`
+DOCNAME=`basename "$FILENAME" .html`
+
+WORKDIR=`pwd`
+cd `dirname $0`
+TOOLSDIR=`pwd`
+cd $DOCDIR
+DOCDIR=`pwd`
+cd $WORKDIR
+
+
+run() {
+ echo "$@"
+ $* || exit $?
+}
+
+
+# generate the Texinfo file:
+
+run $PERL -I$TOOLSDIR $TOOLSDIR/html2texi.pl $DOCDIR/$DOCFILE
+run $EMACS -batch -l $TOOLSDIR/fixinfo.el $DOCNAME.texi
+rm -f $DOCNAME.texi~
+
+
+# generate the .info files:
+
+run $MAKEINFO --footnote-style end --fill-column 72 \
+ --paragraph-indent 0 $DOCNAME.texi