changeset 8:e43bf5356404

This patch went upstream to http://thyrsus.com/hg/doclifter
author Rob Landley <rob@landley.net>
date Thu, 02 Aug 2007 14:24:15 -0400
parents 40419c3fa2f8
children b1f967311862
files make/manlifter.patch
diffstat 1 files changed, 0 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/make/manlifter.patch	Wed Jul 25 21:48:59 2007 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
---- doclifter-2.3/manlifter	2006-12-25 02:43:35.000000000 -0500
-+++ new/manlifter	2007-05-24 22:38:22.000000000 -0400
-@@ -359,6 +359,7 @@
-     for (root, dirs, files) in os.walk('xmlman'):
-         for file in files:
-             try:
-+                if not file.endswith(".xml"): continue
-                 # Extract the manual section
-                 m = section_re.search(root)
-                 if m:
-@@ -367,7 +368,7 @@
-                     continue
-                 section_dict[section] = []
-                 # Extract the manual page name
--                name = ".".join(file.split(".")[:-2])
-+                name = ".".join(file.split(".")[:-1])
-                 # Extract the description
-                 file = os.path.join(root, file)
-                 fp = open(file)
-@@ -379,21 +380,21 @@
-                 else:
-                     description = "(no description)"
-                 # Build an index entry
--                filelist.append((section, file, name, description))
-+                filelist.append((section, name, description))
-             except IOError:
-                 pass
-     filelist.sort()	# In case the directory was pieced together by several runs
--    for (section, file, name, description) in filelist:
--        section_dict[section].append((file, name, description))
-+    for (section, name, description) in filelist:
-+        section_dict[section].append((name, description))
-     keys = section_dict.keys()
-     keys.sort()
- 
-     for section in keys:
-         ofp.write(htmlheader)
-         ofp.write("<h1>%s:</h1>\n<dl>\n" % section)
--        for (file, name, description) in section_dict[section]:
--            ofp.write("<dt><a href='%s'>%s</a></dt><dd>%s</dd>\n" \
--                  % (file, name, description))
-+        for (name, description) in section_dict[section]:
-+            ofp.write("<dt><a href='man%s/%s.html'>%s</a></dt><dd>%s</dd>\n" \
-+                  % (section, name, name, description))
-         ofp.write("</dl>\n")
-         ofp.write(htmltrailer)
- 
-@@ -503,7 +504,7 @@
- 
- def doclifter_driver(options, arguments):
-     "Lift old markup to new."
--    global makehtml, outdir, xslfragment, patchdir
-+    global mandir, makehtml, outdir, xslfragment, patchdir
-     filelist = []
-     sections = []
-     callopts = ""
-@@ -567,9 +568,10 @@
-             fp.close()
-             massrun(filelist, callopts)
-         else:
--            global processed 
--            processed = sets.Set(map(lambda x: x.replace(".patch", "").replace(".correction", ""), os.listdir(patchdir)))
--            massrun(sectionfiles(sections), callopts)
-+            global processed
-+            if os.path.exists(patchdir):
-+                processed = sets.Set(map(lambda x: x.replace(".patch", "").replace(".correction", ""), os.listdir(patchdir)))
-+                massrun(sectionfiles(sections), callopts)
-             if processed:
-                 print "# Patches not used:"
-                 for file in processed: