Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c58f346

Browse files
committed
New support scripts for HTML->info conversion that use Michael Ernst's new
conversion tools.
1 parent 3fe1d32 commit c58f346

3 files changed

Lines changed: 58 additions & 5 deletions

File tree

Doc/tools/fix.el

Lines changed: 0 additions & 5 deletions
This file was deleted.

Doc/tools/fixinfo.el

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
(defun fix-python-texinfo ()
2+
(goto-char (point-min))
3+
(replace-regexp "\\(@setfilename \\)\\([-a-z]*\\)$"
4+
"\\1python-\\2.info")
5+
(replace-string "@node Front Matter\n@chapter Abstract\n"
6+
"@node Abstract\n@section Abstract\n")
7+
(progn
8+
(mark-whole-buffer)
9+
(texinfo-master-menu 'update-all-nodes)
10+
)
11+
(save-buffer)
12+
) ;; fix-python-texinfo
13+
14+
;; now really do it:
15+
(find-file (car command-line-args-left))
16+
(fix-python-texinfo)
17+
(kill-emacs)

Doc/tools/mkinfo

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#! /bin/sh
2+
# -*- Ksh -*-
3+
4+
5+
PERL=${PERL:-perl}
6+
EMACS=${EMACS:-emacs}
7+
MAKEINFO=${MAKEINFO:-makeinfo}
8+
9+
10+
# Normalize file name since something called by html2texi.pl seems to
11+
# screw up with relative path names.
12+
FILENAME="$1"
13+
DOCDIR=`dirname "$FILENAME"`
14+
DOCFILE=`basename "$FILENAME"`
15+
DOCNAME=`basename "$FILENAME" .html`
16+
17+
WORKDIR=`pwd`
18+
cd `dirname $0`
19+
TOOLSDIR=`pwd`
20+
cd $DOCDIR
21+
DOCDIR=`pwd`
22+
cd $WORKDIR
23+
24+
25+
run() {
26+
echo "$@"
27+
$* || exit $?
28+
}
29+
30+
31+
# generate the Texinfo file:
32+
33+
run $PERL -I$TOOLSDIR $TOOLSDIR/html2texi.pl $DOCDIR/$DOCFILE
34+
run $EMACS -batch -l $TOOLSDIR/fixinfo.el $DOCNAME.texi
35+
rm -f $DOCNAME.texi~
36+
37+
38+
# generate the .info files:
39+
40+
run $MAKEINFO --footnote-style end --fill-column 72 \
41+
--paragraph-indent 0 $DOCNAME.texi

0 commit comments

Comments
 (0)