[Python-checkins] r50820 - sandbox/trunk/seealso/convert-python-faqs.py

andrew.kuchling python-checkins at python.org
Tue Jul 25 13:55:32 CEST 2006


Author: andrew.kuchling
Date: Tue Jul 25 13:55:31 2006
New Revision: 50820

Modified:
   sandbox/trunk/seealso/convert-python-faqs.py
Log:
Fix the quotes in the nav.yml; add page title

Modified: sandbox/trunk/seealso/convert-python-faqs.py
==============================================================================
--- sandbox/trunk/seealso/convert-python-faqs.py	(original)
+++ sandbox/trunk/seealso/convert-python-faqs.py	Tue Jul 25 13:55:31 2006
@@ -6,7 +6,7 @@
 #
 # $Id$
 
-import os, shutil, glob
+import os, shutil, glob, cgi
 import htmlload
 
 ET = htmlload.ET
@@ -55,7 +55,7 @@
   nav : !sectionnav |
 """)
     for dirname, title in urls:
-        title = yaml_escape(title)
+        title = normalize_whitespace(title)
         f.write(' '*6 + title + ' ' + dirname + '\n')
     f.close()
 
@@ -85,6 +85,8 @@
     f = open(os.path.join(qdir, 'question.ht'), 'w')
     f.write('Title: Unused title\n')
     f.write('\n')
+
+    f.write('<h1>%s</h1>\n\n' % cgi.escape(title))
     body = root.find('body')
     for child in body.getchildren():
         s = ET.tostring(child, 'utf-8')


More information about the Python-checkins mailing list