summaryrefslogtreecommitdiffstats
path: root/Doc/tools
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-08-31 06:14:38 (GMT)
committerFred Drake <fdrake@acm.org>2000-08-31 06:14:38 (GMT)
commit8bc627a40239e9e183c33a1c0994ccf74618562c (patch)
tree9e2b6a7826a0ff09f274bc8fcfb082bced69393b /Doc/tools
parentb9b4c5b56019759d5a5b04c5ecf55b7f1d067aba (diff)
downloadcpython-8bc627a40239e9e183c33a1c0994ccf74618562c.zip
cpython-8bc627a40239e9e183c33a1c0994ccf74618562c.tar.gz
cpython-8bc627a40239e9e183c33a1c0994ccf74618562c.tar.bz2
Add --l2h-init option, which can augment the standard LaTeX2HTML
initialization with additional Perl files. This can be given more than once.
Diffstat (limited to 'Doc/tools')
-rwxr-xr-xDoc/tools/mkhowto14
1 files changed, 11 insertions, 3 deletions
diff --git a/Doc/tools/mkhowto b/Doc/tools/mkhowto
index 1903a53..faee6cf 100755
--- a/Doc/tools/mkhowto
+++ b/Doc/tools/mkhowto
@@ -97,6 +97,7 @@ class Options:
def __init__(self):
self.formats = []
+ self.l2h_init_files = []
def __getitem__(self, key):
# This is used when formatting the usage message.
@@ -108,7 +109,7 @@ class Options:
def parse(self, args):
opts, args = getopt.getopt(args, "Hi:a:s:lDkqr:",
["all", "postscript", "help", "iconserver=",
- "address=", "a4", "letter",
+ "address=", "a4", "letter", "l2h-init=",
"link=", "split=", "logging", "debugging",
"keep", "quiet", "runs=", "image-type=",
"about=", "numeric", "style="]
@@ -151,6 +152,8 @@ class Options:
self.numeric = 1
elif opt == "--style":
self.style_file = os.path.abspath(arg)
+ elif opt == "--l2h-init":
+ self.l2h_init_files.append(os.path.abspath(arg))
#
# Format specifiers:
#
@@ -303,7 +306,7 @@ class Job:
self.process_synopsis_files()
def use_latex_manual(self, binary):
- pass
+ self.use_latex_howto(binary)
def process_synopsis_files(self):
synopsis_files = glob.glob(self.doc + "*.syn")
@@ -364,6 +367,7 @@ class Job:
self.build_aux(binary=binary)
def write_l2h_aux_init_file(self):
+ options = self.options
fp = open(self.l2h_aux_init_file, "w")
d = string_to_perl(os.path.dirname(L2H_INIT_FILE))
fp.write("package main;\n"
@@ -371,12 +375,16 @@ class Job:
"$mydir = '%s';\n"
% (d, d))
fp.write(open(L2H_INIT_FILE).read())
+ for filename in options.l2h_init_files:
+ fp.write("\n# initialization code incorporated from:\n# ")
+ fp.write(filename)
+ fp.write("\n")
+ fp.write(open(filename).read())
fp.write("\n"
"# auxillary init file for latex2html\n"
"# generated by mkhowto\n"
"$NO_AUTO_LINK = 1;\n"
)
- options = self.options
l2hoption(fp, "ABOUT_FILE", options.about_file)
l2hoption(fp, "ICONSERVER", options.icon_server)
l2hoption(fp, "IMAGE_TYPE", options.image_type)