mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Added --about option to specify the file to load "About this
document..." text from, defaulting to ../html/about.dat.
This commit is contained in:
parent
8903be62a8
commit
cf1b06ec47
1 changed files with 8 additions and 1 deletions
|
|
@ -85,6 +85,7 @@ class Options:
|
||||||
quiet = 0
|
quiet = 0
|
||||||
runs = 0
|
runs = 0
|
||||||
style_file = os.path.join(TOPDIR, "html", "style.css")
|
style_file = os.path.join(TOPDIR, "html", "style.css")
|
||||||
|
about_file = os.path.join(TOPDIR, "html", "about.dat")
|
||||||
#
|
#
|
||||||
DEFAULT_FORMATS = ("pdf",)
|
DEFAULT_FORMATS = ("pdf",)
|
||||||
ALL_FORMATS = ("dvi", "html", "pdf", "ps", "text")
|
ALL_FORMATS = ("dvi", "html", "pdf", "ps", "text")
|
||||||
|
|
@ -105,7 +106,8 @@ class Options:
|
||||||
["all", "postscript", "help", "iconserver=",
|
["all", "postscript", "help", "iconserver=",
|
||||||
"address=", "a4", "l2h-config=", "letter",
|
"address=", "a4", "l2h-config=", "letter",
|
||||||
"link=", "split=", "logging", "debugging",
|
"link=", "split=", "logging", "debugging",
|
||||||
"keep", "quiet", "runs=", "image-type="]
|
"keep", "quiet", "runs=", "image-type=",
|
||||||
|
"about="]
|
||||||
+ list(self.ALL_FORMATS))
|
+ list(self.ALL_FORMATS))
|
||||||
for opt, arg in opts:
|
for opt, arg in opts:
|
||||||
if opt == "--all":
|
if opt == "--all":
|
||||||
|
|
@ -139,6 +141,10 @@ class Options:
|
||||||
self.runs = int(arg)
|
self.runs = int(arg)
|
||||||
elif opt == "--image-type":
|
elif opt == "--image-type":
|
||||||
self.image_type = arg
|
self.image_type = arg
|
||||||
|
elif opt == "--about":
|
||||||
|
# always make this absolute:
|
||||||
|
self.about_file = os.path.normpath(
|
||||||
|
os.path.join(os.getcwd(), arg))
|
||||||
#
|
#
|
||||||
# Format specifiers:
|
# Format specifiers:
|
||||||
#
|
#
|
||||||
|
|
@ -363,6 +369,7 @@ class Job:
|
||||||
"\n"
|
"\n"
|
||||||
'print "\nInitializing from file: %s\";\n\n'
|
'print "\nInitializing from file: %s\";\n\n'
|
||||||
% string_to_perl(fn))
|
% string_to_perl(fn))
|
||||||
|
l2hoption(fp, "ABOUT_FILE", options.about_file)
|
||||||
l2hoption(fp, "ICONSERVER", options.icon_server)
|
l2hoption(fp, "ICONSERVER", options.icon_server)
|
||||||
l2hoption(fp, "IMAGE_TYPE", options.image_type)
|
l2hoption(fp, "IMAGE_TYPE", options.image_type)
|
||||||
l2hoption(fp, "ADDRESS", options.address)
|
l2hoption(fp, "ADDRESS", options.address)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue