[GRASS-SVN] r69283 - grass/trunk/tools

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 27 12:33:26 PDT 2016


Author: lucadelu
Date: 2016-08-27 12:33:25 -0700 (Sat, 27 Aug 2016)
New Revision: 69283

Modified:
   grass/trunk/tools/mkhtml.py
Log:
documentation: moved source code link from footer to source code section, related to #2864

Modified: grass/trunk/tools/mkhtml.py
===================================================================
--- grass/trunk/tools/mkhtml.py	2016-08-27 19:04:21 UTC (rev 69282)
+++ grass/trunk/tools/mkhtml.py	2016-08-27 19:33:25 UTC (rev 69283)
@@ -56,12 +56,17 @@
 <em><b>${PGM}</b></em> - ${PGM_DESC}
 """
 
+sourcecode = string.Template(
+"""<h2>SOURCE CODE</h2>
+<p>Available at: <a href="${URL}">${PGM} source code</a></p>
+"""
+)
+
 footer_index = string.Template(
 """<hr class="header">
 <p>
 <a href="index.html">Main index</a> |
 <a href="${INDEXNAME}.html">${INDEXNAMECAP} index</a> |
-<a href="${URL}">Source code</a> |
 <a href="topics.html">Topics index</a> |
 <a href="keywords.html">Keywords index</a> |
 <a href="graphical_index.html">Graphical index</a> |
@@ -300,6 +305,7 @@
 url = urlparse.urljoin(source_url, pgmdir)
 
 if index_name:
+    sys.stdout.write(sourcecode.substitute(URL=url, PGM=pgm))
     sys.stdout.write(footer_index.substitute(INDEXNAME=index_name,
                                              INDEXNAMECAP=index_name_cap,
                                              YEAR=year, URL=url,



More information about the grass-commit mailing list