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

Skip to content

Commit cf1b06e

Browse files
committed
Added --about option to specify the file to load "About this
document..." text from, defaulting to ../html/about.dat.
1 parent 8903be6 commit cf1b06e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Doc/tools/mkhowto

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class Options:
8585
quiet = 0
8686
runs = 0
8787
style_file = os.path.join(TOPDIR, "html", "style.css")
88+
about_file = os.path.join(TOPDIR, "html", "about.dat")
8889
#
8990
DEFAULT_FORMATS = ("pdf",)
9091
ALL_FORMATS = ("dvi", "html", "pdf", "ps", "text")
@@ -105,7 +106,8 @@ class Options:
105106
["all", "postscript", "help", "iconserver=",
106107
"address=", "a4", "l2h-config=", "letter",
107108
"link=", "split=", "logging", "debugging",
108-
"keep", "quiet", "runs=", "image-type="]
109+
"keep", "quiet", "runs=", "image-type=",
110+
"about="]
109111
+ list(self.ALL_FORMATS))
110112
for opt, arg in opts:
111113
if opt == "--all":
@@ -139,6 +141,10 @@ class Options:
139141
self.runs = int(arg)
140142
elif opt == "--image-type":
141143
self.image_type = arg
144+
elif opt == "--about":
145+
# always make this absolute:
146+
self.about_file = os.path.normpath(
147+
os.path.join(os.getcwd(), arg))
142148
#
143149
# Format specifiers:
144150
#
@@ -363,6 +369,7 @@ class Job:
363369
"\n"
364370
'print "\nInitializing from file: %s\";\n\n'
365371
% string_to_perl(fn))
372+
l2hoption(fp, "ABOUT_FILE", options.about_file)
366373
l2hoption(fp, "ICONSERVER", options.icon_server)
367374
l2hoption(fp, "IMAGE_TYPE", options.image_type)
368375
l2hoption(fp, "ADDRESS", options.address)

0 commit comments

Comments
 (0)