فهرست منبع

r.rgb: output_prefix -> basename

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62800 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 سال پیش
والد
کامیت
6c05b4eceb
2فایلهای تغییر یافته به همراه8 افزوده شده و 9 حذف شده
  1. 4 3
      scripts/r.rgb/r.rgb.html
  2. 4 6
      scripts/r.rgb/r.rgb.py

+ 4 - 3
scripts/r.rgb/r.rgb.html

@@ -1,7 +1,7 @@
 <h2>DESCRIPTION</h2>
 
-<em>r.rgb</em> is a script that generates separate red, green and blue
-maps from a raster map and its associated color table.
+<em>r.rgb</em> generates separate red, green and blue maps from a
+raster map and its associated color table.
 
 <h2>SEE ALSO</h2>
 
@@ -16,4 +16,5 @@ maps from a raster map and its associated color table.
 
 Glynn Clements
 
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>

+ 4 - 6
scripts/r.rgb/r.rgb.py

@@ -20,10 +20,8 @@
 #%end
 #%option G_OPT_R_INPUT
 #%end
-#%option
-#% key: output_prefix
-#% type: string
-#% description: Prefix for output raster maps (default: input)
+#%option G_OPT_R_BASENAME_OUTPUT
+#% description: Default: input
 #% required: no
 #%end
 
@@ -31,7 +29,7 @@ import grass.script as grass
 
 def main():
     input = options['input']
-    output = options['output_prefix']
+    output = options['basename']
 
     if not grass.find_file(input)['file']:
 	grass.fatal(_("Raster map <%s> not found") % input)
@@ -46,7 +44,7 @@ def main():
 
     for ch in ['r', 'g', 'b']:
 	name = "%s.%s" % (output, ch)
-	grass.run_command('r.colors', map = name, color = 'grey255')
+	grass.run_command('r.colors', map = name, color = 'grey255', quiet = True)
 	grass.raster_history(name)
 
 if __name__ == "__main__":