[GRASS-SVN] r56787 - grass/trunk/raster/r.colors

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 18 16:57:08 PDT 2013


Author: hamish
Date: 2013-06-18 16:57:08 -0700 (Tue, 18 Jun 2013)
New Revision: 56787

Modified:
   grass/trunk/raster/r.colors/Makefile
   grass/trunk/raster/r.colors/thumbnails.py
Log:
fix thumbnails insert into help page (#2009), add header comments to .py script, trivial linewrap

Modified: grass/trunk/raster/r.colors/Makefile
===================================================================
--- grass/trunk/raster/r.colors/Makefile	2013-06-18 15:04:30 UTC (rev 56786)
+++ grass/trunk/raster/r.colors/Makefile	2013-06-18 23:57:08 UTC (rev 56787)
@@ -15,13 +15,13 @@
 # Insert thumbnail previews
 r.colors.tmp.html: $(BIN)/r.colors$(EXE) thumbnails.py
 	$(call htmldesc,$<,$@)
-	sed 's!^<DD><b>\([a-z0-9._]*\)</b>:!<DD><img width="80" height="12" src="Colortable_\1.png"> <b>\1</b>:!' "$@" > "$@.tmp"
+	sed 's!^<dd><b>\([a-z0-9._]*\)</b>:!<dd><img width="80" height="12" src="Colortable_\1.png"> <b>\1</b>:!' "$@" > "$@.tmp"
 	mv -f "$@.tmp" "$@"
 	$(MAKE) thumbnails
 
 r3.colors.tmp.html: $(BIN)/r3.colors$(EXE) thumbnails.py
 	$(call htmldesc,$<,$@)
-	sed 's!^<DD><b>\([a-z0-9._]*\)</b>:!<DD><img width="80" height="12" src="Colortable_\1.png"> <b>\1</b>:!' "$@" > "$@.tmp"
+	sed 's!^<dd><b>\([a-z0-9._]*\)</b>:!<dd><img width="80" height="12" src="Colortable_\1.png"> <b>\1</b>:!' "$@" > "$@.tmp"
 	mv -f "$@.tmp" "$@"
 	$(MAKE) thumbnails
 

Modified: grass/trunk/raster/r.colors/thumbnails.py
===================================================================
--- grass/trunk/raster/r.colors/thumbnails.py	2013-06-18 15:04:30 UTC (rev 56786)
+++ grass/trunk/raster/r.colors/thumbnails.py	2013-06-18 23:57:08 UTC (rev 56787)
@@ -1,4 +1,16 @@
 #!/usr/bin/env python
+#
+# thumbnails.py: Create thumbnail sample images of the various GRASS color rules
+#
+#  AUTHOR: Python version by Glynn Clements
+#      Earlier Bourne script version by Hamish Bowman,
+#      http://grasswiki.osgeo.org/wiki/Talk:Color_tables
+#
+#   (C) 2009-2013 by the GRASS Development Team
+#       This program is free software under the GNU General Public
+#       License (>=v2). Read the file COPYING that comes with GRASS
+#       for details.
+#
 
 import sys
 import os
@@ -134,7 +146,8 @@
     else:
         lines, cols = None, None
     grass.run_command("r.colors", map = grad, color = table, quiet = True)
-    grass.run_command("d.colortable", flags = 'n', map = grad, lines = lines, cols = cols, quiet = True)
+    grass.run_command("d.colortable", flags = 'n', map = grad,
+                      lines = lines, cols = cols, quiet = True)
     outfile = os.path.join(output_dir, "Colortable_%s.png" % table)
     convert_and_rotate(tmp_img, outfile, discrete)
 



More information about the grass-commit mailing list