From b07216b43ad3e375e2a4a80c726bae618c329553 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Wed, 30 Oct 2002 17:05:03 +0000 Subject: Added support for --favicon. Fix support for the Aesop Meta Type. --- Doc/tools/support.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Doc/tools/support.py b/Doc/tools/support.py index b96c4dd..30d4575 100644 --- a/Doc/tools/support.py +++ b/Doc/tools/support.py @@ -8,6 +8,7 @@ __version__ = '$Revision$' import getopt +import os.path import sys @@ -18,7 +19,7 @@ class Options: "columns=", "help", "output=", # content components - "address=", "iconserver=", + "address=", "iconserver=", "favicon=", "title=", "uplink=", "uptitle="] outputfile = "-" @@ -26,6 +27,7 @@ class Options: letters = 0 uplink = "index.html" uptitle = "Python Documentation Index" + favicon = None # The "Aesop Meta Tag" is poorly described, and may only be used # by the Aesop search engine (www.aesop.com), but doesn't hurt. @@ -89,6 +91,8 @@ class Options: self.uptitle = val.strip() elif opt == "--iconserver": self.variables["iconserver"] = val.strip() or "." + elif opt == "--favicon": + self.favicon = val.strip() else: self.handle_option(opt, val) if self.uplink and self.uptitle: @@ -114,11 +118,20 @@ class Options: repl = " %s\n" % link s = s.replace("", repl, 1) if self.aesop_type: - meta = '\n ' + meta = '\n ' % self.aesop_type # Insert this in the middle of the head that's been # generated so far, keeping and elements in # neat groups: s = s.replace("\n ' + % (self.favicon, type)) + s = s.replace("