[Python-checkins] CVS: python/dist/src/Doc/tools mkackshtml,1.2,1.3 mkmodindex,1.12,1.13 support.py,1.5,1.6

Fred L. Drake fdrake@users.sourceforge.net
2002年4月05日 09:34:53 -0800


Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv32723/tools
Modified Files:
	mkackshtml mkmodindex support.py 
Log Message:
Add support for the "Aesop Meta Tag". Not widely used, but not a bad idea,
either.
Index: mkackshtml
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkackshtml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mkackshtml	12 Feb 2001 19:12:55 -0000	1.2
--- mkackshtml	5 Apr 2002 17:34:50 -0000	1.3
***************
*** 31,34 ****
--- 31,35 ----
 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")
Index: mkmodindex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkmodindex,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** mkmodindex	22 Jun 2001 17:11:30 -0000	1.12
--- mkmodindex	5 Apr 2002 17:34:50 -0000	1.13
***************
*** 35,38 ****
--- 35,40 ----
 
 class IndexOptions(support.Options):
+ aesop_type = "links"
+ 
 def __init__(self):
 support.Options.__init__(self)
Index: support.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/support.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** support.py	4 Feb 2002 21:15:42 -0000	1.5
--- support.py	5 Apr 2002 17:34:50 -0000	1.6
***************
*** 29,32 ****
--- 29,50 ----
 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 <meta> tag to the <head>.
+ #
+ aesop_type = None
+ 
 def __init__(self):
 self.args = []
***************
*** 97,100 ****
--- 115,124 ----
 repl = " %s\n</head>" % link
 s = s.replace("</head>", repl, 1)
+ if self.aesop_type:
+ meta = '\n <meta name="aesop" content="%s">'
+ # Insert this in the middle of the head that's been
+ # generated so far, keeping <meta> and <link> elements in
+ # neat groups:
+ s = s.replace("<link ", meta + "<link ", 1)
 return s
 

AltStyle によって変換されたページ (->オリジナル) /