From e03e1fe5ccabbc140483550ba6648dcd110b792b Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 5 Apr 2002 17:34:50 +0000 Subject: Add support for the "Aesop Meta Tag". Not widely used, but not a bad idea, either. --- Doc/perl/l2hinit.perl | 4 ++++ Doc/tools/mkackshtml | 1 + Doc/tools/mkmodindex | 2 ++ Doc/tools/support.py | 24 ++++++++++++++++++++++++ 4 files changed, 31 insertions(+) diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl index 0bc9aa5..b7ade49 100644 --- a/Doc/perl/l2hinit.perl +++ b/Doc/perl/l2hinit.perl @@ -37,6 +37,8 @@ $HAVE_MODULE_INDEX = 0; $HAVE_GENERAL_INDEX = 0; $HAVE_TABLE_OF_CONTENTS = 0; +$AESOP_META_TYPE = 'information'; + # A little painful, but lets us clean up the top level directory a little, # and not be tied to the current directory (as far as I can tell). Testing @@ -639,6 +641,8 @@ sub make_head_and_body { , "\n\n", $title, "\n" , &meta_information($title) , $MY_PARTIAL_HEADER + , ($AESOP_META_TYPE eq '' ? '' + : "\n") , "\n\n"); } diff --git a/Doc/tools/mkackshtml b/Doc/tools/mkackshtml index 917b303..79fe3f9 100755 --- a/Doc/tools/mkackshtml +++ b/Doc/tools/mkackshtml @@ -30,6 +30,7 @@ def main(): colnums = [] for i in range(options.columns): colnums.append(percol*i) + options.aesop_type = "information" fp = options.get_output_file() fp.write(string.rstrip(options.get_header()) + "\n") fp.write(THANKS + "\n") diff --git a/Doc/tools/mkmodindex b/Doc/tools/mkmodindex index 23a200e..58ba05e 100755 --- a/Doc/tools/mkmodindex +++ b/Doc/tools/mkmodindex @@ -34,6 +34,8 @@ import sys class IndexOptions(support.Options): + aesop_type = "links" + def __init__(self): support.Options.__init__(self) self.add_args("l", ["letters"]) diff --git a/Doc/tools/support.py b/Doc/tools/support.py index 187ac21..bc17c6e 100644 --- a/Doc/tools/support.py +++ b/Doc/tools/support.py @@ -28,6 +28,24 @@ class Options: uplink = "index.html" uptitle = "Python Documentation Index" + # The "Aesop Meta Tag" is poorly described, and may only be used + # by the Aesop search engine (www.aesop.com), but doesn't hurt. + # + # There are a number of values this may take to roughly categorize + # a page. A page should be marked according to its primary + # category. Known values are: + # 'personal' -- personal-info + # 'information' -- information + # 'interactive' -- interactive media + # 'multimedia' -- multimedia presenetation (non-sales) + # 'sales' -- sales material + # 'links' -- links to other information pages + # + # Setting the aesop_type value to one of these strings will cause + # get_header() to add the appropriate tag to the . + # + aesop_type = None + def __init__(self): self.args = [] self.variables = {"address": "", @@ -96,6 +114,12 @@ class Options: link = '' % self.uplink repl = " %s\n" % link s = s.replace("", repl, 1) + if self.aesop_type: + meta = '\n ' + # Insert this in the middle of the head that's been + # generated so far, keeping and elements in + # neat groups: + s = s.replace("