Author: jamest
Date: 2006-03-29 20:24:05 -0600 (Wed, 29 Mar 2006)
New Revision: 8286

Modified:
   trunk/gnue-common/utils/create-technote-index.py
Log:
quick fix for the tech note generator in dealing with section names


Modified: trunk/gnue-common/utils/create-technote-index.py
===================================================================
--- trunk/gnue-common/utils/create-technote-index.py    2006-03-30 01:22:54 UTC 
(rev 8285)
+++ trunk/gnue-common/utils/create-technote-index.py    2006-03-30 02:24:05 UTC 
(rev 8286)
@@ -35,18 +35,21 @@
   html = open("index.html","w")
   html.write (htmlHeader % product)
 
-  current = {}
-  deprecated = {}
-  obsolete = {}
+  sections = {}
 
   for file in glob.glob('[0-9]*.txt'):
     header = getHeader(file)
     status = string.lower(header['STATUS'])
-    locals()[status][file] = header['TITLE']
+    try:
+      sections[status][file] = header['TITLE']
+    except KeyError:
+      sections[status] = {}
+      sections[status][file] = header['TITLE']
 
-  for section, s in (('Current', current),
-                       ('Deprecated',deprecated),
-                       ('Obsolete',obsolete)):
+
+  for section in sections.keys():
+    s = sections[section]
+    section = string.capwords(section)
     if len(s.keys()):
       text.write (textSectionHeader % section)
       html.write (htmlSectionHeader % section)



_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to