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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 27 15:28:58 PDT 2016


Author: lucadelu
Date: 2016-08-27 15:28:58 -0700 (Sat, 27 Aug 2016)
New Revision: 69289

Modified:
   grass/trunk/tools/mkhtml.py
Log:
documentation: added link to revision log, related to #2864

Modified: grass/trunk/tools/mkhtml.py
===================================================================
--- grass/trunk/tools/mkhtml.py	2016-08-27 21:33:55 UTC (rev 69288)
+++ grass/trunk/tools/mkhtml.py	2016-08-27 22:28:58 UTC (rev 69289)
@@ -58,7 +58,7 @@
 
 sourcecode = string.Template(
 """<h2>SOURCE CODE</h2>
-<p>Available at: <a href="${URL}">${PGM} source code</a></p>
+<p>Available at: <a href="${URL_SOURCE}">${PGM} source code</a> (<a href="${URL_LOG}">history</a>)</p>
 """
 )
 
@@ -302,14 +302,14 @@
 topdir = os.path.abspath(os.getenv("MODULE_TOPDIR"))
 curdir = os.path.abspath(os.path.curdir)
 pgmdir = curdir.replace(topdir, '').lstrip('/')
-url = urlparse.urljoin(source_url, pgmdir)
+url_source = urlparse.urljoin(source_url, pgmdir)
 
 if index_name:
-    sys.stdout.write(sourcecode.substitute(URL=url, PGM=pgm))
+    sys.stdout.write(sourcecode.substitute(URL_SOURCE=url_source, PGM=pgm,
+                                           URL_LOG=url_source.replace('browser',  'log')))
     sys.stdout.write(footer_index.substitute(INDEXNAME=index_name,
                                              INDEXNAMECAP=index_name_cap,
-                                             YEAR=year, URL=url,
-                                             GRASS_VERSION=grass_version))
+                                             YEAR=year, GRASS_VERSION=grass_version))
 else:
     sys.stdout.write(footer_noindex.substitute(YEAR=year,
                                                GRASS_VERSION=grass_version))



More information about the grass-commit mailing list