[GRASS-SVN] r66132 - grass/branches/releasebranch_7_0/man
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Sep 6 12:15:30 PDT 2015
Author: martinl
Date: 2015-09-06 12:15:30 -0700 (Sun, 06 Sep 2015)
New Revision: 66132
Modified:
grass/branches/releasebranch_7_0/man/build_topics.py
Log:
fix topics: allow uppercase (fix eg. GUI vs. gui topic)
(merge r66131 from trunk)
Modified: grass/branches/releasebranch_7_0/man/build_topics.py
===================================================================
--- grass/branches/releasebranch_7_0/man/build_topics.py 2015-09-06 19:08:11 UTC (rev 66131)
+++ grass/branches/releasebranch_7_0/man/build_topics.py 2015-09-06 19:15:30 UTC (rev 66132)
@@ -28,7 +28,7 @@
except:
continue
try:
- key = lines[index_keys].split(',')[1].strip().capitalize().replace(' ', '_')
+ key = lines[index_keys].split(',')[1].strip().replace(' ', '_')
key = key.split('>')[1].split('<')[0]
except:
continue
@@ -47,8 +47,8 @@
"%s Reference Manual: Topics index" % grass_version))
topicsfile.write(headertopics_tmpl)
-for key, values in sorted(keywords.iteritems()):
- keyfile = open(os.path.join(path, 'topic_%s.html' % key.lower()), 'w')
+for key, values in sorted(keywords.iteritems(), key=lambda s: s[0].lower()):
+ keyfile = open(os.path.join(path, 'topic_%s.html' % key), 'w')
keyfile.write(header1_tmpl.substitute(title = "GRASS GIS " \
"%s Reference Manual: Topic %s" % (grass_version,
key.replace('_', ' '))))
@@ -60,7 +60,7 @@
basename=mod.replace('.html', '')))
if num_modules >= min_num_modules_for_topic:
topicsfile.writelines([moduletopics_tmpl.substitute(
- key=key.lower(), name=key.replace('_', ' '))])
+ key=key, name=key.replace('_', ' '))])
keyfile.write("</table>\n")
write_html_footer(keyfile, "index.html", year)
topicsfile.write("</ul>\n")
More information about the grass-commit
mailing list