commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r8286 - trunk/gnue-common/utils


From: jamest
Subject: [gnue] r8286 - trunk/gnue-common/utils
Date: Mon, 3 Apr 2006 18:22:13 -0500 (CDT)

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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]