Commit c58f3463 authored by Fred Drake's avatar Fred Drake

New support scripts for HTML->info conversion that use Michael Ernst's new

conversion tools.
parent 3fe1d326
; load the new texinfo package (2.xx) if not installed by default
; (setq load-path (cons "/ufs/guido/lib/emacs/texinfo-2.14" load-path))
(find-file "temp.texi")
(texinfo-all-menus-update t)
(texinfo-all-menus-update t)
(defun fix-python-texinfo ()
(goto-char (point-min))
(replace-regexp "\\(@setfilename \\)\\([-a-z]*\\)$"
"\\1python-\\2.info")
(replace-string "@node Front Matter\n@chapter Abstract\n"
"@node Abstract\n@section Abstract\n")
(progn
(mark-whole-buffer)
(texinfo-master-menu 'update-all-nodes)
)
(save-buffer)
) ;; fix-python-texinfo
;; now really do it:
(find-file (car command-line-args-left))
(fix-python-texinfo)
(kill-emacs)
#! /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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment