Kaydet (Commit) 5c0ebdcb authored tarafından Fred Drake's avatar Fred Drake

- make the default image type PNG, to match mkhowto

- add a command-line option to control the image type
üst 2cf5e192
...@@ -20,7 +20,9 @@ class Options: ...@@ -20,7 +20,9 @@ class Options:
# content components # content components
"address=", "iconserver=", "favicon=", "address=", "iconserver=", "favicon=",
"title=", "uplink=", "uptitle="] "title=", "uplink=", "uptitle=",
"image-type=",
]
outputfile = "-" outputfile = "-"
columns = 1 columns = 1
...@@ -51,7 +53,7 @@ class Options: ...@@ -51,7 +53,7 @@ class Options:
self.args = [] self.args = []
self.variables = {"address": "", self.variables = {"address": "",
"iconserver": "icons", "iconserver": "icons",
"imgtype": "gif", "imgtype": "png",
"title": "Global Module Index", "title": "Global Module Index",
} }
...@@ -93,6 +95,8 @@ class Options: ...@@ -93,6 +95,8 @@ class Options:
self.variables["iconserver"] = val.strip() or "." self.variables["iconserver"] = val.strip() or "."
elif opt == "--favicon": elif opt == "--favicon":
self.favicon = val.strip() self.favicon = val.strip()
elif opt == "--image-type":
self.variables["imgtype"] = val.strip()
else: else:
self.handle_option(opt, val) self.handle_option(opt, val)
if self.uplink and self.uptitle: if self.uplink and self.uptitle:
......
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