Bläddra i källkod

parser: Use #-space-% to allow writing PEP8-compliant Python code (#1287)

Accept '# %' in parser script header definition because '#%' is against PEP8
(each line of a block comment starts with a # and a single space).

'#%' is still supported and documented as backwards compatibility.

All documentation and generated code uses the new '# %'.

Changes '#%' to '# %' for modules in scripts, gui, and temporal.
Vaclav Petras 4 år sedan
förälder
incheckning
635224115c
100 ändrade filer med 3515 tillägg och 3499 borttagningar
  1. 10 10
      doc/gui/wxpython/example/g.gui.example.py
  2. 20 20
      doc/python/m.distance.py
  3. 10 10
      doc/python/script/r.example.py
  4. 177 171
      general/g.parser/g.parser.html
  5. 12 2
      general/g.parser/main.c
  6. 22 22
      general/g.parser/test.pl
  7. 22 22
      general/g.parser/test.py
  8. 22 22
      general/g.parser/test.sh
  9. 12 12
      gui/scripts/d.rast3d.py
  10. 139 139
      gui/scripts/d.wms.py
  11. 31 31
      gui/wxpython/animation/g.gui.animation.py
  12. 6 6
      gui/wxpython/datacatalog/g.gui.datacatalog.py
  13. 9 9
      gui/wxpython/dbmgr/g.gui.dbmgr.py
  14. 8 8
      gui/wxpython/gcp/g.gui.gcp.py
  15. 15 15
      gui/wxpython/gmodeler/g.gui.gmodeler.py
  16. 22 22
      gui/wxpython/gmodeler/model.py
  17. 29 29
      gui/wxpython/gui_core/pyedit.py
  18. 29 29
      gui/wxpython/iclass/g.gui.iclass.py
  19. 23 23
      gui/wxpython/mapdisp/test_mapdisp.py
  20. 24 24
      gui/wxpython/mapswipe/g.gui.mapswipe.py
  21. 13 13
      gui/wxpython/psmap/g.gui.psmap.py
  22. 34 34
      gui/wxpython/rdigit/g.gui.rdigit.py
  23. 7 7
      gui/wxpython/rlisetup/g.gui.rlisetup.py
  24. 14 14
      gui/wxpython/timeline/g.gui.timeline.py
  25. 86 86
      gui/wxpython/tplot/g.gui.tplot.py
  26. 15 15
      gui/wxpython/vdigit/g.gui.vdigit.py
  27. 27 27
      lib/gis/parser_script.c
  28. 16 16
      lib/python/docs/src/script_intro.rst
  29. 10 10
      scripts/d.correlate/d.correlate.py
  30. 45 45
      scripts/d.frame/d.frame.py
  31. 25 25
      scripts/d.out.file/d.out.file.py
  32. 22 22
      scripts/d.polar/d.polar.py
  33. 55 55
      scripts/d.rast.edit/d.rast.edit.py
  34. 32 32
      scripts/d.rast.leg/d.rast.leg.py
  35. 6 6
      scripts/d.redraw/d.redraw.py
  36. 24 24
      scripts/d.shade/d.shade.py
  37. 8 8
      scripts/d.to.rast/d.to.rast.py
  38. 8 8
      scripts/d.what.rast/d.what.rast.py
  39. 8 8
      scripts/d.what.vect/d.what.vect.py
  40. 18 18
      scripts/db.dropcolumn/db.dropcolumn.py
  41. 27 27
      scripts/db.droptable/db.droptable.py
  42. 43 43
      scripts/db.in.ogr/db.in.ogr.py
  43. 40 40
      scripts/db.out.ogr/db.out.ogr.py
  44. 12 12
      scripts/db.test/db.test.py
  45. 38 38
      scripts/db.univar/db.univar.py
  46. 27 27
      scripts/g.bands/g.bands.py
  47. 19 19
      scripts/g.extension.all/g.extension.all.py
  48. 127 127
      scripts/g.extension/g.extension.py
  49. 16 16
      scripts/g.extension/testsuite/data/sample_modules/r.plus.example/r.plus.example.py
  50. 31 31
      scripts/g.manual/g.manual.py
  51. 50 50
      scripts/g.search.modules/g.search.modules.py
  52. 25 25
      scripts/i.band/i.band.py
  53. 46 46
      scripts/i.colors.enhance/i.colors.enhance.py
  54. 10 10
      scripts/i.image.mosaic/i.image.mosaic.py
  55. 17 17
      scripts/i.in.spotvgt/i.in.spotvgt.py
  56. 20 20
      scripts/i.oif/i.oif.py
  57. 56 56
      scripts/i.pansharpen/i.pansharpen.py
  58. 52 52
      scripts/i.spectral/i.spectral.py
  59. 27 27
      scripts/i.tasscap/i.tasscap.py
  60. 72 72
      scripts/m.proj/m.proj.py
  61. 28 28
      scripts/r.blend/r.blend.py
  62. 26 26
      scripts/r.buffer.lowmem/r.buffer.lowmem.py
  63. 15 15
      scripts/r.colors.stddev/r.colors.stddev.py
  64. 88 88
      scripts/r.drain/r.drain.py
  65. 76 76
      scripts/r.fillnulls/r.fillnulls.py
  66. 45 45
      scripts/r.grow/r.grow.py
  67. 96 96
      scripts/r.import/r.import.py
  68. 29 29
      scripts/r.in.aster/r.in.aster.py
  69. 17 17
      scripts/r.in.srtm/r.in.srtm.py
  70. 181 181
      scripts/r.in.wms/r.in.wms.py
  71. 72 72
      scripts/r.mapcalc.simple/r.mapcalc.simple.py
  72. 51 51
      scripts/r.mask/r.mask.py
  73. 21 21
      scripts/r.out.xyz/r.out.xyz.py
  74. 17 17
      scripts/r.pack/r.pack.py
  75. 45 45
      scripts/r.plane/r.plane.py
  76. 48 48
      scripts/r.reclass.area/r.reclass.area.py
  77. 27 27
      scripts/r.rgb/r.rgb.py
  78. 42 42
      scripts/r.shade/r.shade.py
  79. 63 63
      scripts/r.tileset/r.tileset.py
  80. 26 26
      scripts/r.unpack/r.unpack.py
  81. 146 146
      scripts/r3.in.xyz/r3.in.xyz.py
  82. 5 5
      scripts/v.build.all/v.build.all.py
  83. 31 31
      scripts/v.centroids/v.centroids.py
  84. 36 36
      scripts/v.clip/v.clip.py
  85. 20 20
      scripts/v.db.addcolumn/v.db.addcolumn.py
  86. 36 36
      scripts/v.db.addtable/v.db.addtable.py
  87. 18 18
      scripts/v.db.dropcolumn/v.db.dropcolumn.py
  88. 15 15
      scripts/v.db.droprow/v.db.droprow.py
  89. 18 18
      scripts/v.db.droptable/v.db.droptable.py
  90. 41 41
      scripts/v.db.join/v.db.join.py
  91. 34 34
      scripts/v.db.reconnect.all/v.db.reconnect.all.py
  92. 19 19
      scripts/v.db.renamecolumn/v.db.renamecolumn.py
  93. 34 34
      scripts/v.db.univar/v.db.univar.py
  94. 36 36
      scripts/v.db.update/v.db.update.py
  95. 18 18
      scripts/v.dissolve/v.dissolve.py
  96. 80 80
      scripts/v.import/v.import.py
  97. 16 16
      scripts/v.in.e00/v.in.e00.py
  98. 11 11
      scripts/v.in.geonames/v.in.geonames.py
  99. 18 18
      scripts/v.in.lines/v.in.lines.py
  100. 0 0
      scripts/v.in.mapgen/v.in.mapgen.py

+ 10 - 10
doc/gui/wxpython/example/g.gui.example.py

@@ -18,16 +18,16 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Example GUI application which displays raster map and further information
-#% keyword: example
-#% keyword: GUI
-#% keyword: raster
-#%end
-#%option G_OPT_R_INPUT
-#% description: Name of raster map to load
-#% required: no
-#%end
+# %module
+# % description: Example GUI application which displays raster map and further information
+# % keyword: example
+# % keyword: GUI
+# % keyword: raster
+# %end
+# %option G_OPT_R_INPUT
+# % description: Name of raster map to load
+# % required: no
+# %end
 
 
 import os
 import os
 import sys
 import sys

+ 20 - 20
doc/python/m.distance.py

@@ -23,26 +23,26 @@
 # Requires Numeric module (NumPy) from  http://numpy.scipy.org/
 # Requires Numeric module (NumPy) from  http://numpy.scipy.org/
 #
 #
 
 
-#%module
-#% label: Finds the distance between two or more points.
-#% description: If the projection is latitude-longitude, this distance is measured along the geodesic.
-#% keyword: miscellaneous
-#% keyword: distance
-#% keyword: measure
-#%end
-#%option
-#% key: coord
-#% type: string
-#% required: yes
-#% multiple: yes
-#% key_desc: easting,northing
-#% description: Comma separated list of coordinate pairs
-#%end
-#%flag
-#% key: i
-#% description: Read coordinate pairs from stdin
-#% suppress_required: yes
-#%end
+# %module
+# % label: Finds the distance between two or more points.
+# % description: If the projection is latitude-longitude, this distance is measured along the geodesic.
+# % keyword: miscellaneous
+# % keyword: distance
+# % keyword: measure
+# %end
+# %option
+# % key: coord
+# % type: string
+# % required: yes
+# % multiple: yes
+# % key_desc: easting,northing
+# % description: Comma separated list of coordinate pairs
+# %end
+# %flag
+# % key: i
+# % description: Read coordinate pairs from stdin
+# % suppress_required: yes
+# %end
 
 
 import os, sys
 import os, sys
 
 

+ 10 - 10
doc/python/script/r.example.py

@@ -1,15 +1,15 @@
 #!/usr/bin/env python3
 #!/usr/bin/env python3
 
 
-#%module
-#% description: Selects values from raster above value of mean plus standard deviation
-#% keyword: raster
-#% keyword: select
-#% keyword: standard deviation
-#%end
-#%option G_OPT_R_INPUT
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
+# %module
+# % description: Selects values from raster above value of mean plus standard deviation
+# % keyword: raster
+# % keyword: select
+# % keyword: standard deviation
+# %end
+# %option G_OPT_R_INPUT
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
 
 
 
 
 import sys
 import sys

+ 177 - 171
general/g.parser/g.parser.html

@@ -58,20 +58,20 @@ are separated by null characters.
 Typical header definitions are as follows:
 Typical header definitions are as follows:
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-#%module
-#% description: g.parser test script   
-#%end
-#%flag
-#% key: f
-#% description: A flag
-#%end
-#%option
-#% key: raster
-#% type: string
-#% gisprompt: old,cell,raster
-#% description: Raster input map
-#% required: yes
-#%end
+# %module
+# % description: g.parser test script
+# %end
+# %flag
+# % key: f
+# % description: A flag
+# %end
+# %option
+# % key: raster
+# % type: string
+# % gisprompt: old,cell,raster
+# % description: Raster input map
+# % required: yes
+# %end
 </pre></div>
 </pre></div>
 
 
 With <tt>{NULL}</tt> it is possible to suppress a predefined <tt>description</tt>
 With <tt>{NULL}</tt> it is possible to suppress a predefined <tt>description</tt>
@@ -84,21 +84,21 @@ of <a href="https://grass.osgeo.org/programming7/parser__standard__options_8c.ht
 in the programmer manual. Eg. the option
 in the programmer manual. Eg. the option
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-#%option
-#% key: raster
-#% type: string
-#% gisprompt: old,cell,raster
-#% description: Raster input map
-#% required: yes
-#%end
+# %option
+# % key: raster
+# % type: string
+# % gisprompt: old,cell,raster
+# % description: Raster input map
+# % required: yes
+# %end
 </pre></div>
 </pre></div>
 
 
 can be easily defined as
 can be easily defined as
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-#%option G_OPT_R_MAP
-#% key: raster
-#%end
+# %option G_OPT_R_MAP
+# % key: raster
+# %end
 </pre></div>
 </pre></div>
 
 
 The parser allows defining predefined <em>rules</em>
 The parser allows defining predefined <em>rules</em>
@@ -107,26 +107,26 @@ for used options.
 The syntax of the rules section is following:
 The syntax of the rules section is following:
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-#%rules
-#% exclusive: capfile_output, capfile
-#%end
+# %rules
+# % exclusive: capfile_output, capfile
+# %end
 </pre></div>
 </pre></div>
 
 
 The parser also allows defining "OR" conditions, e.g. requiring raster
 The parser also allows defining "OR" conditions, e.g. requiring raster
 OR vector (for details, see below), e.g.for options:
 OR vector (for details, see below), e.g.for options:
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-#%rules
-#% required: raster, vector
-#%end
+# %rules
+# % required: raster, vector
+# %end
 </pre></div>
 </pre></div>
 
 
 and e.g., for flags:
 and e.g., for flags:
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-#%rules
-#% required: -i,-d,-c
-#%end
+# %rules
+# % required: -i,-d,-c
+# %end
 </pre></div>
 </pre></div>
 
 
 <h2>NOTES</h2>
 <h2>NOTES</h2>
@@ -134,7 +134,7 @@ and e.g., for flags:
 An option can be instructed to allow multiple inputs by adding the
 An option can be instructed to allow multiple inputs by adding the
 following line:
 following line:
 <div class="code"><pre>
 <div class="code"><pre>
-#% multiple: yes
+# % multiple: yes
 </pre></div>
 </pre></div>
 
 
 While this will only directly change the <i>Usage</i> section of the help
 While this will only directly change the <i>Usage</i> section of the help
@@ -154,7 +154,7 @@ specify that the options should appear in multiple tabs in the
 auto-generated GUI.  Any options without a <tt>guisection</tt> field
 auto-generated GUI.  Any options without a <tt>guisection</tt> field
 go into the "Required" or "Options" tab.  For example:
 go into the "Required" or "Options" tab.  For example:
 <div class="code"><pre>
 <div class="code"><pre>
-#% guisection: tabname
+# % guisection: tabname
 </pre></div>
 </pre></div>
 would put that option in a tab named <i>tabname</i>.
 would put that option in a tab named <i>tabname</i>.
 
 
@@ -162,7 +162,7 @@ would put that option in a tab named <i>tabname</i>.
 A "<tt>key_desc</tt>" field may be added to each option to specify the text that
 A "<tt>key_desc</tt>" field may be added to each option to specify the text that
 appears in the module's usage help section. For example:
 appears in the module's usage help section. For example:
 <div class="code"><pre>
 <div class="code"><pre>
-#% key_desc: filename
+# % key_desc: filename
 </pre></div>
 </pre></div>
 added to an <b>input</b> option would create the usage summary
 added to an <b>input</b> option would create the usage summary
 <tt>[input=filename]</tt>.
 <tt>[input=filename]</tt>.
@@ -180,6 +180,12 @@ should behave the same way regardless of whether they were set
 by <b>--o</b>, <b>--q</b> or <b>--v</b> being passed to the script or
 by <b>--o</b>, <b>--q</b> or <b>--v</b> being passed to the script or
 set by other means.
 set by other means.
 
 
+<p>
+For backwards compatibility reasons, the header definitions can use
+<code>#%</code> instead of <code># %</code> as in
+<code>#% multiple: yes</code>. However, Python code should use
+<code># %</code> in order to conform to PEP8.
+
 <h2>Conditional parameters</h2>
 <h2>Conditional parameters</h2>
 
 
 Marking an option as "required" will result in the parser raising a
 Marking an option as "required" will result in the parser raising a
@@ -201,9 +207,9 @@ For C, the relevant functions are those in
 For scripts, relationships are specified using a "rules" section, e.g.
 For scripts, relationships are specified using a "rules" section, e.g.
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-#%rules
-#% required: altitude,elevation
-#%end
+# %rules
+# % required: altitude,elevation
+# %end
 </pre></div>
 </pre></div>
 
 
 specifies that at least one of those options must be given. Both
 specifies that at least one of those options must be given. Both
@@ -365,28 +371,28 @@ Parameters:
 
 
 # g.parser demo script for python programming
 # g.parser demo script for python programming
 
 
-#%module
-#% description: g.parser test script (python)
-#% keyword: keyword1
-#% keyword: keyword2
-#%end
-#%flag
-#% key: f
-#% description: A flag
-#%end
-#%option G_OPT_R_MAP
-#% key: raster
-#% required: yes
-#%end
-#%option G_OPT_V_MAP
-#% key: vector
-#%end
-#%option
-#% key: option1
-#% type: string
-#% description: An option
-#% required: no
-#%end
+# %module
+# % description: g.parser test script (python)
+# % keyword: keyword1
+# % keyword: keyword2
+# %end
+# %flag
+# % key: f
+# % description: A flag
+# %end
+# %option G_OPT_R_MAP
+# % key: raster
+# % required: yes
+# %end
+# %option G_OPT_V_MAP
+# % key: vector
+# %end
+# %option
+# % key: option1
+# % type: string
+# % description: An option
+# % required: no
+# %end
 
 
 import os
 import os
 import sys
 import sys
@@ -429,26 +435,26 @@ if __name__ == "__main__":
 
 
 # g.parser demo script for shell programming
 # g.parser demo script for shell programming
 
 
-#%module
-#% description: g.parser test script (shell) 
-#%end
-#%flag
-#% key: f
-#% description: A flag
-#%end
-#%option G_OPT_R_MAP
-#% key: raster
-#% required: yes
-#%end
-#%option G_OPT_V_MAP
-#% key: vector
-#%end
-#%option
-#% key: option1
-#% type: string
-#% description: An option
-#% required: no
-#%end
+# %module
+# % description: g.parser test script (shell)
+# %end
+# %flag
+# % key: f
+# % description: A flag
+# %end
+# %option G_OPT_R_MAP
+# % key: raster
+# % required: yes
+# %end
+# %option G_OPT_V_MAP
+# % key: vector
+# %end
+# %option
+# % key: option1
+# % type: string
+# % description: An option
+# % required: no
+# %end
 
 
 if [ -z "$GISBASE" ] ; then
 if [ -z "$GISBASE" ] ; then
     echo "You must be in GRASS GIS to run this program." 1&gt;&amp;2
     echo "You must be in GRASS GIS to run this program." 1&gt;&amp;2
@@ -489,28 +495,28 @@ use strict;
 
 
 # g.parser demo script
 # g.parser demo script
 
 
-#%module
-#%  description: g.parser test script (perl) 
-#%  keyword: keyword1
-#%  keyword: keyword2
-#%end
-#%flag
-#%  key: f
-#%  description: A flag
-#%end
-#%option G_OPT_R_MAP
-#% key: raster
-#% required: yes
-#%end
-#%option G_OPT_V_MAP
-#% key: vector
-#%end
-#%option
-#% key: option1
-#% type: string
-#% description: An option
-#% required: no
-#%end
+# %module
+# %  description: g.parser test script (perl)
+# %  keyword: keyword1
+# %  keyword: keyword2
+# %end
+# %flag
+# %  key: f
+# %  description: A flag
+# %end
+# %option G_OPT_R_MAP
+# % key: raster
+# % required: yes
+# %end
+# %option G_OPT_V_MAP
+# % key: vector
+# %end
+# %option
+# % key: option1
+# % type: string
+# % description: An option
+# % required: no
+# %end
 
 
 if ( !$ENV{'GISBASE'} ) {
 if ( !$ENV{'GISBASE'} ) {
     printf(STDERR  "You must be in GRASS GIS to run this program.\n");
     printf(STDERR  "You must be in GRASS GIS to run this program.\n");
@@ -575,74 +581,74 @@ v.what.rast --script
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Uploads raster values at positions of vector points to the table.
-#% keyword: vector, sampling, raster, position, querying, attribute table, surface information
-#%end
-#%flag
-#% key: i
-#% description: Interpolate values from the nearest four cells
-#%end
-#%flag
-#% key: p
-#% description: Print categories and values instead of updating the database
-#%end
-#%option
-#% key: map
-#% type: string
-#% required: yes
-#% multiple: no
-#% key_desc: name
-#% label: Name of vector points map for which to edit attributes
-#% description: Or data source for direct OGR access
-#% gisprompt: old,vector,vector
-#%end
-#%option
-#% key: layer
-#% type: string
-#% required: no
-#% multiple: no
-#% label: Layer number or name
-#% description: Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
-#% answer: 1
-#% gisprompt: old,layer,layer
-#%end
-#%option
-#% key: type
-#% type: string
-#% required: no
-#% multiple: yes
-#% options: point,centroid
-#% description: Input feature type
-#% answer: point
-#%end
-#%option
-#% key: raster
-#% type: string
-#% required: yes
-#% multiple: no
-#% key_desc: name
-#% description: Name of existing raster map to be queried
-#% gisprompt: old,cell,raster
-#%end
-#%option
-#% key: column
-#% type: string
-#% required: no
-#% multiple: no
-#% key_desc: name
-#% description: Name of attribute column to be updated with the query result
-#% gisprompt: old,dbcolumn,dbcolumn
-#%end
-#%option
-#% key: where
-#% type: string
-#% required: no
-#% multiple: no
-#% key_desc: sql_query
-#% label: WHERE conditions of SQL statement without 'where' keyword
-#% description: Example: income < 1000 and population >= 10000
-#%end
+# %module
+# % description: Uploads raster values at positions of vector points to the table.
+# % keyword: vector, sampling, raster, position, querying, attribute table, surface information
+# %end
+# %flag
+# % key: i
+# % description: Interpolate values from the nearest four cells
+# %end
+# %flag
+# % key: p
+# % description: Print categories and values instead of updating the database
+# %end
+# %option
+# % key: map
+# % type: string
+# % required: yes
+# % multiple: no
+# % key_desc: name
+# % label: Name of vector points map for which to edit attributes
+# % description: Or data source for direct OGR access
+# % gisprompt: old,vector,vector
+# %end
+# %option
+# % key: layer
+# % type: string
+# % required: no
+# % multiple: no
+# % label: Layer number or name
+# % description: Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
+# % answer: 1
+# % gisprompt: old,layer,layer
+# %end
+# %option
+# % key: type
+# % type: string
+# % required: no
+# % multiple: yes
+# % options: point,centroid
+# % description: Input feature type
+# % answer: point
+# %end
+# %option
+# % key: raster
+# % type: string
+# % required: yes
+# % multiple: no
+# % key_desc: name
+# % description: Name of existing raster map to be queried
+# % gisprompt: old,cell,raster
+# %end
+# %option
+# % key: column
+# % type: string
+# % required: no
+# % multiple: no
+# % key_desc: name
+# % description: Name of attribute column to be updated with the query result
+# % gisprompt: old,dbcolumn,dbcolumn
+# %end
+# %option
+# % key: where
+# % type: string
+# % required: no
+# % multiple: no
+# % key_desc: sql_query
+# % label: WHERE conditions of SQL statement without 'where' keyword
+# % description: Example: income < 1000 and population >= 10000
+# %end
 
 
 import sys
 import sys
 
 

+ 12 - 2
general/g.parser/main.c

@@ -90,6 +90,7 @@ int main(int argc, char *argv[])
     for (ctx.line = 1;; ctx.line++) {
     for (ctx.line = 1;; ctx.line++) {
 	char buff[4096];
 	char buff[4096];
 	char *cmd, *arg;
 	char *cmd, *arg;
+	size_t line_size;
 
 
 	if (!fgets(buff, sizeof(buff), ctx.fp))
 	if (!fgets(buff, sizeof(buff), ctx.fp))
 	    break;
 	    break;
@@ -102,10 +103,19 @@ int main(int argc, char *argv[])
 	}
 	}
 	*arg = '\0';
 	*arg = '\0';
 
 
-	if (buff[0] != '#' || buff[1] != '%')
+	line_size = strlen(buff);
+	if (line_size > 2 && buff[0] == '#') {
+	    if (buff[1] == '%')
+		cmd = buff + 2;
+	    else if (line_size > 3 && buff[1] == ' ' && buff[2] == '%')
+		cmd = buff + 3;
+	    else
+		continue;
+	}
+	else {
 	    continue;
 	    continue;
+	}
 
 
-	cmd = buff + 2;
 	G_chop(cmd);
 	G_chop(cmd);
 
 
 	arg = strchr(cmd, ':');
 	arg = strchr(cmd, ':');

+ 22 - 22
general/g.parser/test.pl

@@ -2,28 +2,28 @@
 use strict;
 use strict;
 # g.parser demo script for perl programming
 # g.parser demo script for perl programming
 
 
-#%module
-#% description: g.parser test script (perl)
-#% keyword: keyword1
-#% keyword: keyword2
-#%end
-#%flag
-#% key: f
-#% description: A flag
-#%end
-#%option G_OPT_R_MAP
-#% key: raster
-#% required: yes
-#%end
-#%option G_OPT_V_MAP
-#% key: vector
-#%end
-#%option
-#% key: option1
-#% type: string
-#% description: An option
-#% required: no
-#%end
+# %module
+# % description: g.parser test script (perl)
+# % keyword: keyword1
+# % keyword: keyword2
+# %end
+# %flag
+# % key: f
+# % description: A flag
+# %end
+# %option G_OPT_R_MAP
+# % key: raster
+# % required: yes
+# %end
+# %option G_OPT_V_MAP
+# % key: vector
+# %end
+# %option
+# % key: option1
+# % type: string
+# % description: An option
+# % required: no
+# %end
 
 
 if ( !$ENV{'GISBASE'} ) {
 if ( !$ENV{'GISBASE'} ) {
     printf(STDERR  "You must be in GRASS GIS to run this program.\n");
     printf(STDERR  "You must be in GRASS GIS to run this program.\n");

+ 22 - 22
general/g.parser/test.py

@@ -2,28 +2,28 @@
 
 
 # g.parser demo script for python programming
 # g.parser demo script for python programming
 
 
-#%module
-#% description: g.parser test script (python)
-#% keyword: keyword1
-#% keyword: keyword2
-#%end
-#%flag
-#% key: f
-#% description: A flag
-#%end
-#%option G_OPT_R_MAP
-#% key: raster
-#% required: yes
-#%end
-#%option G_OPT_V_MAP
-#% key: vector
-#%end
-#%option
-#% key: option1
-#% type: string
-#% description: An option
-#% required: no
-#%end
+# %module
+# % description: g.parser test script (python)
+# % keyword: keyword1
+# % keyword: keyword2
+# %end
+# %flag
+# % key: f
+# % description: A flag
+# %end
+# %option G_OPT_R_MAP
+# % key: raster
+# % required: yes
+# %end
+# %option G_OPT_V_MAP
+# % key: vector
+# %end
+# %option
+# % key: option1
+# % type: string
+# % description: An option
+# % required: no
+# %end
 
 
 import sys
 import sys
 import atexit
 import atexit

+ 22 - 22
general/g.parser/test.sh

@@ -2,28 +2,28 @@
 
 
 # g.parser demo script for shell programming
 # g.parser demo script for shell programming
 
 
-#%module
-#% description: g.parser test script (shell)
-#% keyword: keyword1
-#% keyword: keyword2
-#%end
-#%flag
-#% key: f
-#% description: A flag
-#%end
-#%option G_OPT_R_MAP
-#% key: raster
-#% required: yes
-#%end
-#%option G_OPT_V_MAP
-#% key: vector
-#%end
-#%option
-#% key: option1
-#% type: string
-#% description: An option
-#% required: no
-#%end
+# %module
+# % description: g.parser test script (shell)
+# % keyword: keyword1
+# % keyword: keyword2
+# %end
+# %flag
+# % key: f
+# % description: A flag
+# %end
+# %option G_OPT_R_MAP
+# % key: raster
+# % required: yes
+# %end
+# %option G_OPT_V_MAP
+# % key: vector
+# %end
+# %option
+# % key: option1
+# % type: string
+# % description: An option
+# % required: no
+# %end
 
 
 if [ -z "$GISBASE" ] ; then
 if [ -z "$GISBASE" ] ; then
     echo "You must be in GRASS GIS to run this program." 1>&2
     echo "You must be in GRASS GIS to run this program." 1>&2

+ 12 - 12
gui/scripts/d.rast3d.py

@@ -16,19 +16,19 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Displays a 3D raster map layer.
-#% keyword: display
-#% keyword: raster3d
-#%end
+# %module
+# % description: Displays a 3D raster map layer.
+# % keyword: display
+# % keyword: raster3d
+# %end
 
 
-#%option
-#% key: map
-#% type: string
-#% gisprompt: old,grid3,3d-raster
-#% description: 3D raster map to be displayed
-#% required : yes
-#%end
+# %option
+# % key: map
+# % type: string
+# % gisprompt: old,grid3,3d-raster
+# % description: 3D raster map to be displayed
+# % required : yes
+# %end
 
 
 from grass.script import core as grass
 from grass.script import core as grass
 
 

+ 139 - 139
gui/scripts/d.wms.py

@@ -15,145 +15,145 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Downloads and displays data from WMS/WMTS/NASA OnEarth server.
-#% keyword: raster
-#% keyword: import
-#% keyword: WMS
-#% keyword: WMTS
-#% keyword: OnEarth
-#%end
-
-#%option
-#% key: url
-#% type: string
-#% description: Typically starts with "http://"
-#% required: yes
-#%end
-
-#%option
-#% key: map
-#% type: string
-#% description: Name for output WMS layer in the layer tree
-#% required : yes
-#%end
-
-#%option
-#% key: layers
-#% type: string
-#% description: Layer(s) to request from the map server
-#% multiple: yes
-#% required: yes
-#%end
-
-#%option
-#% key: styles
-#% type: string
-#% description: Layer style(s) to request from the map server
-#% multiple: yes
-#% guisection: Map style
-#%end
-
-#%option
-#% key: format
-#% type: string
-#% description: Image format requested from the server
-#% options: geotiff,tiff,jpeg,gif,png,png8
-#% answer: png
-#% guisection: Request
-#%end
-
-#%option
-#% key: srs
-#% type: integer
-#% description: EPSG code of requested source projection
-#% answer:4326
-#% guisection: Request
-#%end
-
-#%option
-#% key: driver
-#% type:string
-#% description: Driver used to communication with server
-#% descriptions: WMS_GDAL;Download data using GDAL WMS driver;WMS_GRASS;Download data using native GRASS-WMS driver;WMTS_GRASS;Download data using native GRASS-WMTS driver;OnEarth_GRASS;Download data using native GRASS-OnEarth driver;
-#% options:WMS_GDAL, WMS_GRASS, WMTS_GRASS, OnEarth_GRASS
-#% answer:WMS_GRASS
-#% guisection: Connection
-#%end
-
-#%option
-#% key: wms_version
-#% type:string
-#% description: WMS standard version
-#% options: 1.1.1,1.3.0
-#% answer: 1.1.1
-#% guisection: Request
-#%end
-
-#%option
-#% key: maxcols
-#% type:integer
-#% description: Maximum columns to request at a time
-#% answer:512
-#% guisection: Request
-#%end
-
-#%option
-#% key: maxrows
-#% type: integer
-#% description: Maximum rows to request at a time
-#% answer: 512
-#% guisection: Request
-#%end
-
-#%option
-#% key: urlparams
-#% type:string
-#% description: Additional query parameters to pass to the server
-#% guisection: Request
-#%end
-
-#%option
-#% key: username
-#% type:string
-#% description: Username for server connection
-#% guisection: Connection
-#%end
-
-#%option
-#% key: password
-#% type:string
-#% description: Password for server connection
-#% guisection: Connection
-#%end
-
-#%option
-#% key: method
-#% type: string
-#% description: Interpolation method to use in reprojection
-#% options:nearest,linear,cubic,cubicspline
-#% answer:nearest
-#% required: no
-#%end
-
-#%option
-#% key: bgcolor
-#% type: string
-#% description: Background color
-#% guisection: Map style
-#%end
-
-#%option G_OPT_F_BIN_INPUT
-#% key: capfile
-#% required: no
-#% description: Capabilities file to parse (input). It is relevant for WMTS_GRASS and OnEarth_GRASS drivers
-#%end
-
-#%flag
-#% key: o
-#% description: Don't request transparent data
-#% guisection: Map style
-#%end
+# %module
+# % description: Downloads and displays data from WMS/WMTS/NASA OnEarth server.
+# % keyword: raster
+# % keyword: import
+# % keyword: WMS
+# % keyword: WMTS
+# % keyword: OnEarth
+# %end
+
+# %option
+# % key: url
+# % type: string
+# % description: Typically starts with "http://"
+# % required: yes
+# %end
+
+# %option
+# % key: map
+# % type: string
+# % description: Name for output WMS layer in the layer tree
+# % required : yes
+# %end
+
+# %option
+# % key: layers
+# % type: string
+# % description: Layer(s) to request from the map server
+# % multiple: yes
+# % required: yes
+# %end
+
+# %option
+# % key: styles
+# % type: string
+# % description: Layer style(s) to request from the map server
+# % multiple: yes
+# % guisection: Map style
+# %end
+
+# %option
+# % key: format
+# % type: string
+# % description: Image format requested from the server
+# % options: geotiff,tiff,jpeg,gif,png,png8
+# % answer: png
+# % guisection: Request
+# %end
+
+# %option
+# % key: srs
+# % type: integer
+# % description: EPSG code of requested source projection
+# % answer:4326
+# % guisection: Request
+# %end
+
+# %option
+# % key: driver
+# % type:string
+# % description: Driver used to communication with server
+# % descriptions: WMS_GDAL;Download data using GDAL WMS driver;WMS_GRASS;Download data using native GRASS-WMS driver;WMTS_GRASS;Download data using native GRASS-WMTS driver;OnEarth_GRASS;Download data using native GRASS-OnEarth driver;
+# % options:WMS_GDAL, WMS_GRASS, WMTS_GRASS, OnEarth_GRASS
+# % answer:WMS_GRASS
+# % guisection: Connection
+# %end
+
+# %option
+# % key: wms_version
+# % type:string
+# % description: WMS standard version
+# % options: 1.1.1,1.3.0
+# % answer: 1.1.1
+# % guisection: Request
+# %end
+
+# %option
+# % key: maxcols
+# % type:integer
+# % description: Maximum columns to request at a time
+# % answer:512
+# % guisection: Request
+# %end
+
+# %option
+# % key: maxrows
+# % type: integer
+# % description: Maximum rows to request at a time
+# % answer: 512
+# % guisection: Request
+# %end
+
+# %option
+# % key: urlparams
+# % type:string
+# % description: Additional query parameters to pass to the server
+# % guisection: Request
+# %end
+
+# %option
+# % key: username
+# % type:string
+# % description: Username for server connection
+# % guisection: Connection
+# %end
+
+# %option
+# % key: password
+# % type:string
+# % description: Password for server connection
+# % guisection: Connection
+# %end
+
+# %option
+# % key: method
+# % type: string
+# % description: Interpolation method to use in reprojection
+# % options:nearest,linear,cubic,cubicspline
+# % answer:nearest
+# % required: no
+# %end
+
+# %option
+# % key: bgcolor
+# % type: string
+# % description: Background color
+# % guisection: Map style
+# %end
+
+# %option G_OPT_F_BIN_INPUT
+# % key: capfile
+# % required: no
+# % description: Capabilities file to parse (input). It is relevant for WMTS_GRASS and OnEarth_GRASS drivers
+# %end
+
+# %flag
+# % key: o
+# % description: Don't request transparent data
+# % guisection: Map style
+# %end
 
 
 import os
 import os
 import sys
 import sys

+ 31 - 31
gui/wxpython/animation/g.gui.animation.py

@@ -19,37 +19,37 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Tool for animating a series of raster and vector maps or a space time raster or vector dataset.
-#% keyword: general
-#% keyword: GUI
-#% keyword: display
-#% keyword: animation
-#%end
-#%option G_OPT_R_INPUTS
-#% key: raster
-#% description: Raster maps to animate
-#% required: no
-#% guisection: Input
-#%end
-#%option G_OPT_V_INPUTS
-#% key: vector
-#% label: Vector maps to animate
-#% required: no
-#% guisection: Input
-#%end
-#%option G_OPT_STRDS_INPUT
-#% key: strds
-#% description: Space time raster dataset to animate
-#% required: no
-#% guisection: Input
-#%end
-#%option G_OPT_STVDS_INPUT
-#% key: stvds
-#% description: Space time vector dataset to animate
-#% required: no
-#% guisection: Input
-#%end
+# %module
+# % description: Tool for animating a series of raster and vector maps or a space time raster or vector dataset.
+# % keyword: general
+# % keyword: GUI
+# % keyword: display
+# % keyword: animation
+# %end
+# %option G_OPT_R_INPUTS
+# % key: raster
+# % description: Raster maps to animate
+# % required: no
+# % guisection: Input
+# %end
+# %option G_OPT_V_INPUTS
+# % key: vector
+# % label: Vector maps to animate
+# % required: no
+# % guisection: Input
+# %end
+# %option G_OPT_STRDS_INPUT
+# % key: strds
+# % description: Space time raster dataset to animate
+# % required: no
+# % guisection: Input
+# %end
+# %option G_OPT_STVDS_INPUT
+# % key: stvds
+# % description: Space time vector dataset to animate
+# % required: no
+# % guisection: Input
+# %end
 
 
 import grass.script as gscript
 import grass.script as gscript
 from grass.exceptions import FatalError
 from grass.exceptions import FatalError

+ 6 - 6
gui/wxpython/datacatalog/g.gui.datacatalog.py

@@ -18,12 +18,12 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Tool for browsing, modifying and managing GRASS maps.
-#% keyword: general
-#% keyword: GUI
-#% keyword: map management
-#%end
+# %module
+# % description: Tool for browsing, modifying and managing GRASS maps.
+# % keyword: general
+# % keyword: GUI
+# % keyword: map management
+# %end
 
 
 import grass.script as gscript
 import grass.script as gscript
 
 

+ 9 - 9
gui/wxpython/dbmgr/g.gui.dbmgr.py

@@ -18,15 +18,15 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Launches graphical attribute table manager.
-#% keyword: general
-#% keyword: GUI
-#% keyword: attribute table
-#% keyword: database
-#%end
-#%option G_OPT_V_MAP
-#%end
+# %module
+# % description: Launches graphical attribute table manager.
+# % keyword: general
+# % keyword: GUI
+# % keyword: attribute table
+# % keyword: database
+# %end
+# %option G_OPT_V_MAP
+# %end
 
 
 import grass.script as gscript
 import grass.script as gscript
 
 

+ 8 - 8
gui/wxpython/gcp/g.gui.gcp.py

@@ -19,14 +19,14 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Georectifies a map and allows managing Ground Control Points.
-#% keyword: general
-#% keyword: GUI
-#% keyword: georectification
-#% keyword: geometry
-#% keyword: GCP
-#%end
+# %module
+# % description: Georectifies a map and allows managing Ground Control Points.
+# % keyword: general
+# % keyword: GUI
+# % keyword: georectification
+# % keyword: geometry
+# % keyword: GCP
+# %end
 
 
 """
 """
 Module to run GCP management tool as stadalone application.
 Module to run GCP management tool as stadalone application.

+ 15 - 15
gui/wxpython/gmodeler/g.gui.gmodeler.py

@@ -18,21 +18,21 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% label: Graphical Modeler.
-#% description: Allows interactively creating, editing and managing models.
-#% keyword: general
-#% keyword: GUI
-#% keyword: graphical modeler
-#% keyword: workflow
-#%end
-#%option G_OPT_F_INPUT
-#% key: file
-#% description: Name of model file to be loaded
-#% key_desc: name.gxm
-#% required: no
-#% guisection: Model
-#%end
+# %module
+# % label: Graphical Modeler.
+# % description: Allows interactively creating, editing and managing models.
+# % keyword: general
+# % keyword: GUI
+# % keyword: graphical modeler
+# % keyword: workflow
+# %end
+# %option G_OPT_F_INPUT
+# % key: file
+# % description: Name of model file to be loaded
+# % key_desc: name.gxm
+# % required: no
+# % guisection: Model
+# %end
 
 
 import grass.script as gscript
 import grass.script as gscript
 
 

+ 22 - 22
gui/wxpython/gmodeler/model.py

@@ -2557,9 +2557,9 @@ class WritePythonFile:
         # UI
         # UI
         self.fd.write(
         self.fd.write(
             r"""
             r"""
-#%module
-#% description: {description}
-#%end
+# %module
+# % description: {description}
+# %end
 """.format(description=' '.join(properties['description'].splitlines())))
 """.format(description=' '.join(properties['description'].splitlines())))
 
 
         modelItems = self.model.GetItems()
         modelItems = self.model.GetItems()
@@ -2570,20 +2570,20 @@ class WritePythonFile:
                 else:
                 else:
                     desc = flag['description']
                     desc = flag['description']
                 self.fd.write(
                 self.fd.write(
-                r"""#%option
-#% key: {flag_name}
-#% description: {description}
-#% required: yes
-#% type: string
-#% options: True, False
-#% guisection: Flags
+                r"""# %option
+# % key: {flag_name}
+# % description: {description}
+# % required: yes
+# % type: string
+# % options: True, False
+# % guisection: Flags
 """.format(flag_name=self._getParamName(flag['name'], item),
 """.format(flag_name=self._getParamName(flag['name'], item),
            description=desc))
            description=desc))
                 if flag['value']:
                 if flag['value']:
-                    self.fd.write("#% answer: {}\n".format(flag['value']))
+                    self.fd.write("# % answer: {}\n".format(flag['value']))
                 else:
                 else:
-                    self.fd.write("#% answer: False\n")
-                self.fd.write("#%end\n")
+                    self.fd.write("# % answer: False\n")
+                self.fd.write("# %end\n")
 
 
             for param in item.GetParameterizedParams()['params']:
             for param in item.GetParameterizedParams()['params']:
                 if param['label']:
                 if param['label']:
@@ -2591,23 +2591,23 @@ class WritePythonFile:
                 else:
                 else:
                     desc = param['description']
                     desc = param['description']
                 self.fd.write(
                 self.fd.write(
-                r"""#%option
-#% key: {param_name}
-#% description: {description}
-#% required: yes
+                r"""# %option
+# % key: {param_name}
+# % description: {description}
+# % required: yes
 """.format(param_name=self._getParamName(param['name'], item),
 """.format(param_name=self._getParamName(param['name'], item),
            description=desc))
            description=desc))
                 if param['type'] != 'float':
                 if param['type'] != 'float':
-                    self.fd.write('#% type: {}\n'.format(param['type']))
+                    self.fd.write('# % type: {}\n'.format(param['type']))
                 else:
                 else:
-                    self.fd.write('#% type: double\n')
+                    self.fd.write('# % type: double\n')
                 if param['key_desc']:
                 if param['key_desc']:
-                    self.fd.write("#% key_desc: ")
+                    self.fd.write("# % key_desc: ")
                     self.fd.write(', '.join(param['key_desc']))
                     self.fd.write(', '.join(param['key_desc']))
                     self.fd.write("\n")
                     self.fd.write("\n")
                 if param['value']:
                 if param['value']:
-                    self.fd.write("#% answer: {}\n".format(param['value']))
-                self.fd.write("#%end\n")
+                    self.fd.write("# % answer: {}\n".format(param['value']))
+                self.fd.write("# %end\n")
 
 
         # import modules
         # import modules
         self.fd.write(
         self.fd.write(

+ 29 - 29
gui/wxpython/gui_core/pyedit.py

@@ -99,9 +99,9 @@ def module_template():
     # UI
     # UI
     output.write(
     output.write(
         r"""
         r"""
-#%%module
-#%% description: %s
-#%%end
+# %%module
+# %% description: %s
+# %%end
 """ % (' '.join(properties['description'].splitlines())))
 """ % (' '.join(properties['description'].splitlines())))
 
 
     # import modules
     # import modules
@@ -168,22 +168,22 @@ def module_example():
     """Example of a GRASS module"""
     """Example of a GRASS module"""
     return r"""#!/usr/bin/env python3
     return r"""#!/usr/bin/env python3
 
 
-#%module
-#% description: Adds the values of two rasters (A + B)
-#% keyword: raster
-#% keyword: algebra
-#% keyword: sum
-#%end
-#%option G_OPT_R_INPUT
-#% key: araster
-#% description: Name of input raster A in an expression A + B
-#%end
-#%option G_OPT_R_INPUT
-#% key: braster
-#% description: Name of input raster B in an expression A + B
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
+# %module
+# % description: Adds the values of two rasters (A + B)
+# % keyword: raster
+# % keyword: algebra
+# % keyword: sum
+# %end
+# %option G_OPT_R_INPUT
+# % key: araster
+# % description: Name of input raster A in an expression A + B
+# %end
+# %option G_OPT_R_INPUT
+# % key: braster
+# % description: Name of input raster B in an expression A + B
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
 
 
 
 
 import sys
 import sys
@@ -211,16 +211,16 @@ def module_error_handling_example():
     """Example of a GRASS module"""
     """Example of a GRASS module"""
     return r"""#!/usr/bin/env python3
     return r"""#!/usr/bin/env python3
 
 
-#%module
-#% description: Selects values from raster above value of mean plus standard deviation
-#% keyword: raster
-#% keyword: select
-#% keyword: standard deviation
-#%end
-#%option G_OPT_R_INPUT
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
+# %module
+# % description: Selects values from raster above value of mean plus standard deviation
+# % keyword: raster
+# % keyword: select
+# % keyword: standard deviation
+# %end
+# %option G_OPT_R_INPUT
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
 
 
 
 
 import sys
 import sys

+ 29 - 29
gui/wxpython/iclass/g.gui.iclass.py

@@ -19,35 +19,35 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% label: Tool for supervised classification of imagery data.
-#% description: Generates spectral signatures for an image by allowing the user to outline regions of interest.
-#% keyword: general
-#% keyword: GUI
-#% keyword: classification
-#% keyword: supervised classification
-#% keyword: signatures
-#%end
-#%flag
-#% key: m
-#% description: Maximize window
-#%end
-#%option G_OPT_I_GROUP
-#% required: no
-#%end
-#%option G_OPT_I_SUBGROUP
-#% required: no
-#%end
-#%option G_OPT_R_MAP
-#% description: Name of raster map to load
-#% required: no
-#%end
-#%option G_OPT_V_MAP
-#% key: trainingmap
-#% label: Ground truth training map to load
-#% description:
-#% required: no
-#%end
+# %module
+# % label: Tool for supervised classification of imagery data.
+# % description: Generates spectral signatures for an image by allowing the user to outline regions of interest.
+# % keyword: general
+# % keyword: GUI
+# % keyword: classification
+# % keyword: supervised classification
+# % keyword: signatures
+# %end
+# %flag
+# % key: m
+# % description: Maximize window
+# %end
+# %option G_OPT_I_GROUP
+# % required: no
+# %end
+# %option G_OPT_I_SUBGROUP
+# % required: no
+# %end
+# %option G_OPT_R_MAP
+# % description: Name of raster map to load
+# % required: no
+# %end
+# %option G_OPT_V_MAP
+# % key: trainingmap
+# % label: Ground truth training map to load
+# % description:
+# % required: no
+# %end
 
 
 import os
 import os
 import grass.script as gscript
 import grass.script as gscript

+ 23 - 23
gui/wxpython/mapdisp/test_mapdisp.py

@@ -19,29 +19,29 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Georectifies a map and allows managing Ground Control Points.
-#% keyword: general
-#% keyword: GUI
-#% keyword: georectification
-#%end
-#%option
-#% key: test
-#% description: Test to run
-#% options: mapwindow,mapdisplay,apitest,distance,profile
-#% descriptions: mapwindow;Opens map window ;mapdisplay;Opens map display; apitest;Open an application to test API of map window; distance;Starts map window with distance measurement activated; profile;Starts map window with profile tool activated
-#% required: yes
-#%end
-#%option G_OPT_R_INPUT
-#% key: raster
-#% multiple: yes
-#% required: no
-#%end
-#%option G_OPT_V_INPUT
-#% key: vector
-#% multiple: yes
-#% required: no
-#%end
+# %module
+# % description: Tests map display and map window widgets
+# % keyword: general
+# % keyword: GUI
+# % keyword: test
+# %end
+# %option
+# % key: test
+# % description: Test to run
+# % options: mapwindow,mapdisplay,apitest,distance,profile
+# % descriptions: mapwindow;Opens map window ;mapdisplay;Opens map display; apitest;Open an application to test API of map window; distance;Starts map window with distance measurement activated; profile;Starts map window with profile tool activated
+# % required: yes
+# %end
+# %option G_OPT_R_INPUT
+# % key: raster
+# % multiple: yes
+# % required: no
+# %end
+# %option G_OPT_V_INPUT
+# % key: vector
+# % multiple: yes
+# % required: no
+# %end
 
 
 """
 """
 Module to run test map window (BufferedWidnow) and map display (MapFrame).
 Module to run test map window (BufferedWidnow) and map display (MapFrame).

+ 24 - 24
gui/wxpython/mapswipe/g.gui.mapswipe.py

@@ -19,30 +19,30 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Interactively compares two maps by swiping a visibility bar.
-#% keyword: general
-#% keyword: GUI
-#% keyword: display
-#%end
-#%option G_OPT_R_INPUT
-#% key: first
-#% description: First (top/right) raster map
-#% required: no
-#%end
-#%option G_OPT_R_INPUT
-#% key: second
-#% description: Second (bottom/left) raster map
-#% required: no
-#%end
-#%option
-#% key: mode
-#% description: View mode
-#% options: swipe,mirror
-#% descriptions:swipe;swiping the upper map layer to show the map layer below ;mirror;synchronized maps side by side
-#% answer: swipe
-#% required: no
-#%end
+# %module
+# % description: Interactively compares two maps by swiping a visibility bar.
+# % keyword: general
+# % keyword: GUI
+# % keyword: display
+# %end
+# %option G_OPT_R_INPUT
+# % key: first
+# % description: First (top/right) raster map
+# % required: no
+# %end
+# %option G_OPT_R_INPUT
+# % key: second
+# % description: Second (bottom/left) raster map
+# % required: no
+# %end
+# %option
+# % key: mode
+# % description: View mode
+# % options: swipe,mirror
+# % descriptions:swipe;swiping the upper map layer to show the map layer below ;mirror;synchronized maps side by side
+# % answer: swipe
+# % required: no
+# %end
 
 
 import os
 import os
 import grass.script as gscript
 import grass.script as gscript

+ 13 - 13
gui/wxpython/psmap/g.gui.psmap.py

@@ -18,19 +18,19 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Tool for creating hardcopy map outputs.
-#% keyword: general
-#% keyword: GUI
-#% keyword: printing
-#%end
-#%option G_OPT_F_INPUT
-#% key: file
-#% label: File containing mapping instructions to load
-#% description: See ps.map manual for details
-#% key_desc: name
-#% required: no
-#%end
+# %module
+# % description: Tool for creating hardcopy map outputs.
+# % keyword: general
+# % keyword: GUI
+# % keyword: printing
+# %end
+# %option G_OPT_F_INPUT
+# % key: file
+# % label: File containing mapping instructions to load
+# % description: See ps.map manual for details
+# % key_desc: name
+# % required: no
+# %end
 
 
 import grass.script as gscript
 import grass.script as gscript
 
 

+ 34 - 34
gui/wxpython/rdigit/g.gui.rdigit.py

@@ -19,40 +19,40 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Interactive editing and digitizing of raster maps.
-#% keyword: general
-#% keyword: GUI
-#% keyword: raster
-#% keyword: editing
-#% keyword: digitizer
-#%end
-#%option G_OPT_R_OUTPUT
-#% key: create
-#% label: Name of new raster map to create
-#% required: no
-#% guisection: Create
-#%end
-#%option G_OPT_R_BASE
-#% required: no
-#% guisection: Create
-#%end
-#%option G_OPT_R_TYPE
-#% answer: CELL
-#% required: no
-#% guisection: Create
-#%end
-#%option G_OPT_R_INPUT
-#% key: edit
-#% required: no
-#% label: Name of existing raster map to edit
-#% guisection: Edit
-#%end
-#%rules
-#% exclusive: create, edit
-#% required: create, edit
-#% requires: base, create
-#%end
+# %module
+# % description: Interactive editing and digitizing of raster maps.
+# % keyword: general
+# % keyword: GUI
+# % keyword: raster
+# % keyword: editing
+# % keyword: digitizer
+# %end
+# %option G_OPT_R_OUTPUT
+# % key: create
+# % label: Name of new raster map to create
+# % required: no
+# % guisection: Create
+# %end
+# %option G_OPT_R_BASE
+# % required: no
+# % guisection: Create
+# %end
+# %option G_OPT_R_TYPE
+# % answer: CELL
+# % required: no
+# % guisection: Create
+# %end
+# %option G_OPT_R_INPUT
+# % key: edit
+# % required: no
+# % label: Name of existing raster map to edit
+# % guisection: Edit
+# %end
+# %rules
+# % exclusive: create, edit
+# % required: create, edit
+# % requires: base, create
+# %end
 
 
 import os
 import os
 
 

+ 7 - 7
gui/wxpython/rlisetup/g.gui.rlisetup.py

@@ -18,13 +18,13 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Configuration tool for r.li modules.
-#% keyword: general
-#% keyword: GUI
-#% keyword: raster
-#% keyword: landscape structure analysis
-#%end
+# %module
+# % description: Configuration tool for r.li modules.
+# % keyword: general
+# % keyword: GUI
+# % keyword: raster
+# % keyword: landscape structure analysis
+# %end
 
 
 import grass.script as gscript
 import grass.script as gscript
 
 

+ 14 - 14
gui/wxpython/timeline/g.gui.timeline.py

@@ -19,20 +19,20 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Allows comparing temporal datasets by displaying their temporal extents in a plot.
-#% keyword: general
-#% keyword: GUI
-#% keyword: temporal
-#% keywords: plot
-#%end
-#%option G_OPT_STDS_INPUTS
-#% required: no
-#%end
-#%flag
-#% key: 3
-#% description: Show also 3D plot of spatio-temporal extents
-#%end
+# %module
+# % description: Allows comparing temporal datasets by displaying their temporal extents in a plot.
+# % keyword: general
+# % keyword: GUI
+# % keyword: temporal
+# % keywords: plot
+# %end
+# %option G_OPT_STDS_INPUTS
+# % required: no
+# %end
+# %flag
+# % key: 3
+# % description: Show also 3D plot of spatio-temporal extents
+# %end
 
 
 import grass.script as gscript
 import grass.script as gscript
 
 

+ 86 - 86
gui/wxpython/tplot/g.gui.tplot.py

@@ -20,94 +20,94 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Plots the values of temporal datasets.
-#% keywords: general
-#% keywords: GUI
-#% keywords: temporal
-#% keywords: plot
-#%end
-
-#%flag
-#% key: h
-#% description: Set the header of CSV file, to be used with csv option
-#%end
-
-#%flag
-#% key: l
-#% description: Show simple linear regression model line
-#%end
-
-#%option G_OPT_STVDS_INPUTS
-#% key: stvds
-#% required: no
-#%end
-
-#%option G_OPT_STRDS_INPUTS
-#% key: strds
-#% required: no
-#%end
-
-#%option G_OPT_M_COORDS
-#% required: no
-#%end
+# %module
+# % description: Plots the values of temporal datasets.
+# % keywords: general
+# % keywords: GUI
+# % keywords: temporal
+# % keywords: plot
+# %end
+
+# %flag
+# % key: h
+# % description: Set the header of CSV file, to be used with csv option
+# %end
+
+# %flag
+# % key: l
+# % description: Show simple linear regression model line
+# %end
+
+# %option G_OPT_STVDS_INPUTS
+# % key: stvds
+# % required: no
+# %end
+
+# %option G_OPT_STRDS_INPUTS
+# % key: strds
+# % required: no
+# %end
+
+# %option G_OPT_M_COORDS
+# % required: no
+# %end
 
 
 # TODO use option G_OPT_V_CATS
 # TODO use option G_OPT_V_CATS
-#%option
-#% key: cats
-#% label: Categories of vectores features
-#% description: To use only with stvds
-#% required: no
-#%end
-
-#%option
-#% key: attr
-#% label: Name of attribute
-#% description: Name of attribute which represent data for plotting
-#% required: no
-#%end
-
-#%option G_OPT_F_OUTPUT
-#% required: no
-#% label: Name for output graphical file
-#% description: Full path for output file containing the plot, ddd extension to specify format (.png, .pdf, .svg)
-#%end
-
-#%option G_OPT_F_OUTPUT
-#% key: csv
-#% required: no
-#% label: Name for output CSV file
-#% description: Full path for the CSV file containing the plotted data
-#%end
-
-#%option
-#% key: title
-#% label: Title for plot
-#% description: The title for the output plot
-#% required: no
-#%end
-
-#%option
-#% key: xlabel
-#% label: Label for x axis
-#% description: The x axis label for the output plot
-#% required: no
-#%end
-
-#%option
-#% key: ylabel
-#% label: Label for y axis
-#% description: The y axis label for the output plot
-#% required: no
-#%end
-
-#%option
-#% key: size
-#% type: string
-#% label: The size for output image
-#% description: It works only with output parameter
-#% required: no
-#%end
+# %option
+# % key: cats
+# % label: Categories of vectores features
+# % description: To use only with stvds
+# % required: no
+# %end
+
+# %option
+# % key: attr
+# % label: Name of attribute
+# % description: Name of attribute which represent data for plotting
+# % required: no
+# %end
+
+# %option G_OPT_F_OUTPUT
+# % required: no
+# % label: Name for output graphical file
+# % description: Full path for output file containing the plot, ddd extension to specify format (.png, .pdf, .svg)
+# %end
+
+# %option G_OPT_F_OUTPUT
+# % key: csv
+# % required: no
+# % label: Name for output CSV file
+# % description: Full path for the CSV file containing the plotted data
+# %end
+
+# %option
+# % key: title
+# % label: Title for plot
+# % description: The title for the output plot
+# % required: no
+# %end
+
+# %option
+# % key: xlabel
+# % label: Label for x axis
+# % description: The x axis label for the output plot
+# % required: no
+# %end
+
+# %option
+# % key: ylabel
+# % label: Label for y axis
+# % description: The y axis label for the output plot
+# % required: no
+# %end
+
+# %option
+# % key: size
+# % type: string
+# % label: The size for output image
+# % description: It works only with output parameter
+# % required: no
+# %end
 
 
 import grass.script as gscript
 import grass.script as gscript
 
 

+ 15 - 15
gui/wxpython/vdigit/g.gui.vdigit.py

@@ -18,21 +18,21 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Interactive editing and digitization of vector maps.
-#% keyword: general
-#% keyword: GUI
-#% keyword: vector
-#% keyword: editing
-#% keyword: digitizer
-#%end
-#%flag
-#% key: c
-#% description: Create new vector map if doesn't exist
-#%end
-#%option G_OPT_V_MAP
-#% label: Name of vector map to edit
-#%end
+# %module
+# % description: Interactive editing and digitization of vector maps.
+# % keyword: general
+# % keyword: GUI
+# % keyword: vector
+# % keyword: editing
+# % keyword: digitizer
+# %end
+# %flag
+# % key: c
+# % description: Create new vector map if doesn't exist
+# %end
+# %option G_OPT_V_MAP
+# % label: Name of vector map to edit
+# %end
 
 
 import os
 import os
 import grass.script as grass
 import grass.script as grass

+ 27 - 27
lib/gis/parser_script.c

@@ -56,35 +56,35 @@ void G__script(void)
     fprintf(fp,
     fprintf(fp,
 	    "############################################################################\n\n");
 	    "############################################################################\n\n");
 
 
-    fprintf(fp, "#%%module\n");
+    fprintf(fp, "# %%module\n");
     if (st->module_info.label)
     if (st->module_info.label)
-	fprintf(fp, "#%% label: %s\n", st->module_info.label);
+	fprintf(fp, "# %% label: %s\n", st->module_info.label);
     if (st->module_info.description)
     if (st->module_info.description)
-	fprintf(fp, "#%% description: %s\n", st->module_info.description);
+	fprintf(fp, "# %% description: %s\n", st->module_info.description);
     if (st->module_info.keywords) {
     if (st->module_info.keywords) {
 	int i;
 	int i;
 
 
 	for(i = 0; i < st->n_keys; i++) {
 	for(i = 0; i < st->n_keys; i++) {
-	    fprintf(fp, "#%% keyword: %s\n", st->module_info.keywords[i]);
+	    fprintf(fp, "# %% keyword: %s\n", st->module_info.keywords[i]);
 	}
 	}
     }
     }
-    fprintf(fp, "#%%end\n");
+    fprintf(fp, "# %%end\n");
 
 
     if (st->n_flags) {
     if (st->n_flags) {
 	struct Flag *flag;
 	struct Flag *flag;
 
 
 	for (flag = &st->first_flag; flag; flag = flag->next_flag) {
 	for (flag = &st->first_flag; flag; flag = flag->next_flag) {
-	    fprintf(fp, "#%%flag\n");
-	    fprintf(fp, "#%% key: %c\n", flag->key);
+	    fprintf(fp, "# %%flag\n");
+	    fprintf(fp, "# %% key: %c\n", flag->key);
 	    if (flag->suppress_required)
 	    if (flag->suppress_required)
-		fprintf(fp, "#%% suppress_required: yes\n");
+		fprintf(fp, "# %% suppress_required: yes\n");
 	    if (flag->label)
 	    if (flag->label)
-		fprintf(fp, "#%% label: %s\n", flag->label);
+		fprintf(fp, "# %% label: %s\n", flag->label);
 	    if (flag->description)
 	    if (flag->description)
-		fprintf(fp, "#%% description: %s\n", flag->description);
+		fprintf(fp, "# %% description: %s\n", flag->description);
 	    if (flag->guisection)
 	    if (flag->guisection)
-		fprintf(fp, "#%% guisection: %s\n", flag->guisection);
-	    fprintf(fp, "#%%end\n");
+		fprintf(fp, "# %% guisection: %s\n", flag->guisection);
+	    fprintf(fp, "# %%end\n");
 	}
 	}
     }
     }
 
 
@@ -107,30 +107,30 @@ void G__script(void)
 		break;
 		break;
 	    }
 	    }
 
 
-	    fprintf(fp, "#%%option\n");
-	    fprintf(fp, "#%% key: %s\n", opt->key);
-	    fprintf(fp, "#%% type: %s\n", type);
-	    fprintf(fp, "#%% required: %s\n", opt->required ? "yes" : "no");
-	    fprintf(fp, "#%% multiple: %s\n", opt->multiple ? "yes" : "no");
+	    fprintf(fp, "# %%option\n");
+	    fprintf(fp, "# %% key: %s\n", opt->key);
+	    fprintf(fp, "# %% type: %s\n", type);
+	    fprintf(fp, "# %% required: %s\n", opt->required ? "yes" : "no");
+	    fprintf(fp, "# %% multiple: %s\n", opt->multiple ? "yes" : "no");
 	    if (opt->options)
 	    if (opt->options)
-		fprintf(fp, "#%% options: %s\n", opt->options);
+		fprintf(fp, "# %% options: %s\n", opt->options);
 	    if (opt->key_desc)
 	    if (opt->key_desc)
-		fprintf(fp, "#%% key_desc: %s\n", opt->key_desc);
+		fprintf(fp, "# %% key_desc: %s\n", opt->key_desc);
 	    if (opt->label)
 	    if (opt->label)
-		fprintf(fp, "#%% label: %s\n", opt->label);
+		fprintf(fp, "# %% label: %s\n", opt->label);
 	    if (opt->description)
 	    if (opt->description)
-		fprintf(fp, "#%% description: %s\n", opt->description);
+		fprintf(fp, "# %% description: %s\n", opt->description);
 	    if (opt->descriptions)
 	    if (opt->descriptions)
-		fprintf(fp, "#%% descriptions: %s\n", opt->descriptions);
+		fprintf(fp, "# %% descriptions: %s\n", opt->descriptions);
 	    if (opt->answer)
 	    if (opt->answer)
-		fprintf(fp, "#%% answer: %s\n", opt->answer);
+		fprintf(fp, "# %% answer: %s\n", opt->answer);
 	    if (opt->gisprompt)
 	    if (opt->gisprompt)
-		fprintf(fp, "#%% gisprompt: %s\n", opt->gisprompt);
+		fprintf(fp, "# %% gisprompt: %s\n", opt->gisprompt);
 	    if (opt->guisection)
 	    if (opt->guisection)
-		fprintf(fp, "#%% guisection: %s\n", opt->guisection);
+		fprintf(fp, "# %% guisection: %s\n", opt->guisection);
 	    if (opt->guidependency)
 	    if (opt->guidependency)
-		fprintf(fp, "#%% guidependency: %s\n", opt->guidependency);
-	    fprintf(fp, "#%%end\n");
+		fprintf(fp, "# %% guidependency: %s\n", opt->guidependency);
+	    fprintf(fp, "# %%end\n");
 	}
 	}
     }
     }
 
 

+ 16 - 16
lib/python/docs/src/script_intro.rst

@@ -95,22 +95,22 @@ Providing GRASS module interface to a script
 
 
     #!/usr/bin/env python3
     #!/usr/bin/env python3
 
 
-    #%module
-    #% description: Adds the values of two rasters (A + B)
-    #% keyword: raster
-    #% keyword: algebra
-    #% keyword: sum
-    #%end
-    #%option G_OPT_R_INPUT
-    #% key: araster
-    #% description: Name of input raster A in an expression A + B
-    #%end
-    #%option G_OPT_R_INPUT
-    #% key: braster
-    #% description: Name of input raster B in an expression A + B
-    #%end
-    #%option G_OPT_R_OUTPUT
-    #%end
+    # %module
+    # % description: Adds the values of two rasters (A + B)
+    # % keyword: raster
+    # % keyword: algebra
+    # % keyword: sum
+    # %end
+    # %option G_OPT_R_INPUT
+    # % key: araster
+    # % description: Name of input raster A in an expression A + B
+    # %end
+    # %option G_OPT_R_INPUT
+    # % key: braster
+    # % description: Name of input raster B in an expression A + B
+    # %end
+    # %option G_OPT_R_OUTPUT
+    # %end
 
 
 
 
     import sys
     import sys

+ 10 - 10
scripts/d.correlate/d.correlate.py

@@ -15,16 +15,16 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Prints a graph of the correlation between raster maps (in pairs).
-#% keyword: display
-#% keyword: statistics
-#% keyword: raster
-#% keyword: diagram
-#% keyword: correlation
-#%end
-#%option G_OPT_R_MAPS
-#%end
+# %module
+# % description: Prints a graph of the correlation between raster maps (in pairs).
+# % keyword: display
+# % keyword: statistics
+# % keyword: raster
+# % keyword: diagram
+# % keyword: correlation
+# %end
+# %option G_OPT_R_MAPS
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 45 - 45
scripts/d.frame/d.frame.py

@@ -19,51 +19,51 @@
 #  GNU General Public License for more details.
 #  GNU General Public License for more details.
 #
 #
 ############################################################################
 ############################################################################
-#%module
-#% description: Manages display frames on the user's graphics monitor.
-#% keyword: display
-#% keyword: graphics
-#% keyword: monitors
-#% keyword: frame
-#% overwrite: yes
-#%end
-#%flag
-#% key: c
-#% description: Create a new frame if doesn't exist and select
-#%end
-#%flag
-#% key: e
-#% description: Remove all frames, erase the screen and exit
-#% suppress_required: yes
-#%end
-#%flag
-#% key: p
-#% description: Print name of current frame and exit
-#% suppress_required: yes
-#%end
-#%flag
-#% key: a
-#% description: Print names of all frames including 'at' position and exit
-#% suppress_required: yes
-#%end
-#%option
-#% key: frame
-#% type: string
-#% required: yes
-#% multiple: no
-#% key_desc: name
-#% description: Frame to be selected or created (if -c flag is given)
-#%end
-#%option
-#% key: at
-#% type: double
-#% required: no
-#% multiple: no
-#% key_desc: bottom,top,left,right
-#% label: Screen coordinates in percent where to place the frame (0,0 is lower-left)
-#% options: 0-100
-#% description: Implies only when -c or --overwrite flag is given
-#%end
+# %module
+# % description: Manages display frames on the user's graphics monitor.
+# % keyword: display
+# % keyword: graphics
+# % keyword: monitors
+# % keyword: frame
+# % overwrite: yes
+# %end
+# %flag
+# % key: c
+# % description: Create a new frame if doesn't exist and select
+# %end
+# %flag
+# % key: e
+# % description: Remove all frames, erase the screen and exit
+# % suppress_required: yes
+# %end
+# %flag
+# % key: p
+# % description: Print name of current frame and exit
+# % suppress_required: yes
+# %end
+# %flag
+# % key: a
+# % description: Print names of all frames including 'at' position and exit
+# % suppress_required: yes
+# %end
+# %option
+# % key: frame
+# % type: string
+# % required: yes
+# % multiple: no
+# % key_desc: name
+# % description: Frame to be selected or created (if -c flag is given)
+# %end
+# %option
+# % key: at
+# % type: double
+# % required: no
+# % multiple: no
+# % key_desc: bottom,top,left,right
+# % label: Screen coordinates in percent where to place the frame (0,0 is lower-left)
+# % options: 0-100
+# % description: Implies only when -c or --overwrite flag is given
+# %end
 
 
 import os
 import os
 import sys
 import sys

+ 25 - 25
scripts/d.out.file/d.out.file.py

@@ -13,31 +13,31 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Saves the contents of the active display monitor to a graphics file.
-#% keyword: display
-#% keyword: export
-#% keyword: output
-#%end
-#%option G_OPT_F_OUTPUT
-#% description: Name for output file
-#% required: yes
-#%end
-#%option
-#% key: format
-#% description: Graphics file format
-#% required: yes
-#% options: png,jpg,bmp,gif,tif
-#% answer: png
-#%end
-#%option
-#% key: size
-#% type: integer
-#% key_desc: width,height
-#% description: Width and height of output image
-#% guisection: Images
-#% required : no
-#%end
+# %module
+# % description: Saves the contents of the active display monitor to a graphics file.
+# % keyword: display
+# % keyword: export
+# % keyword: output
+# %end
+# %option G_OPT_F_OUTPUT
+# % description: Name for output file
+# % required: yes
+# %end
+# %option
+# % key: format
+# % description: Graphics file format
+# % required: yes
+# % options: png,jpg,bmp,gif,tif
+# % answer: png
+# %end
+# %option
+# % key: size
+# % type: integer
+# % key_desc: width,height
+# % description: Width and height of output image
+# % guisection: Images
+# % required : no
+# %end
 
 
 from grass.script import core as gcore
 from grass.script import core as gcore
 
 

+ 22 - 22
scripts/d.polar/d.polar.py

@@ -19,28 +19,28 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%Module
-#% description: Draws polar diagram of angle map such as aspect or flow directions
-#% keyword: display
-#% keyword: diagram
-#%End
-#%option G_OPT_R_MAP
-#% description: Name of raster angle map
-#%End
-#%option
-#% key: undef
-#% type: double
-#% description: Pixel value to be interpreted as undefined (different from NULL)
-#% required : no
-#%End
-#%option G_OPT_F_OUTPUT
-#% description: Name for optional EPS output file
-#% required : no
-#%end
-#%flag
-#% key: x
-#% description: Plot using Xgraph
-#%end
+# %Module
+# % description: Draws polar diagram of angle map such as aspect or flow directions
+# % keyword: display
+# % keyword: diagram
+# %End
+# %option G_OPT_R_MAP
+# % description: Name of raster angle map
+# %End
+# %option
+# % key: undef
+# % type: double
+# % description: Pixel value to be interpreted as undefined (different from NULL)
+# % required : no
+# %End
+# %option G_OPT_F_OUTPUT
+# % description: Name for optional EPS output file
+# % required : no
+# %end
+# %flag
+# % key: x
+# % description: Plot using Xgraph
+# %end
 
 
 import os
 import os
 import string
 import string

+ 55 - 55
scripts/d.rast.edit/d.rast.edit.py

@@ -18,61 +18,61 @@
 #
 #
 # /
 # /
 
 
-#%module
-#% description: Edits cell values in a raster map.
-#% keyword: display
-#% keyword: editing
-#% keyword: raster
-#%end
-#%option G_OPT_R_INPUT
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
-#%option G_OPT_R_INPUT
-#% key: aspect
-#% required: no
-#% description: Name of input aspect raster map
-#%end
-#%option
-#% key: width
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Width of display canvas
-#% answer: 640
-#%end
-#%option
-#% key: height
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Height of display canvas
-#% answer: 480
-#%end
-#%option
-#% key: size
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Minimum size of each cell
-#% answer: 12
-#%end
-#%option
-#% key: rows
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Maximum number of rows to load
-#% answer: 100
-#%end
-#%option
-#% key: cols
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Maximum number of columns to load
-#% answer: 100
-#%end
+# %module
+# % description: Edits cell values in a raster map.
+# % keyword: display
+# % keyword: editing
+# % keyword: raster
+# %end
+# %option G_OPT_R_INPUT
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
+# %option G_OPT_R_INPUT
+# % key: aspect
+# % required: no
+# % description: Name of input aspect raster map
+# %end
+# %option
+# % key: width
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Width of display canvas
+# % answer: 640
+# %end
+# %option
+# % key: height
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Height of display canvas
+# % answer: 480
+# %end
+# %option
+# % key: size
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Minimum size of each cell
+# % answer: 12
+# %end
+# %option
+# % key: rows
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Maximum number of rows to load
+# % answer: 100
+# %end
+# %option
+# % key: cols
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Maximum number of columns to load
+# % answer: 100
+# %end
 
 
 import sys
 import sys
 import math
 import math

+ 32 - 32
scripts/d.rast.leg/d.rast.leg.py

@@ -28,38 +28,38 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Displays a raster map and its legend on a graphics window
-#% keyword: display
-#% keyword: cartography
-#% keyword: legend
-#%end
-#%flag
-#%  key: f
-#%  description: Flip legend
-#%end
-#%flag
-#%  key: n
-#%  description: Omit entries with missing label
-#%end
-#%option G_OPT_R_MAP
-#% description: Name of raster map to display
-#%end
-#%flag
-#%  key: s
-#%  description: Draw smooth gradient
-#%end
-#%option
-#% key: lines
-#% type: integer
-#% description: Number of lines to appear in the legend
-#% required: no
-#%end
-#%option G_OPT_R_INPUT
-#% key: raster
-#% description: Name of input raster map to generate legend from
-#% required: no
-#%end
+# %module
+# % description: Displays a raster map and its legend on a graphics window
+# % keyword: display
+# % keyword: cartography
+# % keyword: legend
+# %end
+# %flag
+# %  key: f
+# %  description: Flip legend
+# %end
+# %flag
+# %  key: n
+# %  description: Omit entries with missing label
+# %end
+# %option G_OPT_R_MAP
+# % description: Name of raster map to display
+# %end
+# %flag
+# %  key: s
+# %  description: Draw smooth gradient
+# %end
+# %option
+# % key: lines
+# % type: integer
+# % description: Number of lines to appear in the legend
+# % required: no
+# %end
+# %option G_OPT_R_INPUT
+# % key: raster
+# % description: Name of input raster map to generate legend from
+# % required: no
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 6 - 6
scripts/d.redraw/d.redraw.py

@@ -13,12 +13,12 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Redraws the content of currently selected monitor.
-#% keyword: display
-#% keyword: graphics
-#% keyword: monitors
-#%end
+# %module
+# % description: Redraws the content of currently selected monitor.
+# % keyword: display
+# % keyword: graphics
+# % keyword: monitors
+# %end
 
 
 import os
 import os
 import sys
 import sys

+ 24 - 24
scripts/d.shade/d.shade.py

@@ -14,30 +14,30 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Drapes a color raster over an shaded relief or aspect map.
-#% keyword: display
-#% keyword: elevation
-#% keyword: relief
-#% keyword: hillshade
-#% keyword: visualization
-#%end
-#%option G_OPT_R_INPUT
-#% key: shade
-#% description: Name of shaded relief or aspect raster map
-#%end
-#%option G_OPT_R_INPUT
-#% key: color
-#% label: Name of raster to drape over relief raster map
-#% description: Typically, this raster is elevation or other colorful raster
-#%end
-#%option
-#% key: brighten
-#% type: integer
-#% description: Percent to brighten
-#% options: -99-99
-#% answer: 0
-#%end
+# %module
+# % description: Drapes a color raster over an shaded relief or aspect map.
+# % keyword: display
+# % keyword: elevation
+# % keyword: relief
+# % keyword: hillshade
+# % keyword: visualization
+# %end
+# %option G_OPT_R_INPUT
+# % key: shade
+# % description: Name of shaded relief or aspect raster map
+# %end
+# %option G_OPT_R_INPUT
+# % key: color
+# % label: Name of raster to drape over relief raster map
+# % description: Typically, this raster is elevation or other colorful raster
+# %end
+# %option
+# % key: brighten
+# % type: integer
+# % description: Percent to brighten
+# % options: -99-99
+# % answer: 0
+# %end
 
 
 
 
 from grass.script import core as gcore
 from grass.script import core as gcore

+ 8 - 8
scripts/d.to.rast/d.to.rast.py

@@ -13,14 +13,14 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Saves the contents of the active display monitor to a raster map.
-#% keyword: display
-#% keyword: export
-#% keyword: raster
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
+# %module
+# % description: Saves the contents of the active display monitor to a raster map.
+# % keyword: display
+# % keyword: export
+# % keyword: raster
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
 
 
 
 
 from grass.script import core as gcore
 from grass.script import core as gcore

+ 8 - 8
scripts/d.what.rast/d.what.rast.py

@@ -13,14 +13,14 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Allows the user to interactively query raster map layers at user-selected locations.
-#% keyword: display
-#% keyword: vector
-#%end
-#%option G_OPT_R_INPUTS
-#% key: map
-#%end
+# %module
+# % description: Allows the user to interactively query raster map layers at user-selected locations.
+# % keyword: display
+# % keyword: vector
+# %end
+# %option G_OPT_R_INPUTS
+# % key: map
+# %end
 
 
 
 
 from grass.script import core as gcore
 from grass.script import core as gcore

+ 8 - 8
scripts/d.what.vect/d.what.vect.py

@@ -13,14 +13,14 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Allows the user to interactively query vector map layers at user-selected locations.
-#% keyword: display
-#% keyword: vector
-#%end
-#%option G_OPT_V_INPUTS
-#% key: map
-#%end
+# %module
+# % description: Allows the user to interactively query vector map layers at user-selected locations.
+# % keyword: display
+# % keyword: vector
+# %end
+# %option G_OPT_V_INPUTS
+# % key: map
+# %end
 
 
 
 
 from grass.script import core as gcore
 from grass.script import core as gcore

+ 18 - 18
scripts/db.dropcolumn/db.dropcolumn.py

@@ -16,24 +16,24 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Drops a column from selected attribute table.
-#% keyword: database
-#% keyword: attribute table
-#%End
-
-#%flag
-#% key: f
-#% description: Force removal (required for actual deletion of files)
-#%end
-
-#%option G_OPT_DB_TABLE
-#% required : yes
-#%end
-
-#%option G_OPT_DB_COLUMN
-#% required : yes
-#%end
+# %module
+# % description: Drops a column from selected attribute table.
+# % keyword: database
+# % keyword: attribute table
+# %End
+
+# %flag
+# % key: f
+# % description: Force removal (required for actual deletion of files)
+# %end
+
+# %option G_OPT_DB_TABLE
+# % required : yes
+# %end
+
+# %option G_OPT_DB_COLUMN
+# % required : yes
+# %end
 
 
 import sys
 import sys
 import string
 import string

+ 27 - 27
scripts/db.droptable/db.droptable.py

@@ -14,33 +14,33 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Drops an attribute table.
-#% keyword: database
-#% keyword: attribute table
-#%end
-
-#%flag
-#% key: f
-#% description: Force removal (required for actual deletion of files)
-#%end
-
-#%option G_OPT_DB_DRIVER
-#% label: Name of database driver
-#% description: If not given then default driver is used
-#% guisection: Connection
-#%end
-
-#%option G_OPT_DB_DATABASE
-#% label: Name of database
-#% description:  If not given then default database is used
-#% guisection: Connection
-#%end
-
-#%option G_OPT_DB_TABLE
-#% description: Name of table to drop
-#% required: yes
-#%end
+# %module
+# % description: Drops an attribute table.
+# % keyword: database
+# % keyword: attribute table
+# %end
+
+# %flag
+# % key: f
+# % description: Force removal (required for actual deletion of files)
+# %end
+
+# %option G_OPT_DB_DRIVER
+# % label: Name of database driver
+# % description: If not given then default driver is used
+# % guisection: Connection
+# %end
+
+# %option G_OPT_DB_DATABASE
+# % label: Name of database
+# % description:  If not given then default database is used
+# % guisection: Connection
+# %end
+
+# %option G_OPT_DB_TABLE
+# % description: Name of table to drop
+# % required: yes
+# %end
 
 
 import sys
 import sys
 import grass.script as grass
 import grass.script as grass

+ 43 - 43
scripts/db.in.ogr/db.in.ogr.py

@@ -14,49 +14,49 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%Module
-#% description: Imports attribute tables in various formats.
-#% keyword: database
-#% keyword: import
-#% keyword: attribute table
-#% overwrite: yes
-#%End
-
-#%option G_OPT_F_BIN_INPUT
-#% description: Table file to be imported or DB connection string
-#%end
-
-#%option
-#% key: db_table
-#% type: string
-#% key_desc : name
-#% description: Name of table from given DB to be imported
-#% required : no
-#%end
-
-#%option G_OPT_DB_TABLE
-#% key: output
-#% description: Name for output table
-#% required : no
-#% guisection: Output
-#% gisprompt: new,dbtable,dbtable
-#%end
-
-#%option
-#% key: key
-#% type: string
-#% description: Name for auto-generated unique key column
-#% required : no
-#% guisection: Output
-#%end
-
-#%option
-#% key: encoding
-#% type: string
-#% label: Encoding value for attribute data
-#% descriptions: Overrides encoding interpretation, useful when importing DBF tables
-#% guisection: Output
-#%end
+# %Module
+# % description: Imports attribute tables in various formats.
+# % keyword: database
+# % keyword: import
+# % keyword: attribute table
+# % overwrite: yes
+# %End
+
+# %option G_OPT_F_BIN_INPUT
+# % description: Table file to be imported or DB connection string
+# %end
+
+# %option
+# % key: db_table
+# % type: string
+# % key_desc : name
+# % description: Name of table from given DB to be imported
+# % required : no
+# %end
+
+# %option G_OPT_DB_TABLE
+# % key: output
+# % description: Name for output table
+# % required : no
+# % guisection: Output
+# % gisprompt: new,dbtable,dbtable
+# %end
+
+# %option
+# % key: key
+# % type: string
+# % description: Name for auto-generated unique key column
+# % required : no
+# % guisection: Output
+# %end
+
+# %option
+# % key: encoding
+# % type: string
+# % label: Encoding value for attribute data
+# % descriptions: Overrides encoding interpretation, useful when importing DBF tables
+# % guisection: Output
+# %end
 
 
 import os
 import os
 import grass.script as grass
 import grass.script as grass

+ 40 - 40
scripts/db.out.ogr/db.out.ogr.py

@@ -14,46 +14,46 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Exports attribute tables into various formats.
-#% keyword: database
-#% keyword: export
-#% keyword: output
-#% keyword: attribute table
-#%end
-
-#%option G_OPT_V_INPUT
-#% key: input
-#% label: GRASS table name
-#% required: yes
-#%end
-
-#%option G_OPT_F_OUTPUT
-#% key: output
-#% description: Output table file name or DB connection string
-#% required : yes
-#%end
-
-#%option G_OPT_V_FIELD
-#% required: no
-#%end
-
-#%option
-#% key: format
-#% type: string
-#% description: Table format
-#% required: yes
-#% options: CSV,DBF,GML,MySQL,PostgreSQL,SQLite
-#% answer: CSV
-#%end
-
-#%option
-#% key: table
-#% type: string
-#% key_desc: name
-#% description: Name for output table (default: input name)
-#% required: no
-#%end
+# %module
+# % description: Exports attribute tables into various formats.
+# % keyword: database
+# % keyword: export
+# % keyword: output
+# % keyword: attribute table
+# %end
+
+# %option G_OPT_V_INPUT
+# % key: input
+# % label: GRASS table name
+# % required: yes
+# %end
+
+# %option G_OPT_F_OUTPUT
+# % key: output
+# % description: Output table file name or DB connection string
+# % required : yes
+# %end
+
+# %option G_OPT_V_FIELD
+# % required: no
+# %end
+
+# %option
+# % key: format
+# % type: string
+# % description: Table format
+# % required: yes
+# % options: CSV,DBF,GML,MySQL,PostgreSQL,SQLite
+# % answer: CSV
+# %end
+
+# %option
+# % key: table
+# % type: string
+# % key_desc: name
+# % description: Name for output table (default: input name)
+# % required: no
+# %end
 
 
 import os
 import os
 
 

+ 12 - 12
scripts/db.test/db.test.py

@@ -13,18 +13,18 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Test database driver, database must exist and set by db.connect.
-#% keyword: database
-#% keyword: attribute table
-#%end
-#%option
-#% key: test
-#% type: string
-#% description: Test name
-#% required: yes
-#% options: test1
-#%end
+# %module
+# % description: Test database driver, database must exist and set by db.connect.
+# % keyword: database
+# % keyword: attribute table
+# %end
+# %option
+# % key: test
+# % type: string
+# % description: Test name
+# % required: yes
+# % options: test1
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 38 - 38
scripts/db.univar/db.univar.py

@@ -16,44 +16,44 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Calculates univariate statistics on selected table column.
-#% keyword: database
-#% keyword: statistics
-#% keyword: attribute table
-#%end
-#%option G_OPT_DB_TABLE
-#% key: table
-#% required: yes
-#%end
-#%option G_OPT_DB_COLUMN
-#% description: Name of attribute column on which to calculate statistics (must be numeric)
-#% required: yes
-#%end
-#%option G_OPT_DB_DATABASE
-#%end
-#%option G_OPT_DB_DRIVER
-#% options: dbf,odbc,ogr,sqlite,pg
-#%end
-#%option G_OPT_DB_WHERE
-#%end
-#%option
-#% key: percentile
-#% type: double
-#% description: Percentile to calculate (requires extended statistics flag)
-#% required : no
-#% answer: 90
-#% options: 0-100
-#% multiple: yes
-#%end
-#%flag
-#% key: e
-#% description: Extended statistics (quartiles and 90th percentile)
-#%end
-#%flag
-#% key: g
-#% description: Print stats in shell script style
-#%end
+# %module
+# % description: Calculates univariate statistics on selected table column.
+# % keyword: database
+# % keyword: statistics
+# % keyword: attribute table
+# %end
+# %option G_OPT_DB_TABLE
+# % key: table
+# % required: yes
+# %end
+# %option G_OPT_DB_COLUMN
+# % description: Name of attribute column on which to calculate statistics (must be numeric)
+# % required: yes
+# %end
+# %option G_OPT_DB_DATABASE
+# %end
+# %option G_OPT_DB_DRIVER
+# % options: dbf,odbc,ogr,sqlite,pg
+# %end
+# %option G_OPT_DB_WHERE
+# %end
+# %option
+# % key: percentile
+# % type: double
+# % description: Percentile to calculate (requires extended statistics flag)
+# % required : no
+# % answer: 90
+# % options: 0-100
+# % multiple: yes
+# %end
+# %flag
+# % key: e
+# % description: Extended statistics (quartiles and 90th percentile)
+# %end
+# %flag
+# % key: g
+# % description: Print stats in shell script style
+# %end
 
 
 import sys
 import sys
 import atexit
 import atexit

+ 27 - 27
scripts/g.bands/g.bands.py

@@ -15,33 +15,33 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Prints available band reference information used for multispectral data.
-#% keyword: general
-#% keyword: imagery
-#% keyword: band reference
-#% keyword: image collections
-#%end
-#%option
-#% key: pattern
-#% type: string
-#% description: Band reference search pattern (examples: L, S2, .*_2, S2_1)
-#% required: no
-#% multiple: no
-#%end
-#%option
-#% key: operation
-#% type: string
-#% required: no
-#% multiple: no
-#% options: print
-#% description: Operation to be performed
-#% answer: print
-#%end
-#%flag
-#% key: e
-#% description: Print extended metadata information
-#%end
+# %module
+# % description: Prints available band reference information used for multispectral data.
+# % keyword: general
+# % keyword: imagery
+# % keyword: band reference
+# % keyword: image collections
+# %end
+# %option
+# % key: pattern
+# % type: string
+# % description: Band reference search pattern (examples: L, S2, .*_2, S2_1)
+# % required: no
+# % multiple: no
+# %end
+# %option
+# % key: operation
+# % type: string
+# % required: no
+# % multiple: no
+# % options: print
+# % description: Operation to be performed
+# % answer: print
+# %end
+# %flag
+# % key: e
+# % description: Print extended metadata information
+# %end
 
 
 import sys
 import sys
 
 

+ 19 - 19
scripts/g.extension.all/g.extension.all.py

@@ -16,25 +16,25 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% label: Rebuilds or removes all locally installed GRASS Addons extensions.
-#% description: By default only extensions built against different GIS Library are rebuilt.
-#% keyword: general
-#% keyword: installation
-#% keyword: extensions
-#%end
-#%option
-#% key: operation
-#% type: string
-#% description: Operation to be performed
-#% required: no
-#% options: rebuild,remove
-#% answer: rebuild
-#%end
-#%flag
-#% key: f
-#% label: Force operation (required for removal)
-#% end
+# %module
+# % label: Rebuilds or removes all locally installed GRASS Addons extensions.
+# % description: By default only extensions built against different GIS Library are rebuilt.
+# % keyword: general
+# % keyword: installation
+# % keyword: extensions
+# %end
+# %option
+# % key: operation
+# % type: string
+# % description: Operation to be performed
+# % required: no
+# % options: rebuild,remove
+# % answer: rebuild
+# %end
+# %flag
+# % key: f
+# % label: Force operation (required for removal)
+# % end
 from __future__ import print_function
 from __future__ import print_function
 import os
 import os
 import sys
 import sys

+ 127 - 127
scripts/g.extension/g.extension.py

@@ -19,133 +19,133 @@
 #               - fix toolbox support in install_private_extension_xml()
 #               - fix toolbox support in install_private_extension_xml()
 #############################################################################
 #############################################################################
 
 
-#%module
-#% label: Maintains GRASS Addons extensions in local GRASS installation.
-#% description: Downloads and installs extensions from GRASS Addons repository or other source into the local GRASS installation or removes installed extensions.
-#% keyword: general
-#% keyword: installation
-#% keyword: extensions
-#% keyword: addons
-#% keyword: download
-#%end
-
-#%option
-#% key: extension
-#% type: string
-#% key_desc: name
-#% label: Name of extension to install or remove
-#% description: Name of toolbox (set of extensions) when -t flag is given
-#% required: yes
-#%end
-#%option
-#% key: operation
-#% type: string
-#% description: Operation to be performed
-#% required: yes
-#% options: add,remove
-#% answer: add
-#%end
-#%option
-#% key: url
-#% type: string
-#% key_desc: url
-#% label: URL or directory to get the extension from (supported only on Linux and Mac)
-#% description: The official repository is used by default. User can specify a ZIP file, directory or a repository on common hosting services. If not identified, Subversion repository is assumed. See manual for all options.
-#%end
-#%option
-#% key: prefix
-#% type: string
-#% key_desc: path
-#% description: Prefix where to install extension (ignored when flag -s is given)
-#% answer: $GRASS_ADDON_BASE
-#% required: no
-#%end
-#%option
-#% key: proxy
-#% type: string
-#% key_desc: proxy
-#% description: Set the proxy with: "http=<value>,ftp=<value>"
-#% required: no
-#% multiple: yes
-#%end
-#%option
-#% key: branch
-#% type: string
-#% key_desc: branch
-#% description: Specific branch to fetch addon from (only used when fetching from git)
-#% required: no
-#% multiple: no
-#% answer: main
-#%end
-
-#%flag
-#% key: l
-#% description: List available extensions in the official GRASS GIS Addons repository
-#% guisection: Print
-#% suppress_required: yes
-#%end
-#%flag
-#% key: c
-#% description: List available extensions in the official GRASS GIS Addons repository including module description
-#% guisection: Print
-#% suppress_required: yes
-#%end
-#%flag
-#% key: g
-#% description: List available extensions in the official GRASS GIS Addons repository (shell script style)
-#% guisection: Print
-#% suppress_required: yes
-#%end
-#%flag
-#% key: a
-#% description: List locally installed extensions
-#% guisection: Print
-#% suppress_required: yes
-#%end
-#%flag
-#% key: s
-#% description: Install system-wide (may need system administrator rights)
-#% guisection: Install
-#%end
-#%flag
-#% key: d
-#% description: Download source code and exit
-#% guisection: Install
-#%end
-#%flag
-#% key: i
-#% description: Do not install new extension, just compile it
-#% guisection: Install
-#%end
-#%flag
-#% key: f
-#% description: Force removal when uninstalling extension (operation=remove)
-#% guisection: Remove
-#%end
-#%flag
-#% key: t
-#% description: Operate on toolboxes instead of single modules (experimental)
-#% suppress_required: yes
-#%end
-#%flag
-#% key: o
-#% description: url refers to a fork of the official extension repository
-#%end
-#%flag
-#% key: j
-#% description: Generates JSON file containing the download URLs of the official Addons
-#% guisection: Install
-#% suppress_required: yes
-#%end
-
-
-#%rules
-#% required: extension, -l, -c, -g, -a, -j
-#% exclusive: extension, -l, -c, -g
-#% exclusive: extension, -l, -c, -a
-#% requires: -o, url
-#% requires: branch, url
-#%end
+# %module
+# % label: Maintains GRASS Addons extensions in local GRASS installation.
+# % description: Downloads and installs extensions from GRASS Addons repository or other source into the local GRASS installation or removes installed extensions.
+# % keyword: general
+# % keyword: installation
+# % keyword: extensions
+# % keyword: addons
+# % keyword: download
+# %end
+
+# %option
+# % key: extension
+# % type: string
+# % key_desc: name
+# % label: Name of extension to install or remove
+# % description: Name of toolbox (set of extensions) when -t flag is given
+# % required: yes
+# %end
+# %option
+# % key: operation
+# % type: string
+# % description: Operation to be performed
+# % required: yes
+# % options: add,remove
+# % answer: add
+# %end
+# %option
+# % key: url
+# % type: string
+# % key_desc: url
+# % label: URL or directory to get the extension from (supported only on Linux and Mac)
+# % description: The official repository is used by default. User can specify a ZIP file, directory or a repository on common hosting services. If not identified, Subversion repository is assumed. See manual for all options.
+# %end
+# %option
+# % key: prefix
+# % type: string
+# % key_desc: path
+# % description: Prefix where to install extension (ignored when flag -s is given)
+# % answer: $GRASS_ADDON_BASE
+# % required: no
+# %end
+# %option
+# % key: proxy
+# % type: string
+# % key_desc: proxy
+# % description: Set the proxy with: "http=<value>,ftp=<value>"
+# % required: no
+# % multiple: yes
+# %end
+# %option
+# % key: branch
+# % type: string
+# % key_desc: branch
+# % description: Specific branch to fetch addon from (only used when fetching from git)
+# % required: no
+# % multiple: no
+# % answer: main
+# %end
+
+# %flag
+# % key: l
+# % description: List available extensions in the official GRASS GIS Addons repository
+# % guisection: Print
+# % suppress_required: yes
+# %end
+# %flag
+# % key: c
+# % description: List available extensions in the official GRASS GIS Addons repository including module description
+# % guisection: Print
+# % suppress_required: yes
+# %end
+# %flag
+# % key: g
+# % description: List available extensions in the official GRASS GIS Addons repository (shell script style)
+# % guisection: Print
+# % suppress_required: yes
+# %end
+# %flag
+# % key: a
+# % description: List locally installed extensions
+# % guisection: Print
+# % suppress_required: yes
+# %end
+# %flag
+# % key: s
+# % description: Install system-wide (may need system administrator rights)
+# % guisection: Install
+# %end
+# %flag
+# % key: d
+# % description: Download source code and exit
+# % guisection: Install
+# %end
+# %flag
+# % key: i
+# % description: Do not install new extension, just compile it
+# % guisection: Install
+# %end
+# %flag
+# % key: f
+# % description: Force removal when uninstalling extension (operation=remove)
+# % guisection: Remove
+# %end
+# %flag
+# % key: t
+# % description: Operate on toolboxes instead of single modules (experimental)
+# % suppress_required: yes
+# %end
+# %flag
+# % key: o
+# % description: url refers to a fork of the official extension repository
+# %end
+# %flag
+# % key: j
+# % description: Generates JSON file containing the download URLs of the official Addons
+# % guisection: Install
+# % suppress_required: yes
+# %end
+
+
+# %rules
+# % required: extension, -l, -c, -g, -a, -j
+# % exclusive: extension, -l, -c, -g
+# % exclusive: extension, -l, -c, -a
+# % requires: -o, url
+# % requires: branch, url
+# %end
 
 
 # TODO: solve addon-extension(-module) confusion
 # TODO: solve addon-extension(-module) confusion
 
 

+ 16 - 16
scripts/g.extension/testsuite/data/sample_modules/r.plus.example/r.plus.example.py

@@ -1,21 +1,21 @@
 #!/usr/bin/env python3
 #!/usr/bin/env python3
 
 
-#%module
-#% description: Adds the values of two rasters (A + B)
-#% keyword: raster
-#% keyword: algebra
-#% keyword: sum
-#%end
-#%option G_OPT_R_INPUT
-#% key: araster
-#% description: Name of input raster A in an expression A + B
-#%end
-#%option G_OPT_R_INPUT
-#% key: braster
-#% description: Name of input raster B in an expression A + B
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
+# %module
+# % description: Adds the values of two rasters (A + B)
+# % keyword: raster
+# % keyword: algebra
+# % keyword: sum
+# %end
+# %option G_OPT_R_INPUT
+# % key: araster
+# % description: Name of input raster A in an expression A + B
+# %end
+# %option G_OPT_R_INPUT
+# % key: braster
+# % description: Name of input raster B in an expression A + B
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
 
 
 
 
 import grass.script as gs
 import grass.script as gs

+ 31 - 31
scripts/g.manual/g.manual.py

@@ -14,37 +14,37 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Displays the manual pages of GRASS modules.
-#% keyword: general
-#% keyword: manual
-#% keyword: help
-#%end
-#%flag
-#% key: i
-#% description: Display index
-#% suppress_required: yes
-#%end
-#%flag
-#% key: t
-#% description: Display topics
-#% suppress_required: yes
-#%end
-#%flag
-#% key: m
-#% description: Display as MAN text page instead of HTML page in browser
-#%end
-#%flag
-#% key: o
-#% label: Display online manuals instead of locally installed
-#% description: Use online manuals available at https://grass.osgeo.org website. This flag has no effect when displaying MAN text pages.
-#%end
-#%option
-#% key: entry
-#% type: string
-#% description: Manual entry to be displayed
-#% required : yes
-#%end
+# %module
+# % description: Displays the manual pages of GRASS modules.
+# % keyword: general
+# % keyword: manual
+# % keyword: help
+# %end
+# %flag
+# % key: i
+# % description: Display index
+# % suppress_required: yes
+# %end
+# %flag
+# % key: t
+# % description: Display topics
+# % suppress_required: yes
+# %end
+# %flag
+# % key: m
+# % description: Display as MAN text page instead of HTML page in browser
+# %end
+# %flag
+# % key: o
+# % label: Display online manuals instead of locally installed
+# % description: Use online manuals available at https://grass.osgeo.org website. This flag has no effect when displaying MAN text pages.
+# %end
+# %option
+# % key: entry
+# % type: string
+# % description: Manual entry to be displayed
+# % required : yes
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 50 - 50
scripts/g.search.modules/g.search.modules.py

@@ -12,56 +12,56 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Search in GRASS modules using keywords
-#% keyword: general
-#% keyword: modules
-#% keyword: search
-#%end
-#%option
-#% key: keyword
-#% multiple: yes
-#% type: string
-#% label: Keyword to be searched
-#% description: List all modules if not given
-#% required : no
-#%end
-#%flag
-#% key: a
-#% description: Display only modules where all keywords are available (AND), default: OR
-#% guisection: Output
-#%end
-#%flag
-#% key: n
-#% description: Invert selection (logical NOT)
-#% guisection: Output
-#%end
-#%flag
-#% key: m
-#% description: Search in manual pages too (can be slow)
-#% guisection: Output
-#%end
-#%flag
-#% key: k
-#% label: Search only for the exact keyword in module keyword list
-#% description: Instead of full text search, search only in actual keywords
-#% guisection: Output
-#%end
-#%flag
-#% key: c
-#% description: Use colorized (more readable) output to terminal
-#% guisection: Output
-#%end
-#%flag
-#% key: g
-#% description: Shell script format
-#% guisection: Output
-#%end
-#%flag
-#% key: j
-#% description: JSON format
-#% guisection: Output
-#%end
+# %module
+# % description: Search in GRASS modules using keywords
+# % keyword: general
+# % keyword: modules
+# % keyword: search
+# %end
+# %option
+# % key: keyword
+# % multiple: yes
+# % type: string
+# % label: Keyword to be searched
+# % description: List all modules if not given
+# % required : no
+# %end
+# %flag
+# % key: a
+# % description: Display only modules where all keywords are available (AND), default: OR
+# % guisection: Output
+# %end
+# %flag
+# % key: n
+# % description: Invert selection (logical NOT)
+# % guisection: Output
+# %end
+# %flag
+# % key: m
+# % description: Search in manual pages too (can be slow)
+# % guisection: Output
+# %end
+# %flag
+# % key: k
+# % label: Search only for the exact keyword in module keyword list
+# % description: Instead of full text search, search only in actual keywords
+# % guisection: Output
+# %end
+# %flag
+# % key: c
+# % description: Use colorized (more readable) output to terminal
+# % guisection: Output
+# %end
+# %flag
+# % key: g
+# % description: Shell script format
+# % guisection: Output
+# %end
+# %flag
+# % key: j
+# % description: JSON format
+# % guisection: Output
+# %end
 
 
 from __future__ import print_function
 from __future__ import print_function
 import os
 import os

+ 25 - 25
scripts/i.band/i.band.py

@@ -16,31 +16,31 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Manages band reference information assigned to a single raster map or to a list of raster maps.
-#% keyword: general
-#% keyword: imagery
-#% keyword: band reference
-#% keyword: image collections
-#%end
-#%option G_OPT_R_MAPS
-#%end
-#%option
-#% key: band
-#% type: string
-#% key_desc: name
-#% description: Name of band reference identifier (example: S2_1)
-#% required: no
-#% multiple: yes
-#%end
-#%option
-#% key: operation
-#% type: string
-#% required: yes
-#% multiple: no
-#% options: add,remove,print
-#% description: Operation to be performed
-#% answer: add
+# %module
+# % description: Manages band reference information assigned to a single raster map or to a list of raster maps.
+# % keyword: general
+# % keyword: imagery
+# % keyword: band reference
+# % keyword: image collections
+# %end
+# %option G_OPT_R_MAPS
+# %end
+# %option
+# % key: band
+# % type: string
+# % key_desc: name
+# % description: Name of band reference identifier (example: S2_1)
+# % required: no
+# % multiple: yes
+# %end
+# %option
+# % key: operation
+# % type: string
+# % required: yes
+# % multiple: no
+# % options: add,remove,print
+# % description: Operation to be performed
+# % answer: add
 
 
 import sys
 import sys
 
 

+ 46 - 46
scripts/i.colors.enhance/i.colors.enhance.py

@@ -20,52 +20,52 @@
 # TODO: implement better brightness control
 # TODO: implement better brightness control
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Performs auto-balancing of colors for RGB images.
-#% keyword: imagery
-#% keyword: RGB
-#% keyword: satellite
-#% keyword: colors
-#%end
-#%option G_OPT_R_INPUT
-#% key: red
-#% description: Name of red channel
-#%end
-#%option G_OPT_R_INPUT
-#% key: green
-#% description: Name of green channel
-#%end
-#%option G_OPT_R_INPUT
-#% key: blue
-#% description: Name of blue channel
-#%end
-#%option
-#% key: strength
-#% type: double
-#% description: Cropping intensity (upper brightness level)
-#% options: 0-100
-#% answer : 98
-#% required: no
-#%end
-#%flag
-#% key: f
-#% description: Extend colors to full range of data on each channel
-#% guisection: Colors
-#%end
-#%flag
-#% key: p
-#% description: Preserve relative colors, adjust brightness only
-#% guisection: Colors
-#%end
-#%flag
-#% key: r
-#% description: Reset to standard color range
-#% guisection: Colors
-#%end
-#%flag
-#% key: s
-#% description: Process bands serially (default: run in parallel)
-#%end
+# %module
+# % description: Performs auto-balancing of colors for RGB images.
+# % keyword: imagery
+# % keyword: RGB
+# % keyword: satellite
+# % keyword: colors
+# %end
+# %option G_OPT_R_INPUT
+# % key: red
+# % description: Name of red channel
+# %end
+# %option G_OPT_R_INPUT
+# % key: green
+# % description: Name of green channel
+# %end
+# %option G_OPT_R_INPUT
+# % key: blue
+# % description: Name of blue channel
+# %end
+# %option
+# % key: strength
+# % type: double
+# % description: Cropping intensity (upper brightness level)
+# % options: 0-100
+# % answer : 98
+# % required: no
+# %end
+# %flag
+# % key: f
+# % description: Extend colors to full range of data on each channel
+# % guisection: Colors
+# %end
+# %flag
+# % key: p
+# % description: Preserve relative colors, adjust brightness only
+# % guisection: Colors
+# %end
+# %flag
+# % key: r
+# % description: Reset to standard color range
+# % guisection: Colors
+# %end
+# %flag
+# % key: s
+# % description: Process bands serially (default: run in parallel)
+# %end
 
 
 import sys
 import sys
 
 

+ 10 - 10
scripts/i.image.mosaic/i.image.mosaic.py

@@ -22,16 +22,16 @@
 #--------------------------------------------------
 #--------------------------------------------------
 
 
 
 
-#%module
-#% description: Mosaics several images and extends colormap.
-#% keyword: imagery
-#% keyword: geometry
-#% keyword: mosaicking
-#%end
-#%option G_OPT_R_INPUTS
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
+# %module
+# % description: Mosaics several images and extends colormap.
+# % keyword: imagery
+# % keyword: geometry
+# % keyword: mosaicking
+# %end
+# %option G_OPT_R_INPUTS
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
 from __future__ import print_function
 from __future__ import print_function
 
 
 import grass.script as gscript
 import grass.script as gscript

+ 17 - 17
scripts/i.in.spotvgt/i.in.spotvgt.py

@@ -29,23 +29,23 @@
 #   -> correction of 0001/0001_LOG.TXT coordinates by 0.5 pixel
 #   -> correction of 0001/0001_LOG.TXT coordinates by 0.5 pixel
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Imports SPOT VGT NDVI data into a raster map.
-#% keyword: imagery
-#% keyword: import
-#% keyword: NDVI
-#% keyword: SPOT
-#%end
-#%flag
-#% key: a
-#% description: Also import quality map (SM status map layer) and filter NDVI map
-#%end
-#%option G_OPT_F_INPUT
-#% description: Name of input SPOT VGT NDVI HDF file
-#%end
-#% option G_OPT_R_OUTPUT
-#% required : no
-#%end
+# %module
+# % description: Imports SPOT VGT NDVI data into a raster map.
+# % keyword: imagery
+# % keyword: import
+# % keyword: NDVI
+# % keyword: SPOT
+# %end
+# %flag
+# % key: a
+# % description: Also import quality map (SM status map layer) and filter NDVI map
+# %end
+# %option G_OPT_F_INPUT
+# % description: Name of input SPOT VGT NDVI HDF file
+# %end
+# % option G_OPT_R_OUTPUT
+# % required : no
+# %end
 
 
 import os
 import os
 import atexit
 import atexit

+ 20 - 20
scripts/i.oif/i.oif.py

@@ -19,26 +19,26 @@
 # Ref.: Jensen: Introductory digital image processing 1996, p.98
 # Ref.: Jensen: Introductory digital image processing 1996, p.98
 #############################################################################
 #############################################################################
 
 
-#% Module
-#% description: Calculates Optimum-Index-Factor table for spectral bands
-#% keyword: imagery
-#% keyword: multispectral
-#% keyword: statistics
-#% End
-#% option G_OPT_R_INPUTS
-#% end
-#% option G_OPT_F_OUTPUT
-#% description: Name for output file (if omitted or "-" output to stdout)
-#% required: no
-#% end
-#% Flag
-#% key: g
-#% description: Print in shell script style
-#% End
-#% Flag
-#% key: s
-#% description: Process bands serially (default: run in parallel)
-#% End
+# % Module
+# % description: Calculates Optimum-Index-Factor table for spectral bands
+# % keyword: imagery
+# % keyword: multispectral
+# % keyword: statistics
+# % End
+# % option G_OPT_R_INPUTS
+# % end
+# % option G_OPT_F_OUTPUT
+# % description: Name for output file (if omitted or "-" output to stdout)
+# % required: no
+# % end
+# % Flag
+# % key: g
+# % description: Print in shell script style
+# % End
+# % Flag
+# % key: s
+# % description: Process bands serially (default: run in parallel)
+# % End
 
 
 import sys
 import sys
 import os
 import os

+ 56 - 56
scripts/i.pansharpen/i.pansharpen.py

@@ -35,62 +35,62 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%Module
-#% description: Image fusion algorithms to sharpen multispectral with high-res panchromatic channels
-#% keyword: imagery
-#% keyword: fusion
-#% keyword: sharpen
-#% keyword: Brovey
-#% keyword: IHS
-#% keyword: HIS
-#% keyword: PCA
-#% overwrite: yes
-#%End
-#%option G_OPT_R_INPUT
-#% key: red
-#% description: Name of raster map to be used for <red>
-#%end
-#%option G_OPT_R_INPUT
-#% key: green
-#% description: Name of raster map to be used for <green>
-#%end
-#%option G_OPT_R_INPUT
-#% key: blue
-#% description: Name of raster map to be used for <blue>
-#%end
-#% option G_OPT_R_INPUT
-#% key: pan
-#% description: Name of raster map to be used for high resolution panchromatic channel
-#%end
-#%option G_OPT_R_BASENAME_OUTPUT
-#%end
-#%option
-#% key: method
-#% description: Method for pan sharpening
-#% options: brovey,ihs,pca
-#% answer: ihs
-#% required: yes
-#%end
-#%option
-#% key: bitdepth
-#% type: integer
-#% description: Bit depth of image (must be in range of 2-30)
-#% options: 2-32
-#% answer: 8
-#% required: yes
-#%end
-#%flag
-#% key: s
-#% description: Serial processing rather than parallel processing
-#%end
-#%flag
-#% key: l
-#% description: Rebalance blue channel for LANDSAT
-#%end
-#%flag
-#% key: r
-#% description: Rescale (stretch) the range of pixel values in each channel to the entire 0-255 8-bit range for processing (see notes)
-#%end
+# %Module
+# % description: Image fusion algorithms to sharpen multispectral with high-res panchromatic channels
+# % keyword: imagery
+# % keyword: fusion
+# % keyword: sharpen
+# % keyword: Brovey
+# % keyword: IHS
+# % keyword: HIS
+# % keyword: PCA
+# % overwrite: yes
+# %End
+# %option G_OPT_R_INPUT
+# % key: red
+# % description: Name of raster map to be used for <red>
+# %end
+# %option G_OPT_R_INPUT
+# % key: green
+# % description: Name of raster map to be used for <green>
+# %end
+# %option G_OPT_R_INPUT
+# % key: blue
+# % description: Name of raster map to be used for <blue>
+# %end
+# % option G_OPT_R_INPUT
+# % key: pan
+# % description: Name of raster map to be used for high resolution panchromatic channel
+# %end
+# %option G_OPT_R_BASENAME_OUTPUT
+# %end
+# %option
+# % key: method
+# % description: Method for pan sharpening
+# % options: brovey,ihs,pca
+# % answer: ihs
+# % required: yes
+# %end
+# %option
+# % key: bitdepth
+# % type: integer
+# % description: Bit depth of image (must be in range of 2-30)
+# % options: 2-32
+# % answer: 8
+# % required: yes
+# %end
+# %flag
+# % key: s
+# % description: Serial processing rather than parallel processing
+# %end
+# %flag
+# % key: l
+# % description: Rebalance blue channel for LANDSAT
+# %end
+# %flag
+# % key: r
+# % description: Rescale (stretch) the range of pixel values in each channel to the entire 0-255 8-bit range for processing (see notes)
+# %end
 
 
 import os
 import os
 
 

+ 52 - 52
scripts/i.spectral/i.spectral.py

@@ -25,58 +25,58 @@
 # 3 March 2006: Added multiple images and group support by Francesco Pirotti - CIRGEO
 # 3 March 2006: Added multiple images and group support by Francesco Pirotti - CIRGEO
 #
 #
 
 
-#%Module
-#% description: Displays spectral response at user specified locations in group or images.
-#% keyword: imagery
-#% keyword: querying
-#% keyword: raster
-#% keyword: multispectral
-#%End
-#%option G_OPT_I_GROUP
-#% required : no
-#% guisection: Input
-#%end
-#%option G_OPT_I_SUBGROUP
-#% required : no
-#% guisection: Input
-#%end
-#%option G_OPT_R_INPUTS
-#% key: raster
-#% required : no
-#% guisection: Input
-#%end
-#%option G_OPT_M_COORDS
-#% multiple: yes
-#% required: yes
-#% guisection: Input
-#%end
-#%option G_OPT_F_OUTPUT
-#% key: output
-#% description: Name for output image (or text file for -t)
-#% guisection: Output
-#% required : no
-#%end
-#%Option
-#% key: format
-#% type: string
-#% description: Graphics format for output file
-#% options: png,eps,svg
-#% answer: png
-#% multiple: no
-#% guisection: Output
-#%End
-#%flag
-#% key: c
-#% description: Show sampling coordinates instead of numbering in the legend
-#%end
-#% flag
-#% key: g
-#% description: Use gnuplot for display
-#%end
-#% flag
-#% key: t
-#% description: output to text file
-#%end
+# %Module
+# % description: Displays spectral response at user specified locations in group or images.
+# % keyword: imagery
+# % keyword: querying
+# % keyword: raster
+# % keyword: multispectral
+# %End
+# %option G_OPT_I_GROUP
+# % required : no
+# % guisection: Input
+# %end
+# %option G_OPT_I_SUBGROUP
+# % required : no
+# % guisection: Input
+# %end
+# %option G_OPT_R_INPUTS
+# % key: raster
+# % required : no
+# % guisection: Input
+# %end
+# %option G_OPT_M_COORDS
+# % multiple: yes
+# % required: yes
+# % guisection: Input
+# %end
+# %option G_OPT_F_OUTPUT
+# % key: output
+# % description: Name for output image (or text file for -t)
+# % guisection: Output
+# % required : no
+# %end
+# %Option
+# % key: format
+# % type: string
+# % description: Graphics format for output file
+# % options: png,eps,svg
+# % answer: png
+# % multiple: no
+# % guisection: Output
+# %End
+# %flag
+# % key: c
+# % description: Show sampling coordinates instead of numbering in the legend
+# %end
+# % flag
+# % key: g
+# % description: Use gnuplot for display
+# %end
+# % flag
+# % key: t
+# % description: output to text file
+# %end
 
 
 import os
 import os
 import atexit
 import atexit

+ 27 - 27
scripts/i.tasscap/i.tasscap.py

@@ -54,33 +54,33 @@
 #  Remote Sensing Letters. 5. DOI: 10.1080/2150704X.2014.885148.
 #  Remote Sensing Letters. 5. DOI: 10.1080/2150704X.2014.885148.
 #############################################################################
 #############################################################################
 
 
-#%Module
-#% description: Performs Tasseled Cap (Kauth Thomas) transformation.
-#% keyword: imagery
-#% keyword: transformation
-#% keyword: Landsat
-#% keyword: MODIS
-#% keyword: Worldview
-#% keyword: Sentinel
-#% keyword: Tasseled Cap transformation
-#%end
-
-#%option G_OPT_R_INPUTS
-#% description: For Landsat4-7: bands 1, 2, 3, 4, 5, 7; for Landsat8: bands 2, 3, 4, 5, 6, 7; for MODIS: bands 1, 2, 3, 4, 5, 6, 7; for Sentinel-2: bands 1 to 12, 8A; for Worldview-2: bands 1, 2, 3, 4, 5, 6, 7, 8
-#%end
-
-#%option G_OPT_R_BASENAME_OUTPUT
-#% label: basename for output raster map(s)
-#%end
-
-#%option
-#% key: sensor
-#% type: string
-#% description: Satellite sensor
-#% required: yes
-#% multiple: no
-#% options: landsat4_tm,landsat5_tm,landsat7_etm,landsat8_oli,modis,sentinel2,worldview2
-#%end
+# %Module
+# % description: Performs Tasseled Cap (Kauth Thomas) transformation.
+# % keyword: imagery
+# % keyword: transformation
+# % keyword: Landsat
+# % keyword: MODIS
+# % keyword: Worldview
+# % keyword: Sentinel
+# % keyword: Tasseled Cap transformation
+# %end
+
+# %option G_OPT_R_INPUTS
+# % description: For Landsat4-7: bands 1, 2, 3, 4, 5, 7; for Landsat8: bands 2, 3, 4, 5, 6, 7; for MODIS: bands 1, 2, 3, 4, 5, 6, 7; for Sentinel-2: bands 1 to 12, 8A; for Worldview-2: bands 1, 2, 3, 4, 5, 6, 7, 8
+# %end
+
+# %option G_OPT_R_BASENAME_OUTPUT
+# % label: basename for output raster map(s)
+# %end
+
+# %option
+# % key: sensor
+# % type: string
+# % description: Satellite sensor
+# % required: yes
+# % multiple: no
+# % options: landsat4_tm,landsat5_tm,landsat7_etm,landsat8_oli,modis,sentinel2,worldview2
+# %end
 
 
 import grass.script as grass
 import grass.script as grass
 
 

+ 72 - 72
scripts/m.proj/m.proj.py

@@ -25,78 +25,78 @@ COPYRIGHT: (c) 2006-2019 Hamish Bowman, and the GRASS Development Team
 #    numeric and string columns would survive the trip, and 3rd column would
 #    numeric and string columns would survive the trip, and 3rd column would
 #    not be modified as z.
 #    not be modified as z.
 
 
-#%module
-#% description: Converts coordinates from one projection to another (cs2cs frontend).
-#% keyword: miscellaneous
-#% keyword: projection
-#% keyword: transformation
-#%end
-#%option G_OPT_M_COORDS
-#% description: Input coordinates to reproject
-#% guisection: Input coordinates
-#%end
-#%option G_OPT_F_INPUT
-#% label: Name of input coordinate file
-#% description: '-' for standard input
-#% required: no
-#% guisection: Input coordinates
-#%end
-#%option G_OPT_F_OUTPUT
-#% description: Name for output coordinate file (omit to send to stdout)
-#% required : no
-#% guisection: Output
-#%end
-#%option G_OPT_F_SEP
-#% label: Field separator (format: input[,output])
-#% required : no
-#% guisection: Input coordinates
-#%end
-#%option
-#% key: proj_in
-#% type: string
-#% description: Input projection parameters (PROJ.4 style)
-#% required : no
-#% guisection: Projections
-#%end
-#%option
-#% key: proj_out
-#% type: string
-#% description: Output projection parameters (PROJ.4 style)
-#% required : no
-#% guisection: Projections
-#%end
-#%flag
-#% key: i
-#% description: Use LL WGS84 as input and current location as output projection
-#% guisection: Projections
-#%end
-#%flag
-#% key: o
-#% description: Use current location as input and LL WGS84 as output projection
-#% guisection: Projections
-#%end
-#%flag
-#% key: d
-#% description: Output long/lat in decimal degrees, or other projections with many decimal places
-#% guisection: Output
-#%end
-#%flag
-#% key: e
-#% description: Include input coordinates in output file
-#% guisection: Output
-#%end
-#%flag
-#% key: c
-#% description: Include column names in output file
-#% guisection: Output
-#%end
-#%rules
-#% required: coordinates, input
-#% exclusive: coordinates, input
-#% exclusive: proj_in, -i
-#% exclusive: proj_out, -o
-#% exclusive: -i, -o
-#%end
+# %module
+# % description: Converts coordinates from one projection to another (cs2cs frontend).
+# % keyword: miscellaneous
+# % keyword: projection
+# % keyword: transformation
+# %end
+# %option G_OPT_M_COORDS
+# % description: Input coordinates to reproject
+# % guisection: Input coordinates
+# %end
+# %option G_OPT_F_INPUT
+# % label: Name of input coordinate file
+# % description: '-' for standard input
+# % required: no
+# % guisection: Input coordinates
+# %end
+# %option G_OPT_F_OUTPUT
+# % description: Name for output coordinate file (omit to send to stdout)
+# % required : no
+# % guisection: Output
+# %end
+# %option G_OPT_F_SEP
+# % label: Field separator (format: input[,output])
+# % required : no
+# % guisection: Input coordinates
+# %end
+# %option
+# % key: proj_in
+# % type: string
+# % description: Input projection parameters (PROJ.4 style)
+# % required : no
+# % guisection: Projections
+# %end
+# %option
+# % key: proj_out
+# % type: string
+# % description: Output projection parameters (PROJ.4 style)
+# % required : no
+# % guisection: Projections
+# %end
+# %flag
+# % key: i
+# % description: Use LL WGS84 as input and current location as output projection
+# % guisection: Projections
+# %end
+# %flag
+# % key: o
+# % description: Use current location as input and LL WGS84 as output projection
+# % guisection: Projections
+# %end
+# %flag
+# % key: d
+# % description: Output long/lat in decimal degrees, or other projections with many decimal places
+# % guisection: Output
+# %end
+# %flag
+# % key: e
+# % description: Include input coordinates in output file
+# % guisection: Output
+# %end
+# %flag
+# % key: c
+# % description: Include column names in output file
+# % guisection: Output
+# %end
+# %rules
+# % required: coordinates, input
+# % exclusive: coordinates, input
+# % exclusive: proj_in, -i
+# % exclusive: proj_out, -o
+# % exclusive: -i, -o
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 28 - 28
scripts/r.blend/r.blend.py

@@ -14,34 +14,34 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Blends color components of two raster maps by a given ratio.
-#% keyword: raster
-#% keyword: composite
-#%end
-#%option G_OPT_R_INPUT
-#% key: first
-#% description: Name of first raster map for blending
-#%end
-#%option G_OPT_R_INPUT
-#% key: second
-#% description: Name of second raster map for blending
-#%end
-#%option G_OPT_R_BASENAME_OUTPUT
-#% description: Basename for red, green and blue output raster maps
-#%end
-#%option
-#% key: percent
-#% type: double
-#% answer: 50
-#% options : 0-100
-#% description: Percentage weight of first map for color blending
-#% required : no
-#%end
-#% flag
-#% key: c
-#% description: Combine resulting R,G,B layers into single output map
-#%end
+# %module
+# % description: Blends color components of two raster maps by a given ratio.
+# % keyword: raster
+# % keyword: composite
+# %end
+# %option G_OPT_R_INPUT
+# % key: first
+# % description: Name of first raster map for blending
+# %end
+# %option G_OPT_R_INPUT
+# % key: second
+# % description: Name of second raster map for blending
+# %end
+# %option G_OPT_R_BASENAME_OUTPUT
+# % description: Basename for red, green and blue output raster maps
+# %end
+# %option
+# % key: percent
+# % type: double
+# % answer: 50
+# % options : 0-100
+# % description: Percentage weight of first map for color blending
+# % required : no
+# %end
+# % flag
+# % key: c
+# % description: Combine resulting R,G,B layers into single output map
+# %end
 
 
 import os
 import os
 import string
 import string

+ 26 - 26
scripts/r.buffer.lowmem/r.buffer.lowmem.py

@@ -14,32 +14,32 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% label: Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.
-#% description: This is the low-memory alternative to the classic r.buffer module.
-#% keyword: raster
-#% keyword: buffer
-#%end
-#%flag
-#% key: z
-#% description: Ignore zero (0) data cells instead of NULL cells
-#%end
-#%option G_OPT_R_INPUT
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
-#%option
-#% key: distances
-#% type: double
-#% required: yes
-#% multiple: yes
-#% description: Distance zone(s)
-#%end
-#%option G_OPT_M_UNITS
-#% options: meters,kilometers,feet,miles,nautmiles
-#% description: Units of distance
-#% answer: meters
-#%end
+# %module
+# % label: Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.
+# % description: This is the low-memory alternative to the classic r.buffer module.
+# % keyword: raster
+# % keyword: buffer
+# %end
+# %flag
+# % key: z
+# % description: Ignore zero (0) data cells instead of NULL cells
+# %end
+# %option G_OPT_R_INPUT
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
+# %option
+# % key: distances
+# % type: double
+# % required: yes
+# % multiple: yes
+# % description: Distance zone(s)
+# %end
+# %option G_OPT_M_UNITS
+# % options: meters,kilometers,feet,miles,nautmiles
+# % description: Units of distance
+# % answer: meters
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 15 - 15
scripts/r.colors.stddev/r.colors.stddev.py

@@ -14,21 +14,21 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Sets color rules based on stddev from a raster map's mean value.
-#% keyword: raster
-#% keyword: color table
-#%end
-#% option G_OPT_R_MAP
-#%end
-#%flag
-#% key: b
-#% description: Color using standard deviation bands
-#%end
-#%flag
-#% key: z
-#% description: Force center at zero
-#%end
+# %module
+# % description: Sets color rules based on stddev from a raster map's mean value.
+# % keyword: raster
+# % keyword: color table
+# %end
+# % option G_OPT_R_MAP
+# %end
+# %flag
+# % key: b
+# % description: Color using standard deviation bands
+# %end
+# %flag
+# % key: z
+# % description: Force center at zero
+# %end
 
 
 import os
 import os
 import atexit
 import atexit

+ 88 - 88
scripts/r.drain/r.drain.py

@@ -19,94 +19,94 @@
 #
 #
 ############################################################################
 ############################################################################
 
 
-#%module
-#% description: Traces a flow through an elevation model or cost surface on a raster map.
-#% keyword: raster
-#% keyword: hydrology
-#% keyword: cost surface
-#%end
-#%option
-#% key: input
-#% type: string
-#% required: yes
-#% multiple: no
-#% key_desc: name
-#% description: Name of input elevation or cost surface raster map
-#% gisprompt: old,cell,raster
-#%end
-#%option
-#% key: direction
-#% type: string
-#% required: no
-#% multiple: no
-#% key_desc: name
-#% label: Name of input movement direction map associated with the cost surface
-#% description: Direction in degrees CCW from east
-#% gisprompt: old,cell,raster
-#% guisection: Cost surface
-#%end
-#%option
-#% key: output
-#% type: string
-#% required: yes
-#% multiple: no
-#% key_desc: name
-#% description: Name for output raster map
-#% gisprompt: new,cell,raster
-#%end
-#%option
-#% key: drain
-#% type: string
-#% required: no
-#% multiple: no
-#% key_desc: name
-#% label: Name for output drain vector map
-#% description: Recommended for cost surface made using knight's move
-#% gisprompt: new,vector,vector
-#%end
-#%option
-#% key: start_coordinates
-#% type: double
-#% required: no
-#% multiple: yes
-#% key_desc: east,north
-#% description: Coordinates of starting point(s) (E,N)
-#% gisprompt: old,coords,coords
-#% guisection: Start
-#%end
-#%option
-#% key: start_points
-#% type: string
-#% required: no
-#% multiple: yes
-#% key_desc: name
-#% label: Name of starting vector points map(s)
-#% gisprompt: old,vector,vector
-#% guisection: Start
-#%end
-#%flag
-#% key: c
-#% description: Copy input cell values on output
-#% guisection: Path settings
-#%end
-#%flag
-#% key: a
-#% description: Accumulate input values along the path
-#% guisection: Path settings
-#%end
-#%flag
-#% key: n
-#% description: Count cell numbers along the path
-#% guisection: Path settings
-#%end
-#%flag
-#% key: d
-#% description: The input raster map is a cost surface (direction surface must also be specified)
-#% guisection: Cost surface
-#%end
-#%rules
-#% required: start_coordinates, start_points
-#%end
+# %module
+# % description: Traces a flow through an elevation model or cost surface on a raster map.
+# % keyword: raster
+# % keyword: hydrology
+# % keyword: cost surface
+# %end
+# %option
+# % key: input
+# % type: string
+# % required: yes
+# % multiple: no
+# % key_desc: name
+# % description: Name of input elevation or cost surface raster map
+# % gisprompt: old,cell,raster
+# %end
+# %option
+# % key: direction
+# % type: string
+# % required: no
+# % multiple: no
+# % key_desc: name
+# % label: Name of input movement direction map associated with the cost surface
+# % description: Direction in degrees CCW from east
+# % gisprompt: old,cell,raster
+# % guisection: Cost surface
+# %end
+# %option
+# % key: output
+# % type: string
+# % required: yes
+# % multiple: no
+# % key_desc: name
+# % description: Name for output raster map
+# % gisprompt: new,cell,raster
+# %end
+# %option
+# % key: drain
+# % type: string
+# % required: no
+# % multiple: no
+# % key_desc: name
+# % label: Name for output drain vector map
+# % description: Recommended for cost surface made using knight's move
+# % gisprompt: new,vector,vector
+# %end
+# %option
+# % key: start_coordinates
+# % type: double
+# % required: no
+# % multiple: yes
+# % key_desc: east,north
+# % description: Coordinates of starting point(s) (E,N)
+# % gisprompt: old,coords,coords
+# % guisection: Start
+# %end
+# %option
+# % key: start_points
+# % type: string
+# % required: no
+# % multiple: yes
+# % key_desc: name
+# % label: Name of starting vector points map(s)
+# % gisprompt: old,vector,vector
+# % guisection: Start
+# %end
+# %flag
+# % key: c
+# % description: Copy input cell values on output
+# % guisection: Path settings
+# %end
+# %flag
+# % key: a
+# % description: Accumulate input values along the path
+# % guisection: Path settings
+# %end
+# %flag
+# % key: n
+# % description: Count cell numbers along the path
+# % guisection: Path settings
+# %end
+# %flag
+# % key: d
+# % description: The input raster map is a cost surface (direction surface must also be specified)
+# % guisection: Cost surface
+# %end
+# %rules
+# % required: start_coordinates, start_points
+# %end
 
 
 import os
 import os
 import sys
 import sys

+ 76 - 76
scripts/r.fillnulls/r.fillnulls.py

@@ -23,82 +23,82 @@
 #############################################################################
 #############################################################################
 
 
 
 
-#%module
-#% description: Fills no-data areas in raster maps using spline interpolation.
-#% keyword: raster
-#% keyword: surface
-#% keyword: elevation
-#% keyword: interpolation
-#% keyword: splines
-#% keyword: no-data filling
-#%end
-#%option G_OPT_R_INPUT
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
-#%option
-#% key: method
-#% type: string
-#% description: Interpolation method to use
-#% required: yes
-#% options: bilinear,bicubic,rst
-#% answer: rst
-#%end
-#%option
-#% key: tension
-#% type: double
-#% description: Spline tension parameter
-#% required : no
-#% answer : 40.
-#% guisection: RST options
-#%end
-#%option
-#% key: smooth
-#% type: double
-#% description: Spline smoothing parameter
-#% required : no
-#% answer : 0.1
-#% guisection: RST options
-#%end
-#%option
-#% key: edge
-#% type: integer
-#% description: Width of hole edge used for interpolation (in cells)
-#% required : no
-#% answer : 3
-#% options : 2-100
-#% guisection: RST options
-#%end
-#%option
-#% key: npmin
-#% type: integer
-#% description: Minimum number of points for approximation in a segment (>segmax)
-#% required : no
-#% answer : 600
-#% options : 2-10000
-#% guisection: RST options
-#%end
-#%option
-#% key: segmax
-#% type: integer
-#% description: Maximum number of points in a segment
-#% required : no
-#% answer : 300
-#% options : 2-10000
-#% guisection: RST options
-#%end
-#%option
-#% key: lambda
-#% type: double
-#% required: no
-#% multiple: no
-#% label: Tykhonov regularization parameter (affects smoothing)
-#% description: Used in bilinear and bicubic spline interpolation
-#% answer: 0.01
-#% guisection: Spline options
-#%end
-#%option G_OPT_MEMORYMB
-#%end
+# %module
+# % description: Fills no-data areas in raster maps using spline interpolation.
+# % keyword: raster
+# % keyword: surface
+# % keyword: elevation
+# % keyword: interpolation
+# % keyword: splines
+# % keyword: no-data filling
+# %end
+# %option G_OPT_R_INPUT
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
+# %option
+# % key: method
+# % type: string
+# % description: Interpolation method to use
+# % required: yes
+# % options: bilinear,bicubic,rst
+# % answer: rst
+# %end
+# %option
+# % key: tension
+# % type: double
+# % description: Spline tension parameter
+# % required : no
+# % answer : 40.
+# % guisection: RST options
+# %end
+# %option
+# % key: smooth
+# % type: double
+# % description: Spline smoothing parameter
+# % required : no
+# % answer : 0.1
+# % guisection: RST options
+# %end
+# %option
+# % key: edge
+# % type: integer
+# % description: Width of hole edge used for interpolation (in cells)
+# % required : no
+# % answer : 3
+# % options : 2-100
+# % guisection: RST options
+# %end
+# %option
+# % key: npmin
+# % type: integer
+# % description: Minimum number of points for approximation in a segment (>segmax)
+# % required : no
+# % answer : 600
+# % options : 2-10000
+# % guisection: RST options
+# %end
+# %option
+# % key: segmax
+# % type: integer
+# % description: Maximum number of points in a segment
+# % required : no
+# % answer : 300
+# % options : 2-10000
+# % guisection: RST options
+# %end
+# %option
+# % key: lambda
+# % type: double
+# % required: no
+# % multiple: no
+# % label: Tykhonov regularization parameter (affects smoothing)
+# % description: Used in bilinear and bicubic spline interpolation
+# % answer: 0.01
+# % guisection: Spline options
+# %end
+# %option G_OPT_MEMORYMB
+# %end
 
 
 
 
 import sys
 import sys

+ 45 - 45
scripts/r.grow/r.grow.py

@@ -14,51 +14,51 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%Module
-#% description: Generates a raster map layer with contiguous areas grown by one cell.
-#% keyword: raster
-#% keyword: distance
-#% keyword: proximity
-#%end
-#%flag
-#% key: m
-#% description: Radius is in map units rather than cells
-#%end
-#%option G_OPT_R_INPUT
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
-#%option
-#% key: radius
-#% type: double
-#% required: no
-#% multiple: no
-#% description: Radius of buffer in raster cells
-#% answer: 1.01
-#%end
-#%option
-#% key: metric
-#% type: string
-#% required: no
-#% multiple: no
-#% options: euclidean,maximum,manhattan
-#% description: Metric
-#% answer: euclidean
-#%end
-#%option
-#% key: old
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Value to write for input cells which are non-NULL (-1 => NULL)
-#%end
-#%option
-#% key: new
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Value to write for "grown" cells
-#%end
+# %Module
+# % description: Generates a raster map layer with contiguous areas grown by one cell.
+# % keyword: raster
+# % keyword: distance
+# % keyword: proximity
+# %end
+# %flag
+# % key: m
+# % description: Radius is in map units rather than cells
+# %end
+# %option G_OPT_R_INPUT
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
+# %option
+# % key: radius
+# % type: double
+# % required: no
+# % multiple: no
+# % description: Radius of buffer in raster cells
+# % answer: 1.01
+# %end
+# %option
+# % key: metric
+# % type: string
+# % required: no
+# % multiple: no
+# % options: euclidean,maximum,manhattan
+# % description: Metric
+# % answer: euclidean
+# %end
+# %option
+# % key: old
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Value to write for input cells which are non-NULL (-1 => NULL)
+# %end
+# %option
+# % key: new
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Value to write for "grown" cells
+# %end
 
 
 import os
 import os
 import atexit
 import atexit

+ 96 - 96
scripts/r.import/r.import.py

@@ -16,102 +16,102 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Imports raster data into a GRASS raster map using GDAL library and reprojects on the fly.
-#% keyword: raster
-#% keyword: import
-#% keyword: projection
-#%end
-#%option G_OPT_F_BIN_INPUT
-#% description: Name of GDAL dataset to be imported
-#% guisection: Input
-#%end
-#%option
-#% key: band
-#% type: integer
-#% required: no
-#% multiple: yes
-#% description: Input band(s) to select (default is all bands)
-#% guisection: Input
-#%end
-#%option G_OPT_MEMORYMB
-#%end
-#%option G_OPT_R_OUTPUT
-#% description: Name for output raster map
-#% required: no
-#% guisection: Output
-#%end
-#%option
-#% key: resample
-#% type: string
-#% required: no
-#% multiple: no
-#% options: nearest,bilinear,bicubic,lanczos,bilinear_f,bicubic_f,lanczos_f
-#% description: Resampling method to use for reprojection
-#% descriptions: nearest;nearest neighbor;bilinear;bilinear interpolation;bicubic;bicubic interpolation;lanczos;lanczos filter;bilinear_f;bilinear interpolation with fallback;bicubic_f;bicubic interpolation with fallback;lanczos_f;lanczos filter with fallback
-#% answer: nearest
-#% guisection: Output
-#%end
-#%option
-#% key: extent
-#% type: string
-#% required: no
-#% multiple: no
-#% options: input,region
-#% answer: input
-#% description: Output raster map extent
-#% descriptions: region;extent of current region;input;extent of input map
-#% guisection: Output
-#%end
-#%option
-#% key: resolution
-#% type: string
-#% required: no
-#% multiple: no
-#% answer: estimated
-#% options: estimated,value,region
-#% description: Resolution of output raster map (default: estimated)
-#% descriptions: estimated;estimated resolution;value;user-specified resolution;region;current region resolution
-#% guisection: Output
-#%end
-#%option
-#% key: resolution_value
-#% type: double
-#% required: no
-#% multiple: no
-#% description: Resolution of output raster map (use with option resolution=value)
-#% guisection: Output
-#%end
-#%option
-#% key: title
-#% key_desc: phrase
-#% type: string
-#% required: no
-#% description: Title for resultant raster map
-#% guisection: Metadata
-#%end
-#%flag
-#% key: e
-#% description: Estimate resolution only
-#% guisection: Optional
-#%end
-#%flag
-#% key: n
-#% description: Do not perform region cropping optimization
-#% guisection: Optional
-#%end
-#%flag
-#% key: l
-#% description: Force Lat/Lon maps to fit into geographic coordinates (90N,S; 180E,W)
-#%end
-#%flag
-#% key: o
-#% label: Override projection check (use current location's projection)
-#% description: Assume that the dataset has the same projection as the current location
-#%end
-#%rules
-#% required: output,-e
-#%end
+# %module
+# % description: Imports raster data into a GRASS raster map using GDAL library and reprojects on the fly.
+# % keyword: raster
+# % keyword: import
+# % keyword: projection
+# %end
+# %option G_OPT_F_BIN_INPUT
+# % description: Name of GDAL dataset to be imported
+# % guisection: Input
+# %end
+# %option
+# % key: band
+# % type: integer
+# % required: no
+# % multiple: yes
+# % description: Input band(s) to select (default is all bands)
+# % guisection: Input
+# %end
+# %option G_OPT_MEMORYMB
+# %end
+# %option G_OPT_R_OUTPUT
+# % description: Name for output raster map
+# % required: no
+# % guisection: Output
+# %end
+# %option
+# % key: resample
+# % type: string
+# % required: no
+# % multiple: no
+# % options: nearest,bilinear,bicubic,lanczos,bilinear_f,bicubic_f,lanczos_f
+# % description: Resampling method to use for reprojection
+# % descriptions: nearest;nearest neighbor;bilinear;bilinear interpolation;bicubic;bicubic interpolation;lanczos;lanczos filter;bilinear_f;bilinear interpolation with fallback;bicubic_f;bicubic interpolation with fallback;lanczos_f;lanczos filter with fallback
+# % answer: nearest
+# % guisection: Output
+# %end
+# %option
+# % key: extent
+# % type: string
+# % required: no
+# % multiple: no
+# % options: input,region
+# % answer: input
+# % description: Output raster map extent
+# % descriptions: region;extent of current region;input;extent of input map
+# % guisection: Output
+# %end
+# %option
+# % key: resolution
+# % type: string
+# % required: no
+# % multiple: no
+# % answer: estimated
+# % options: estimated,value,region
+# % description: Resolution of output raster map (default: estimated)
+# % descriptions: estimated;estimated resolution;value;user-specified resolution;region;current region resolution
+# % guisection: Output
+# %end
+# %option
+# % key: resolution_value
+# % type: double
+# % required: no
+# % multiple: no
+# % description: Resolution of output raster map (use with option resolution=value)
+# % guisection: Output
+# %end
+# %option
+# % key: title
+# % key_desc: phrase
+# % type: string
+# % required: no
+# % description: Title for resultant raster map
+# % guisection: Metadata
+# %end
+# %flag
+# % key: e
+# % description: Estimate resolution only
+# % guisection: Optional
+# %end
+# %flag
+# % key: n
+# % description: Do not perform region cropping optimization
+# % guisection: Optional
+# %end
+# %flag
+# % key: l
+# % description: Force Lat/Lon maps to fit into geographic coordinates (90N,S; 180E,W)
+# %end
+# %flag
+# % key: o
+# % label: Override projection check (use current location's projection)
+# % description: Assume that the dataset has the same projection as the current location
+# %end
+# %rules
+# % required: output,-e
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 29 - 29
scripts/r.in.aster/r.in.aster.py

@@ -21,35 +21,35 @@
 #   gdalwarp
 #   gdalwarp
 #   gdal compiled with HDF4 support
 #   gdal compiled with HDF4 support
 
 
-#%Module
-#% description: Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.
-#% keyword: raster
-#% keyword: import
-#% keyword: imagery
-#% keyword: ASTER
-#% keyword: elevation
-#%End
-#%option G_OPT_F_INPUT
-#% description: Name of input ASTER image
-#%end
-#%option
-#% key: proctype
-#% type: string
-#% description: ASTER imagery processing type (Level 1A, Level 1B, or relative DEM)
-#% options: L1A,L1B,DEM
-#% answer: L1B
-#% required: yes
-#%end
-#%option
-#% key: band
-#% type: string
-#% description: List L1A or L1B band to translate (1,2,3n,...), or enter 'all' to translate all bands
-#% answer: all
-#% required: yes
-#%end
-#%option G_OPT_R_OUTPUT
-#% description: Base name for output raster map (band number will be appended to base name)
-#%end
+# %Module
+# % description: Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.
+# % keyword: raster
+# % keyword: import
+# % keyword: imagery
+# % keyword: ASTER
+# % keyword: elevation
+# %End
+# %option G_OPT_F_INPUT
+# % description: Name of input ASTER image
+# %end
+# %option
+# % key: proctype
+# % type: string
+# % description: ASTER imagery processing type (Level 1A, Level 1B, or relative DEM)
+# % options: L1A,L1B,DEM
+# % answer: L1B
+# % required: yes
+# %end
+# %option
+# % key: band
+# % type: string
+# % description: List L1A or L1B band to translate (1,2,3n,...), or enter 'all' to translate all bands
+# % answer: all
+# % required: yes
+# %end
+# %option G_OPT_R_OUTPUT
+# % description: Base name for output raster map (band number will be appended to base name)
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 17 - 17
scripts/r.in.srtm/r.in.srtm.py

@@ -52,23 +52,23 @@
 #
 #
 #########################
 #########################
 
 
-#%Module
-#% description: Imports SRTM HGT files into raster map.
-#% keyword: raster
-#% keyword: import
-#% keyword: SRTM
-#%End
-#%option G_OPT_F_INPUT
-#% description: Name of SRTM input tile (file without .hgt.zip extension)
-#%end
-#%option G_OPT_R_OUTPUT
-#% description: Name for output raster map (default: input tile)
-#% required : no
-#%end
-#%flag
-#% key: 1
-#% description: Input is a 1-arcsec tile (default: 3-arcsec)
-#%end
+# %Module
+# % description: Imports SRTM HGT files into raster map.
+# % keyword: raster
+# % keyword: import
+# % keyword: SRTM
+# %End
+# %option G_OPT_F_INPUT
+# % description: Name of SRTM input tile (file without .hgt.zip extension)
+# %end
+# %option G_OPT_R_OUTPUT
+# % description: Name for output raster map (default: input tile)
+# % required : no
+# %end
+# %flag
+# % key: 1
+# % description: Input is a 1-arcsec tile (default: 3-arcsec)
+# %end
 
 
 tmpl1sec = """BYTEORDER M
 tmpl1sec = """BYTEORDER M
 LAYOUT BIL
 LAYOUT BIL

+ 181 - 181
scripts/r.in.wms/r.in.wms.py

@@ -12,187 +12,187 @@ This program is free software under the GNU General Public License
 (>=v2). Read the file COPYING that comes with GRASS for details.
 (>=v2). Read the file COPYING that comes with GRASS for details.
 """
 """
 
 
-#%module
-#% description: Downloads and imports data from OGC WMS and OGC WMTS web mapping servers.
-#% keyword: raster
-#% keyword: import
-#% keyword: OGC web services
-#% keyword: OGC WMS
-#% keyword: OGC WMTS
-#%end
-
-#%option
-#% key: url
-#% type: string
-#% description: Typically starts with "http://"
-#% required: yes
-#%end
-
-#%option G_OPT_R_OUTPUT
-#% description: Name for output raster map
-#%end
-
-#%option
-#% key: layers
-#% type: string
-#% description: Layer(s) to request from the map server
-#% multiple: yes
-#% required: yes
-#%end
-
-#%option
-#% key: styles
-#% type: string
-#% description: Layer style(s) to request from the map server
-#% multiple: yes
-#% guisection: Map style
-#%end
-
-#%option
-#% key: format
-#% type: string
-#% description: Image format requested from the server
-#% options: geotiff,tiff,jpeg,gif,png,png8
-#% answer: png
-#% guisection: Request
-#%end
-
-#%option
-#% key: srs
-#% type: integer
-#% description: EPSG code of requested source projection
-#% answer:4326
-#% guisection: Request
-#%end
-
-#%option
-#% key: driver
-#% type:string
-#% description: Driver used for communication with the server
-#% descriptions: WMS_GDAL;Download data using GDAL WMS driver;WMS_GRASS;Download data using native GRASS-WMS driver;WMTS_GRASS;Download data using native GRASS-WMTS driver;OnEarth_GRASS;Download data using native GRASS-OnEarth driver;
-#% options:WMS_GDAL, WMS_GRASS, WMTS_GRASS, OnEarth_GRASS
-#% answer:WMS_GRASS
-#% guisection: Connection
-#%end
-
-#%option
-#% key: wms_version
-#% type:string
-#% description: WMS standard version
-#% options: 1.1.0,1.1.1,1.3.0
-#% answer: 1.1.1
-#% guisection: Request
-#%end
-
-#%option
-#% key: maxcols
-#% type:integer
-#% description: Maximum columns to request at a time
-#% answer:512
-#% guisection: Request
-#%end
-
-#%option
-#% key: maxrows
-#% type: integer
-#% description: Maximum rows to request at a time
-#% answer: 512
-#% guisection: Request
-#%end
-
-#%option
-#% key: urlparams
-#% type:string
-#% description: Additional query parameters to pass to the server
-#% guisection: Request
-#%end
-
-#%option
-#% key: username
-#% type:string
-#% description: Username for server connection
-#% guisection: Connection
-#%end
-
-#%option
-#% key: password
-#% type:string
-#% description: Password for server connection
-#% guisection: Connection
-#%end
-
-#%option
-#% key: method
-#% type: string
-#% description: Interpolation method to use in reprojection
-#% options:nearest,linear,cubic,cubicspline
-#% answer:nearest
-#% required: no
-#%end
-
-#%option
-#% key: region
-#% type: string
-#% description: Request data for this named region instead of the current region bounds
-#% guisection: Request
-#%end
-
-#%option
-#% key: bgcolor
-#% type: string
-#% label: Background color
-#% description: Format: 0xRRGGBB
-#% guisection: Map style
-#%end
-
-#%option
-#% key: proxy
-#% label: HTTP proxy only GDAL driver (GDAL_HTTP_PROXY)
-#% type: string
-#% description: HTTP proxy
-#%end
-
-#%option
-#% key: proxy_user_pw
-#% label: User and password for HTTP proxy only for GDAL driver (GDAL_HTTP_PROXYUSERPWD). Must be in the form of [user name]:[password].
-#% type: string
-#% description: User and password for HTTP proxy
-#%end
-
-#%option G_OPT_F_BIN_INPUT
-#% key: capfile
-#% required: no
-#% description: Capabilities file to parse (input). It is relevant for WMTS_GRASS and OnEarth_GRASS drivers
-#%end
-
-#%option G_OPT_F_OUTPUT
-#% key: capfile_output
-#% required: no
-#% description: File where the server capabilities will be saved ('c' flag)
-#%end
-
-#%flag
-#% key: c
-#% description: Get the server capabilities, print them out, then exit
-#% guisection: Request
-#% suppress_required: yes
-#%end
-
-#%flag
-#% key: o
-#% description: Do not request transparent data
-#% guisection: Map style
-#%end
-
-#%flag
-#% key: b
-#% description: Keep original bands (default: create composite)
-#% guisection: Map style
-#%end
-
-#%rules
-#% exclusive: capfile_output, capfile
-#%end
+# %module
+# % description: Downloads and imports data from OGC WMS and OGC WMTS web mapping servers.
+# % keyword: raster
+# % keyword: import
+# % keyword: OGC web services
+# % keyword: OGC WMS
+# % keyword: OGC WMTS
+# %end
+
+# %option
+# % key: url
+# % type: string
+# % description: Typically starts with "http://"
+# % required: yes
+# %end
+
+# %option G_OPT_R_OUTPUT
+# % description: Name for output raster map
+# %end
+
+# %option
+# % key: layers
+# % type: string
+# % description: Layer(s) to request from the map server
+# % multiple: yes
+# % required: yes
+# %end
+
+# %option
+# % key: styles
+# % type: string
+# % description: Layer style(s) to request from the map server
+# % multiple: yes
+# % guisection: Map style
+# %end
+
+# %option
+# % key: format
+# % type: string
+# % description: Image format requested from the server
+# % options: geotiff,tiff,jpeg,gif,png,png8
+# % answer: png
+# % guisection: Request
+# %end
+
+# %option
+# % key: srs
+# % type: integer
+# % description: EPSG code of requested source projection
+# % answer:4326
+# % guisection: Request
+# %end
+
+# %option
+# % key: driver
+# % type:string
+# % description: Driver used for communication with the server
+# % descriptions: WMS_GDAL;Download data using GDAL WMS driver;WMS_GRASS;Download data using native GRASS-WMS driver;WMTS_GRASS;Download data using native GRASS-WMTS driver;OnEarth_GRASS;Download data using native GRASS-OnEarth driver;
+# % options:WMS_GDAL, WMS_GRASS, WMTS_GRASS, OnEarth_GRASS
+# % answer:WMS_GRASS
+# % guisection: Connection
+# %end
+
+# %option
+# % key: wms_version
+# % type:string
+# % description: WMS standard version
+# % options: 1.1.0,1.1.1,1.3.0
+# % answer: 1.1.1
+# % guisection: Request
+# %end
+
+# %option
+# % key: maxcols
+# % type:integer
+# % description: Maximum columns to request at a time
+# % answer:512
+# % guisection: Request
+# %end
+
+# %option
+# % key: maxrows
+# % type: integer
+# % description: Maximum rows to request at a time
+# % answer: 512
+# % guisection: Request
+# %end
+
+# %option
+# % key: urlparams
+# % type:string
+# % description: Additional query parameters to pass to the server
+# % guisection: Request
+# %end
+
+# %option
+# % key: username
+# % type:string
+# % description: Username for server connection
+# % guisection: Connection
+# %end
+
+# %option
+# % key: password
+# % type:string
+# % description: Password for server connection
+# % guisection: Connection
+# %end
+
+# %option
+# % key: method
+# % type: string
+# % description: Interpolation method to use in reprojection
+# % options:nearest,linear,cubic,cubicspline
+# % answer:nearest
+# % required: no
+# %end
+
+# %option
+# % key: region
+# % type: string
+# % description: Request data for this named region instead of the current region bounds
+# % guisection: Request
+# %end
+
+# %option
+# % key: bgcolor
+# % type: string
+# % label: Background color
+# % description: Format: 0xRRGGBB
+# % guisection: Map style
+# %end
+
+# %option
+# % key: proxy
+# % label: HTTP proxy only GDAL driver (GDAL_HTTP_PROXY)
+# % type: string
+# % description: HTTP proxy
+# %end
+
+# %option
+# % key: proxy_user_pw
+# % label: User and password for HTTP proxy only for GDAL driver (GDAL_HTTP_PROXYUSERPWD). Must be in the form of [user name]:[password].
+# % type: string
+# % description: User and password for HTTP proxy
+# %end
+
+# %option G_OPT_F_BIN_INPUT
+# % key: capfile
+# % required: no
+# % description: Capabilities file to parse (input). It is relevant for WMTS_GRASS and OnEarth_GRASS drivers
+# %end
+
+# %option G_OPT_F_OUTPUT
+# % key: capfile_output
+# % required: no
+# % description: File where the server capabilities will be saved ('c' flag)
+# %end
+
+# %flag
+# % key: c
+# % description: Get the server capabilities, print them out, then exit
+# % guisection: Request
+# % suppress_required: yes
+# %end
+
+# %flag
+# % key: o
+# % description: Do not request transparent data
+# % guisection: Map style
+# %end
+
+# %flag
+# % key: b
+# % description: Keep original bands (default: create composite)
+# % guisection: Map style
+# %end
+
+# %rules
+# % exclusive: capfile_output, capfile
+# %end
 
 
 import os
 import os
 import sys
 import sys

+ 72 - 72
scripts/r.mapcalc.simple/r.mapcalc.simple.py

@@ -17,78 +17,78 @@ License (>=v2). Read the file COPYING that comes with GRASS
 for details.
 for details.
 """
 """
 
 
-#%module
-#% description: Calculates a new raster map from a simple r.mapcalc expression.
-#% keyword: raster
-#% keyword: algebra
-#% keyword: simple
-#%end
-#%option
-#% key: expression
-#% type: string
-#% description: Formula (e.g. A-B or A*C+B)
-#% required : yes
-#%end
-#%option G_OPT_R_INPUT
-#% key: a
-#% description: Name of input A raster map
-#% required : no
-#% guisection: Input maps
-#%end
-#%option G_OPT_R_INPUT
-#% key: b
-#% description: Name of input B raster map
-#% required : no
-#% guisection: Input maps
-#%end
-#%option G_OPT_R_INPUT
-#% key: c
-#% description: Name of input C raster map
-#% required : no
-#% guisection: Input maps
-#%end
-#%option G_OPT_R_INPUT
-#% key: d
-#% description: Name of input D raster map
-#% required : no
-#% guisection: Input maps
-#%end
-#%option G_OPT_R_INPUT
-#% key: e
-#% description: Name of input E raster map
-#% required : no
-#% guisection: Input maps
-#%end
-#%option G_OPT_R_INPUT
-#% key: f
-#% description: Name of input F raster map
-#% required : no
-#% guisection: Input maps
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
-#%option
-#% key: seed
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Seed for rand() function
-#% guisection: Random
-#%end
-#%flag
-#% key: s
-#% description: Generate random seed (result is non-deterministic)
-#% guisection: Random
-#%end
-#%flag
-#% key: q
-#% description: Quote the map names
-#% guisection: Input maps
-#%end
-#%flag
-#% key: c
-#% description: Case sensitive variable names
-#%end
+# %module
+# % description: Calculates a new raster map from a simple r.mapcalc expression.
+# % keyword: raster
+# % keyword: algebra
+# % keyword: simple
+# %end
+# %option
+# % key: expression
+# % type: string
+# % description: Formula (e.g. A-B or A*C+B)
+# % required : yes
+# %end
+# %option G_OPT_R_INPUT
+# % key: a
+# % description: Name of input A raster map
+# % required : no
+# % guisection: Input maps
+# %end
+# %option G_OPT_R_INPUT
+# % key: b
+# % description: Name of input B raster map
+# % required : no
+# % guisection: Input maps
+# %end
+# %option G_OPT_R_INPUT
+# % key: c
+# % description: Name of input C raster map
+# % required : no
+# % guisection: Input maps
+# %end
+# %option G_OPT_R_INPUT
+# % key: d
+# % description: Name of input D raster map
+# % required : no
+# % guisection: Input maps
+# %end
+# %option G_OPT_R_INPUT
+# % key: e
+# % description: Name of input E raster map
+# % required : no
+# % guisection: Input maps
+# %end
+# %option G_OPT_R_INPUT
+# % key: f
+# % description: Name of input F raster map
+# % required : no
+# % guisection: Input maps
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
+# %option
+# % key: seed
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Seed for rand() function
+# % guisection: Random
+# %end
+# %flag
+# % key: s
+# % description: Generate random seed (result is non-deterministic)
+# % guisection: Random
+# %end
+# %flag
+# % key: q
+# % description: Quote the map names
+# % guisection: Input maps
+# %end
+# %flag
+# % key: c
+# % description: Case sensitive variable names
+# %end
 
 
 import sys
 import sys
 import re
 import re

+ 51 - 51
scripts/r.mask/r.mask.py

@@ -16,57 +16,57 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Creates a MASK for limiting raster operation.
-#% keyword: raster
-#% keyword: mask
-#% keyword: null data
-#% keyword: no-data
-#% overwrite: yes
-#%end
-#%option G_OPT_R_INPUT
-#% key: raster
-#% description: Name of raster map to use as mask
-#% required: NO
-#% guisection: Raster
-#%end
-#%option
-#% key: maskcats
-#% type: string
-#% label: Raster values to use for mask
-#% description: Format: 1 2 3 thru 7 *
-#% answer: *
-#% guisection: Raster
-#%end
-#%option G_OPT_V_INPUT
-#% key: vector
-#% label: Name of vector map to use as mask
-#% required: NO
-#% guisection: Vector
-#%end
-#%option G_OPT_V_FIELD
-#% label: Layer number or name (vector)
-#% required: NO
-#% guisection: Vector
-#%end
-#%option G_OPT_V_CATS
-#% label: Category values (vector)
-#% guisection: Vector
-#%end
-#%option G_OPT_DB_WHERE
-#% label: WHERE conditions of SQL statement without 'where' keyword (vector)
-#% guisection: Vector
-#%end
-#%flag
-#% key: i
-#% description: Create inverse mask
-#% guisection: Create
-#%end
-#%flag
-#% key: r
-#% description: Remove existing mask (overrides other options)
-#% guisection: Remove
-#%end
+# %module
+# % description: Creates a MASK for limiting raster operation.
+# % keyword: raster
+# % keyword: mask
+# % keyword: null data
+# % keyword: no-data
+# % overwrite: yes
+# %end
+# %option G_OPT_R_INPUT
+# % key: raster
+# % description: Name of raster map to use as mask
+# % required: NO
+# % guisection: Raster
+# %end
+# %option
+# % key: maskcats
+# % type: string
+# % label: Raster values to use for mask
+# % description: Format: 1 2 3 thru 7 *
+# % answer: *
+# % guisection: Raster
+# %end
+# %option G_OPT_V_INPUT
+# % key: vector
+# % label: Name of vector map to use as mask
+# % required: NO
+# % guisection: Vector
+# %end
+# %option G_OPT_V_FIELD
+# % label: Layer number or name (vector)
+# % required: NO
+# % guisection: Vector
+# %end
+# %option G_OPT_V_CATS
+# % label: Category values (vector)
+# % guisection: Vector
+# %end
+# %option G_OPT_DB_WHERE
+# % label: WHERE conditions of SQL statement without 'where' keyword (vector)
+# % guisection: Vector
+# %end
+# %flag
+# % key: i
+# % description: Create inverse mask
+# % guisection: Create
+# %end
+# %flag
+# % key: r
+# % description: Remove existing mask (overrides other options)
+# % guisection: Remove
+# %end
 
 
 import os
 import os
 import sys
 import sys

+ 21 - 21
scripts/r.out.xyz/r.out.xyz.py

@@ -16,27 +16,27 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Exports a raster map to a text file as x,y,z values based on cell centers.
-#% keyword: raster
-#% keyword: export
-#% keyword: output
-#% keyword: ASCII
-#% keyword: conversion
-#%end
-#%option G_OPT_R_INPUTS
-#% multiple: yes
-#%end
-#%option G_OPT_F_OUTPUT
-#% description: Name for output file (if omitted or "-" output to stdout)
-#% required: no
-#%end
-#%option G_OPT_F_SEP
-#%end
-#%flag
-#% key: i
-#% description: Include no data values
-#%end
+# %module
+# % description: Exports a raster map to a text file as x,y,z values based on cell centers.
+# % keyword: raster
+# % keyword: export
+# % keyword: output
+# % keyword: ASCII
+# % keyword: conversion
+# %end
+# %option G_OPT_R_INPUTS
+# % multiple: yes
+# %end
+# %option G_OPT_F_OUTPUT
+# % description: Name for output file (if omitted or "-" output to stdout)
+# % required: no
+# %end
+# %option G_OPT_F_SEP
+# %end
+# %flag
+# % key: i
+# % description: Include no data values
+# %end
 
 
 import sys
 import sys
 from grass.script import core as grass
 from grass.script import core as grass

+ 17 - 17
scripts/r.pack/r.pack.py

@@ -13,23 +13,23 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Exports a raster map as GRASS GIS specific archive file
-#% keyword: raster
-#% keyword: export
-#% keyword: copying
-#%end
-#%option G_OPT_R_INPUT
-#% description: Name of raster map to pack up
-#%end
-#%option G_OPT_F_OUTPUT
-#% description: Name for output file (default is <input>.pack)
-#% required : no
-#%end
-#%flag
-#% key: c
-#% description: Switch the compression off
-#%end
+# %module
+# % description: Exports a raster map as GRASS GIS specific archive file
+# % keyword: raster
+# % keyword: export
+# % keyword: copying
+# %end
+# %option G_OPT_R_INPUT
+# % description: Name of raster map to pack up
+# %end
+# %option G_OPT_F_OUTPUT
+# % description: Name for output file (default is <input>.pack)
+# % required : no
+# %end
+# %flag
+# % key: c
+# % description: Switch the compression off
+# %end
 
 
 import os
 import os
 import sys
 import sys

+ 45 - 45
scripts/r.plane/r.plane.py

@@ -17,51 +17,51 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Creates raster plane map given dip (inclination), aspect (azimuth) and one point.
-#% keyword: raster
-#% keyword: elevation
-#%end
-#%option G_OPT_R_OUTPUT
-#%end
-#%option
-#% key: dip
-#% type: double
-#% gisprompt: -90-90
-#% answer: 0.0
-#% description: Dip of plane in degrees
-#% required : yes
-#%end
-#%option
-#% key: azimuth
-#% type: double
-#% gisprompt: 0-360
-#% answer: 0.0
-#% description: Azimuth of the plane in degrees
-#% required : yes
-#%end
-#%option
-#% key: easting
-#% type: double
-#% description: Easting coordinate of a point on the plane
-#% required : yes
-#%end
-#%option
-#% key: northing
-#% type: double
-#% description: Northing coordinate of a point on the plane
-#% required : yes
-#%end
-#%option
-#% key: elevation
-#% type: double
-#% description: Elevation coordinate of a point on the plane
-#% required : yes
-#%end
-#%option G_OPT_R_TYPE
-#% answer: FCELL
-#% required: no
-#%end
+# %module
+# % description: Creates raster plane map given dip (inclination), aspect (azimuth) and one point.
+# % keyword: raster
+# % keyword: elevation
+# %end
+# %option G_OPT_R_OUTPUT
+# %end
+# %option
+# % key: dip
+# % type: double
+# % gisprompt: -90-90
+# % answer: 0.0
+# % description: Dip of plane in degrees
+# % required : yes
+# %end
+# %option
+# % key: azimuth
+# % type: double
+# % gisprompt: 0-360
+# % answer: 0.0
+# % description: Azimuth of the plane in degrees
+# % required : yes
+# %end
+# %option
+# % key: easting
+# % type: double
+# % description: Easting coordinate of a point on the plane
+# % required : yes
+# %end
+# %option
+# % key: northing
+# % type: double
+# % description: Northing coordinate of a point on the plane
+# % required : yes
+# %end
+# %option
+# % key: elevation
+# % type: double
+# % description: Elevation coordinate of a point on the plane
+# % required : yes
+# %end
+# %option G_OPT_R_TYPE
+# % answer: FCELL
+# % required: no
+# %end
 
 
 import math
 import math
 import string
 import string

+ 48 - 48
scripts/r.reclass.area/r.reclass.area.py

@@ -23,54 +23,54 @@
 # 2000: updated to GRASS 5
 # 2000: updated to GRASS 5
 # 1998 from NRCS, slightly modified for GRASS 4.2.1
 # 1998 from NRCS, slightly modified for GRASS 4.2.1
 
 
-#%module
-#% description: Reclasses a raster map greater or less than user specified area size (in hectares).
-#% keyword: raster
-#% keyword: statistics
-#% keyword: aggregation
-#%end
-
-#%option G_OPT_R_INPUT
-#%end
-
-#%option G_OPT_R_OUTPUT
-#%end
-
-#%option
-#% key: value
-#% type: double
-#% description: Value option that sets the area size limit (in hectares)
-#% required: yes
-#% guisection: Area
-#%end
-
-#%option
-#% key: mode
-#% type: string
-#% description: Lesser or greater than specified value
-#% options: lesser,greater
-#% required: yes
-#% guisection: Area
-#%end
-
-#%option
-#% key: method
-#% type: string
-#% description: Method used for reclassification
-#% options: reclass,rmarea
-#% answer: reclass
-#% guisection: Area
-#%end
-
-#%flag
-#% key: c
-#% description: Input map is clumped
-#%end
-
-#%flag
-#% key: d
-#% description: Clumps including diagonal neighbors
-#%end
+# %module
+# % description: Reclasses a raster map greater or less than user specified area size (in hectares).
+# % keyword: raster
+# % keyword: statistics
+# % keyword: aggregation
+# %end
+
+# %option G_OPT_R_INPUT
+# %end
+
+# %option G_OPT_R_OUTPUT
+# %end
+
+# %option
+# % key: value
+# % type: double
+# % description: Value option that sets the area size limit (in hectares)
+# % required: yes
+# % guisection: Area
+# %end
+
+# %option
+# % key: mode
+# % type: string
+# % description: Lesser or greater than specified value
+# % options: lesser,greater
+# % required: yes
+# % guisection: Area
+# %end
+
+# %option
+# % key: method
+# % type: string
+# % description: Method used for reclassification
+# % options: reclass,rmarea
+# % answer: reclass
+# % guisection: Area
+# %end
+
+# %flag
+# % key: c
+# % description: Input map is clumped
+# %end
+
+# %flag
+# % key: d
+# % description: Clumps including diagonal neighbors
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 27 - 27
scripts/r.rgb/r.rgb.py

@@ -13,33 +13,33 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Splits a raster map into red, green and blue maps.
-#% keyword: raster
-#% keyword: RGB
-#% keyword: separate
-#% keyword: split
-#%end
-#%option G_OPT_R_INPUT
-#%end
-#%option G_OPT_R_OUTPUT
-#% key: red
-#% description: Red channel raster map name
-#% required: no
-#%end
-#%option G_OPT_R_OUTPUT
-#% key: green
-#% description: Green channel raster map name
-#% required: no
-#%end
-#%option G_OPT_R_OUTPUT
-#% key: blue
-#% description: Blue channel raster map name
-#% required: no
-#%end
-#%rules
-#% required: red, green, blue
-#%end
+# %module
+# % description: Splits a raster map into red, green and blue maps.
+# % keyword: raster
+# % keyword: RGB
+# % keyword: separate
+# % keyword: split
+# %end
+# %option G_OPT_R_INPUT
+# %end
+# %option G_OPT_R_OUTPUT
+# % key: red
+# % description: Red channel raster map name
+# % required: no
+# %end
+# %option G_OPT_R_OUTPUT
+# % key: green
+# % description: Green channel raster map name
+# % required: no
+# %end
+# %option G_OPT_R_OUTPUT
+# % key: blue
+# % description: Blue channel raster map name
+# % required: no
+# %end
+# %rules
+# % required: red, green, blue
+# %end
 
 
 import grass.script as gscript
 import grass.script as gscript
 
 

+ 42 - 42
scripts/r.shade/r.shade.py

@@ -15,48 +15,48 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Drapes a color raster over an shaded relief or aspect map.
-#% keyword: raster
-#% keyword: elevation
-#% keyword: relief
-#% keyword: hillshade
-#% keyword: visualization
-#%end
-#%option G_OPT_R_INPUT
-#% key: shade
-#% description: Name of shaded relief or aspect raster map
-#%end
-#%option G_OPT_R_INPUT
-#% key: color
-#% label: Name of raster to drape over relief raster map
-#% description: Typically, this raster is elevation or other colorful raster
-#%end
-#%option G_OPT_R_OUTPUT
-#% description: Name of shaded raster map
-#%end
-#%option
-#% key: brighten
-#% type: integer
-#% description: Percent to brighten
-#% options: -99-99
-#% answer: 0
-#%end
-#%option
-#% key: bgcolor
-#% type: string
-#% key_desc: name
-#% label: Color to use instead of NULL values
-#% description: Either a standard color name, R:G:B triplet, or "none"
-#% gisprompt: old,color_none,color
-#%end
-#%flag
-#% key: c
-#% description: Use colors from color tables for NULL values
-#%end
-#%rules
-#% exclusive: bgcolor, -c
-#%end
+# %module
+# % description: Drapes a color raster over an shaded relief or aspect map.
+# % keyword: raster
+# % keyword: elevation
+# % keyword: relief
+# % keyword: hillshade
+# % keyword: visualization
+# %end
+# %option G_OPT_R_INPUT
+# % key: shade
+# % description: Name of shaded relief or aspect raster map
+# %end
+# %option G_OPT_R_INPUT
+# % key: color
+# % label: Name of raster to drape over relief raster map
+# % description: Typically, this raster is elevation or other colorful raster
+# %end
+# %option G_OPT_R_OUTPUT
+# % description: Name of shaded raster map
+# %end
+# %option
+# % key: brighten
+# % type: integer
+# % description: Percent to brighten
+# % options: -99-99
+# % answer: 0
+# %end
+# %option
+# % key: bgcolor
+# % type: string
+# % key_desc: name
+# % label: Color to use instead of NULL values
+# % description: Either a standard color name, R:G:B triplet, or "none"
+# % gisprompt: old,color_none,color
+# %end
+# %flag
+# % key: c
+# % description: Use colors from color tables for NULL values
+# %end
+# %rules
+# % exclusive: bgcolor, -c
+# %end
 
 
 # TODO: bgcolor is not using standard option because it has default white
 # TODO: bgcolor is not using standard option because it has default white
 # using `answer:` will cause `default:` which is not the same as no default
 # using `answer:` will cause `default:` which is not the same as no default

+ 63 - 63
scripts/r.tileset/r.tileset.py

@@ -35,69 +35,69 @@
 #    presenting data in a highly inappropriate projection. Do you really
 #    presenting data in a highly inappropriate projection. Do you really
 #    want their data?
 #    want their data?
 
 
-#%module
-#% description: Produces tilings of the source projection for use in the destination region and projection.
-#% keyword: raster
-#% keyword: tiling
-#%end
-#%flag
-#% key: g
-#% description: Produces shell script output
-#%end
-#%flag
-#% key: w
-#% description: Produces web map server query string output
-#%end
-#%option
-#% key: region
-#% type: string
-#% description: Name of region to use instead of current region for bounds and resolution
-#%end
-#%option
-#% key: sourceproj
-#% type: string
-#% description: Source projection
-#% required : yes
-#%end
-#%option
-#% key: sourcescale
-#% type: string
-#% description: Conversion factor from units to meters in source projection
-#% answer : 1
-#%end
-#%option
-#% key: destproj
-#% type: string
-#% description: Destination projection, defaults to this location's projection
-#% required : no
-#%end
-#%option
-#% key: destscale
-#% type: string
-#% description: Conversion factor from units to meters in source projection
-#% required : no
-#%end
-#%option
-#% key: maxcols
-#% type: integer
-#% description: Maximum number of columns for a tile in the source projection
-#% answer: 1024
-#%end
-#%option
-#% key: maxrows
-#% type: integer
-#% description: Maximum number of rows for a tile in the source projection
-#% answer: 1024
-#%end
-#%option
-#% key: overlap
-#% type: integer
-#% description: Number of cells tiles should overlap in each direction
-#% answer: 0
-#%end
-#%option G_OPT_F_SEP
-#% description: Output field separator
-#%end
+# %module
+# % description: Produces tilings of the source projection for use in the destination region and projection.
+# % keyword: raster
+# % keyword: tiling
+# %end
+# %flag
+# % key: g
+# % description: Produces shell script output
+# %end
+# %flag
+# % key: w
+# % description: Produces web map server query string output
+# %end
+# %option
+# % key: region
+# % type: string
+# % description: Name of region to use instead of current region for bounds and resolution
+# %end
+# %option
+# % key: sourceproj
+# % type: string
+# % description: Source projection
+# % required : yes
+# %end
+# %option
+# % key: sourcescale
+# % type: string
+# % description: Conversion factor from units to meters in source projection
+# % answer : 1
+# %end
+# %option
+# % key: destproj
+# % type: string
+# % description: Destination projection, defaults to this location's projection
+# % required : no
+# %end
+# %option
+# % key: destscale
+# % type: string
+# % description: Conversion factor from units to meters in source projection
+# % required : no
+# %end
+# %option
+# % key: maxcols
+# % type: integer
+# % description: Maximum number of columns for a tile in the source projection
+# % answer: 1024
+# %end
+# %option
+# % key: maxrows
+# % type: integer
+# % description: Maximum number of rows for a tile in the source projection
+# % answer: 1024
+# %end
+# %option
+# % key: overlap
+# % type: integer
+# % description: Number of cells tiles should overlap in each direction
+# % answer: 0
+# %end
+# %option G_OPT_F_SEP
+# % description: Output field separator
+# %end
 
 
 # Data structures used in this program:
 # Data structures used in this program:
 # A bounding box:
 # A bounding box:

+ 26 - 26
scripts/r.unpack/r.unpack.py

@@ -13,32 +13,32 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map
-#% keyword: raster
-#% keyword: import
-#% keyword: copying
-#%end
-#%option G_OPT_F_BIN_INPUT
-#% description: Name of input pack file
-#% key_desc: name.pack
-#%end
-#%option G_OPT_R_OUTPUT
-#% description: Name for output raster map (default: taken from input file internals)
-#% required: no
-#% guisection: Output settings
-#%end
-#%flag
-#% key: o
-#% label: Override projection check (use current location's projection)
-#% description: Assume that the dataset has same projection as the current location
-#% guisection: Output settings
-#%end
-#%flag
-#% key: p
-#% label: Print projection information of input pack file and exit
-#% guisection: Print
-#%end
+# %module
+# % description: Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map
+# % keyword: raster
+# % keyword: import
+# % keyword: copying
+# %end
+# %option G_OPT_F_BIN_INPUT
+# % description: Name of input pack file
+# % key_desc: name.pack
+# %end
+# %option G_OPT_R_OUTPUT
+# % description: Name for output raster map (default: taken from input file internals)
+# % required: no
+# % guisection: Output settings
+# %end
+# %flag
+# % key: o
+# % label: Override projection check (use current location's projection)
+# % description: Assume that the dataset has same projection as the current location
+# % guisection: Output settings
+# %end
+# %flag
+# % key: p
+# % label: Print projection information of input pack file and exit
+# % guisection: Print
+# %end
 
 
 import os
 import os
 import re
 import re

+ 146 - 146
scripts/r3.in.xyz/r3.in.xyz.py

@@ -20,152 +20,152 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%Module
-#% description: Create a 3D raster map from an assemblage of many coordinates using univariate statistics
-#% keyword: raster3d
-#% keyword: import
-#% keyword: voxel
-#% keyword: LIDAR
-#% keyword: statistics
-#% keyword: conversion
-#% keyword: aggregation
-#% keyword: binning
-#%End
-#%Flag
-#% key: s
-#% description: Scan data file for extent then exit
-#%End
-#%Flag
-#% key: g
-#% description: In scan mode, print using shell script style
-#%End
-#%Flag
-#% key: i
-#% description: Ignore broken lines
-#%End
-#%Option G_OPT_F_INPUT
-#% required: yes
-#% description: ASCII file containing input data
-#%End
-#%Option
-#% key: output
-#% type: string
-#% required: yes
-#% multiple: no
-#% key_desc: name
-#% description: Name for output raster map
-#% gisprompt: new,grid3,3d-raster
-#%End
-#%Option
-#% key: method
-#% type: string
-#% required: no
-#% multiple: no
-#% options: n,min,max,range,sum,mean,stddev,variance,coeff_var,median,percentile,skewness,trimmean
-#% description: Statistic to use for raster values
-#% answer: mean
-#% guisection: Statistic
-#%End
-#%Option
-#% key: type
-#% type: string
-#% required: no
-#% multiple: no
-#% options: float,double
-#% description: Storage type for resultant raster map
-#% answer: float
-#%End
-#%Option G_OPT_F_SEP
-#% guisection: Input
-#%End
-#%Option
-#% key: x
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Column number of x coordinates in input file (first column is 1)
-#% answer: 1
-#% guisection: Input
-#%End
-#%Option
-#% key: y
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Column number of y coordinates in input file
-#% answer: 2
-#% guisection: Input
-#%End
-#%Option
-#% key: z
-#% type: integer
-#% required: no
-#% multiple: no
-#% description: Column number of z coordinates in input file
-#% answer: 3
-#% guisection: Input
-#%End
-#%Option
-#% key: value_column
-#% type: integer
-#% required: no
-#% multiple: no
-#% label: Column number of data values in input file
-#% description: If not given or set to 0, the data points' z-values are used
-#% answer: 0
-#% guisection: Input
-#%End
-#%Option
-#% key: vrange
-#% type: double
-#% required: no
-#% key_desc: min,max
-#% description: Filter range for value column data (min,max)
-#%End
-#%option
-#% key: vscale
-#% type: double
-#% required: no
-#% multiple: no
-#% description: Scaling factor to apply to value column data
-#% answer: 1.0
-#%end
-#%Option
-#% key: percent
-#% type: integer
-#% required: no
-#% multiple: no
-#% options: 1-100
-#% description: Percent of map to keep in memory
-#% answer: 100
-#%End
-#%Option
-#% key: pth
-#% type: integer
-#% required: no
-#% multiple: no
-#% options: 1-100
-#% description: pth percentile of the values
-#% guisection: Statistic
-#%End
-#%Option
-#% key: trim
-#% type: double
-#% required: no
-#% multiple: no
-#% options: 0-50
-#% description: Discard <trim> percent of the smallest and <trim> percent of the largest observations
-#% guisection: Statistic
-#%End
-#%Option
-#% key: workers
-#% type: integer
-#% required: no
-#% multiple: no
-#% options: 1-256
-#% answer: 1
-#% description: Number of parallel processes to launch
-#%End
+# %Module
+# % description: Create a 3D raster map from an assemblage of many coordinates using univariate statistics
+# % keyword: raster3d
+# % keyword: import
+# % keyword: voxel
+# % keyword: LIDAR
+# % keyword: statistics
+# % keyword: conversion
+# % keyword: aggregation
+# % keyword: binning
+# %End
+# %Flag
+# % key: s
+# % description: Scan data file for extent then exit
+# %End
+# %Flag
+# % key: g
+# % description: In scan mode, print using shell script style
+# %End
+# %Flag
+# % key: i
+# % description: Ignore broken lines
+# %End
+# %Option G_OPT_F_INPUT
+# % required: yes
+# % description: ASCII file containing input data
+# %End
+# %Option
+# % key: output
+# % type: string
+# % required: yes
+# % multiple: no
+# % key_desc: name
+# % description: Name for output raster map
+# % gisprompt: new,grid3,3d-raster
+# %End
+# %Option
+# % key: method
+# % type: string
+# % required: no
+# % multiple: no
+# % options: n,min,max,range,sum,mean,stddev,variance,coeff_var,median,percentile,skewness,trimmean
+# % description: Statistic to use for raster values
+# % answer: mean
+# % guisection: Statistic
+# %End
+# %Option
+# % key: type
+# % type: string
+# % required: no
+# % multiple: no
+# % options: float,double
+# % description: Storage type for resultant raster map
+# % answer: float
+# %End
+# %Option G_OPT_F_SEP
+# % guisection: Input
+# %End
+# %Option
+# % key: x
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Column number of x coordinates in input file (first column is 1)
+# % answer: 1
+# % guisection: Input
+# %End
+# %Option
+# % key: y
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Column number of y coordinates in input file
+# % answer: 2
+# % guisection: Input
+# %End
+# %Option
+# % key: z
+# % type: integer
+# % required: no
+# % multiple: no
+# % description: Column number of z coordinates in input file
+# % answer: 3
+# % guisection: Input
+# %End
+# %Option
+# % key: value_column
+# % type: integer
+# % required: no
+# % multiple: no
+# % label: Column number of data values in input file
+# % description: If not given or set to 0, the data points' z-values are used
+# % answer: 0
+# % guisection: Input
+# %End
+# %Option
+# % key: vrange
+# % type: double
+# % required: no
+# % key_desc: min,max
+# % description: Filter range for value column data (min,max)
+# %End
+# %option
+# % key: vscale
+# % type: double
+# % required: no
+# % multiple: no
+# % description: Scaling factor to apply to value column data
+# % answer: 1.0
+# %end
+# %Option
+# % key: percent
+# % type: integer
+# % required: no
+# % multiple: no
+# % options: 1-100
+# % description: Percent of map to keep in memory
+# % answer: 100
+# %End
+# %Option
+# % key: pth
+# % type: integer
+# % required: no
+# % multiple: no
+# % options: 1-100
+# % description: pth percentile of the values
+# % guisection: Statistic
+# %End
+# %Option
+# % key: trim
+# % type: double
+# % required: no
+# % multiple: no
+# % options: 0-50
+# % description: Discard <trim> percent of the smallest and <trim> percent of the largest observations
+# % guisection: Statistic
+# %End
+# %Option
+# % key: workers
+# % type: integer
+# % required: no
+# % multiple: no
+# % options: 1-256
+# % answer: 1
+# % description: Number of parallel processes to launch
+# %End
 
 
 
 
 import sys
 import sys

+ 5 - 5
scripts/v.build.all/v.build.all.py

@@ -12,11 +12,11 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Rebuilds topology on all vector maps in the current mapset.
-#% keyword: vector
-#% keyword: topology
-#%end
+# %module
+# % description: Rebuilds topology on all vector maps in the current mapset.
+# % keyword: vector
+# % keyword: topology
+# %end
 
 
 import sys
 import sys
 from grass.script import core as grass
 from grass.script import core as grass

+ 31 - 31
scripts/v.centroids/v.centroids.py

@@ -11,43 +11,43 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%Module
-#% description: Adds missing centroids to closed boundaries.
-#% keyword: vector
-#% keyword: centroid
-#% keyword: area
-#%End
+# %Module
+# % description: Adds missing centroids to closed boundaries.
+# % keyword: vector
+# % keyword: centroid
+# % keyword: area
+# %End
 
 
-#%option G_OPT_V_INPUT
-#%end
+# %option G_OPT_V_INPUT
+# %end
 
 
-#%option G_OPT_V_OUTPUT
-#%end
+# %option G_OPT_V_OUTPUT
+# %end
 
 
-#%option
-#% key: option
-#% type: string
-#% description: Action to be taken
-#% options: add
-#% answer: add
-#% required: no
-#%end
+# %option
+# % key: option
+# % type: string
+# % description: Action to be taken
+# % options: add
+# % answer: add
+# % required: no
+# %end
 
 
-#%option G_OPT_V_FIELD
-#%end
+# %option G_OPT_V_FIELD
+# %end
 
 
-#%option G_OPT_V_CAT
-#% description: Category number starting value
-#% answer: 1
-#%end
+# %option G_OPT_V_CAT
+# % description: Category number starting value
+# % answer: 1
+# %end
 
 
-#%option
-#% key: step
-#% type: integer
-#% description: Category increment
-#% answer: 1
-#% required: no
-#%end
+# %option
+# % key: step
+# % type: integer
+# % description: Category increment
+# % answer: 1
+# % required: no
+# %end
 
 
 import sys
 import sys
 import grass.script as gscript
 import grass.script as gscript

+ 36 - 36
scripts/v.clip/v.clip.py

@@ -12,45 +12,45 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Extracts features of input map which overlay features of clip map.
-#% keyword: vector
-#% keyword: clip
-#% keyword: area
-#%end
-
-#%option G_OPT_V_INPUT
-#% label: Name of vector map to be clipped
-#% key: input
-#%end
-
-#%option G_OPT_V_INPUT
-#% key: clip
-#% label: Name of clip vector map
-#%end
-
-#%option G_OPT_V_OUTPUT
-#% key: output
-#%end
-
-#%flag
-#% key: d
-#% description: Do not dissolve clip map
-#%end
-
-#%flag
-#% key: r
-#% description: Clip by region
-#% suppress_required: yes
-#% guisection: Region
-#%end
+# %module
+# % description: Extracts features of input map which overlay features of clip map.
+# % keyword: vector
+# % keyword: clip
+# % keyword: area
+# %end
+
+# %option G_OPT_V_INPUT
+# % label: Name of vector map to be clipped
+# % key: input
+# %end
+
+# %option G_OPT_V_INPUT
+# % key: clip
+# % label: Name of clip vector map
+# %end
+
+# %option G_OPT_V_OUTPUT
+# % key: output
+# %end
+
+# %flag
+# % key: d
+# % description: Do not dissolve clip map
+# %end
+
+# %flag
+# % key: r
+# % description: Clip by region
+# % suppress_required: yes
+# % guisection: Region
+# %end
 
 
 # flags -d and -r are mutualy exclusive
 # flags -d and -r are mutualy exclusive
 # with flag -r, suppress_required: yes, but input and output must be defined
 # with flag -r, suppress_required: yes, but input and output must be defined
-#%rules
-#% exclusive: -d, -r
-#% requires_all: -r, input, output
-#%end
+# %rules
+# % exclusive: -d, -r
+# % requires_all: -r, input, output
+# %end
 
 
 import os
 import os
 import sys
 import sys

+ 20 - 20
scripts/v.db.addcolumn/v.db.addcolumn.py

@@ -16,29 +16,29 @@
 #############################################################################
 #############################################################################
 
 
 
 
-#%module
-#% description: Adds one or more columns to the attribute table connected to a given vector map.
-#% keyword: vector
-#% keyword: attribute table
-#% keyword: database
-#%end
+# %module
+# % description: Adds one or more columns to the attribute table connected to a given vector map.
+# % keyword: vector
+# % keyword: attribute table
+# % keyword: database
+# %end
 
 
-#%option G_OPT_V_MAP
-#%end
+# %option G_OPT_V_MAP
+# %end
 
 
-#%option G_OPT_V_FIELD
-#% label: Layer number where to add column(s)
-#%end
+# %option G_OPT_V_FIELD
+# % label: Layer number where to add column(s)
+# %end
 
 
-#%option
-#% key: columns
-#% type: string
-#% label: Name and type of the new column(s) ('name type [,name type, ...]')
-#% description: Types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE. Example: 'label varchar(250), value integer'
-#% required: yes
-#% multiple: yes
-#% key_desc: name type
-#%end
+# %option
+# % key: columns
+# % type: string
+# % label: Name and type of the new column(s) ('name type [,name type, ...]')
+# % description: Types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE. Example: 'label varchar(250), value integer'
+# % required: yes
+# % multiple: yes
+# % key_desc: name type
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 36 - 36
scripts/v.db.addtable/v.db.addtable.py

@@ -16,42 +16,42 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Creates and connects a new attribute table to a given layer of an existing vector map.
-#% keyword: vector
-#% keyword: attribute table
-#% keyword: database
-#%end
-#%option G_OPT_V_MAP
-#%end
-#%option
-#% key: table
-#% type: string
-#% description: Name of new attribute table (default: vector map name)
-#% required: no
-#% guisection: Definition
-#%end
-#%option
-#% key: layer
-#% type: integer
-#% description: Layer number where to add new attribute table
-#% answer: 1
-#% required: no
-#% guisection: Definition
-#%end
-#%option G_OPT_DB_KEYCOLUMN
-#% guisection: Definition
-#%end
-#%option
-#% key: columns
-#% type: string
-#% label: Name and type of the new column(s) ('name type [,name type, ...]')
-#% description: Types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE. Example: 'label varchar(250), value integer'
-#% required: no
-#% multiple: yes
-#% key_desc: name type
-#% guisection: Definition
-#%end
+# %module
+# % description: Creates and connects a new attribute table to a given layer of an existing vector map.
+# % keyword: vector
+# % keyword: attribute table
+# % keyword: database
+# %end
+# %option G_OPT_V_MAP
+# %end
+# %option
+# % key: table
+# % type: string
+# % description: Name of new attribute table (default: vector map name)
+# % required: no
+# % guisection: Definition
+# %end
+# %option
+# % key: layer
+# % type: integer
+# % description: Layer number where to add new attribute table
+# % answer: 1
+# % required: no
+# % guisection: Definition
+# %end
+# %option G_OPT_DB_KEYCOLUMN
+# % guisection: Definition
+# %end
+# %option
+# % key: columns
+# % type: string
+# % label: Name and type of the new column(s) ('name type [,name type, ...]')
+# % description: Types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE. Example: 'label varchar(250), value integer'
+# % required: no
+# % multiple: yes
+# % key_desc: name type
+# % guisection: Definition
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 18 - 18
scripts/v.db.dropcolumn/v.db.dropcolumn.py

@@ -18,24 +18,24 @@
 #############################################################################
 #############################################################################
 
 
 
 
-#%module
-#% description: Drops a column from the attribute table connected to a given vector map.
-#% keyword: vector
-#% keyword: attribute table
-#% keyword: database
-#%end
-
-#%option G_OPT_V_MAP
-#% key: map
-#%end
-
-#%option G_OPT_V_FIELD
-#%end
-
-#%option G_OPT_DB_COLUMNS
-#% description: Name of attribute column(s) to drop
-#% required: yes
-#%end
+# %module
+# % description: Drops a column from the attribute table connected to a given vector map.
+# % keyword: vector
+# % keyword: attribute table
+# % keyword: database
+# %end
+
+# %option G_OPT_V_MAP
+# % key: map
+# %end
+
+# %option G_OPT_V_FIELD
+# %end
+
+# %option G_OPT_DB_COLUMNS
+# % description: Name of attribute column(s) to drop
+# % required: yes
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 15 - 15
scripts/v.db.droprow/v.db.droprow.py

@@ -15,25 +15,25 @@
 #############################################################################
 #############################################################################
 
 
 
 
-#%module
-#% description: Removes a vector feature from a vector map through attribute selection.
-#% keyword: vector
-#% keyword: attribute table
-#% keyword: database
-#%end
+# %module
+# % description: Removes a vector feature from a vector map through attribute selection.
+# % keyword: vector
+# % keyword: attribute table
+# % keyword: database
+# %end
 
 
-#%option G_OPT_V_INPUT
-#%end
+# %option G_OPT_V_INPUT
+# %end
 
 
-#%option G_OPT_V_FIELD
-#%end
+# %option G_OPT_V_FIELD
+# %end
 
 
-#%option G_OPT_DB_WHERE
-#% required :yes
-#%end
+# %option G_OPT_DB_WHERE
+# % required :yes
+# %end
 
 
-#%option G_OPT_V_OUTPUT
-#%end
+# %option G_OPT_V_OUTPUT
+# %end
 
 
 import sys
 import sys
 import grass.script as grass
 import grass.script as grass

+ 18 - 18
scripts/v.db.droptable/v.db.droptable.py

@@ -15,24 +15,24 @@
 #############################################################################
 #############################################################################
 
 
 
 
-#%Module
-#% description: Removes existing attribute table of a vector map.
-#% keyword: vector
-#% keyword: attribute table
-#% keyword: database
-#%End
-#%flag
-#% key: f
-#% description: Force removal (required for actual deletion of table)
-#%end
-#%option G_OPT_V_MAP
-#%end
-#%option G_OPT_DB_TABLE
-#% description: Table name (default: vector map name)
-#%end
-#%option G_OPT_V_FIELD
-#% required : no
-#%end
+# %Module
+# % description: Removes existing attribute table of a vector map.
+# % keyword: vector
+# % keyword: attribute table
+# % keyword: database
+# %End
+# %flag
+# % key: f
+# % description: Force removal (required for actual deletion of table)
+# %end
+# %option G_OPT_V_MAP
+# %end
+# %option G_OPT_DB_TABLE
+# % description: Table name (default: vector map name)
+# %end
+# %option G_OPT_V_FIELD
+# % required : no
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 41 - 41
scripts/v.db.join/v.db.join.py

@@ -14,47 +14,47 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Joins a database table to a vector map table.
-#% keyword: vector
-#% keyword: attribute table
-#% keyword: database
-#%end
-
-#%option G_OPT_V_MAP
-#% description: Vector map to which to join other table
-#% guidependency: layer,column
-#%end
-
-#%option G_OPT_V_FIELD
-#% description: Layer where to join
-#% guidependency: column
-#%end
-
-#%option G_OPT_DB_COLUMN
-#% description: Identifier column (e.g.: cat) in the vector table to be used for join
-#% required : yes
-#%end
-
-#%option G_OPT_DB_TABLE
-#% key: other_table
-#% description: Other table name
-#% required: yes
-#% guidependency: ocolumn,scolumns
-#%end
-
-#%option G_OPT_DB_COLUMN
-#% key: other_column
-#% description: Identifier column (e.g.: id) in the other table used for join
-#% required: yes
-#%end
-
-#%option G_OPT_DB_COLUMN
-#% key: subset_columns
-#% multiple: yes
-#% required: no
-#% description: Subset of columns from the other table
-#%end
+# %module
+# % description: Joins a database table to a vector map table.
+# % keyword: vector
+# % keyword: attribute table
+# % keyword: database
+# %end
+
+# %option G_OPT_V_MAP
+# % description: Vector map to which to join other table
+# % guidependency: layer,column
+# %end
+
+# %option G_OPT_V_FIELD
+# % description: Layer where to join
+# % guidependency: column
+# %end
+
+# %option G_OPT_DB_COLUMN
+# % description: Identifier column (e.g.: cat) in the vector table to be used for join
+# % required : yes
+# %end
+
+# %option G_OPT_DB_TABLE
+# % key: other_table
+# % description: Other table name
+# % required: yes
+# % guidependency: ocolumn,scolumns
+# %end
+
+# %option G_OPT_DB_COLUMN
+# % key: other_column
+# % description: Identifier column (e.g.: id) in the other table used for join
+# % required: yes
+# %end
+
+# %option G_OPT_DB_COLUMN
+# % key: subset_columns
+# % multiple: yes
+# % required: no
+# % description: Subset of columns from the other table
+# %end
 
 
 import sys
 import sys
 import string
 import string

+ 34 - 34
scripts/v.db.reconnect.all/v.db.reconnect.all.py

@@ -14,40 +14,40 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Reconnects attribute tables for all vector maps from the current mapset to a new database.
-#% keyword: vector
-#% keyword: attribute table
-#% keyword: database
-#%end
-#%flag
-#% key: c
-#% description: Copy attribute tables to the target database if not exist
-#%end
-#%flag
-#% key: d
-#% description: Delete attribute tables from the source database
-#%end
-#%option G_OPT_DB_DATABASE
-#% key: old_database
-#% description: Name of source database
-#%end
-#%option G_OPT_DB_SCHEMA
-#% key: old_schema
-#% label: Name of source database schema
-#%end
-#%option
-#% key: new_driver
-#% description: Name for target driver
-#%end
-#%option G_OPT_DB_DATABASE
-#% key: new_database
-#% description: Name for target database
-#%end
-#%option G_OPT_DB_SCHEMA
-#% key: new_schema
-#% label: Name for target database schema
-#%end
+# %module
+# % description: Reconnects attribute tables for all vector maps from the current mapset to a new database.
+# % keyword: vector
+# % keyword: attribute table
+# % keyword: database
+# %end
+# %flag
+# % key: c
+# % description: Copy attribute tables to the target database if not exist
+# %end
+# %flag
+# % key: d
+# % description: Delete attribute tables from the source database
+# %end
+# %option G_OPT_DB_DATABASE
+# % key: old_database
+# % description: Name of source database
+# %end
+# %option G_OPT_DB_SCHEMA
+# % key: old_schema
+# % label: Name of source database schema
+# %end
+# %option
+# % key: new_driver
+# % description: Name for target driver
+# %end
+# %option G_OPT_DB_DATABASE
+# % key: new_database
+# % description: Name for target database
+# %end
+# %option G_OPT_DB_SCHEMA
+# % key: new_schema
+# % label: Name for target database schema
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 19 - 19
scripts/v.db.renamecolumn/v.db.renamecolumn.py

@@ -20,25 +20,25 @@
 #############################################################################
 #############################################################################
 
 
 
 
-#%module
-#% description: Renames a column in the attribute table connected to a given vector map.
-#% keyword: vector
-#% keyword: attribute table
-#% keyword: database
-#% keyword: rename
-#%end
-#%option G_OPT_V_MAP
-#%end
-#%option G_OPT_V_FIELD
-#%end
-#%option
-#% key: column
-#% type: string
-#% description: Old and new name of the column (old,new)
-#% required: yes
-#% multiple: no
-#% key_desc: oldcol,newcol
-#%end
+# %module
+# % description: Renames a column in the attribute table connected to a given vector map.
+# % keyword: vector
+# % keyword: attribute table
+# % keyword: database
+# % keyword: rename
+# %end
+# %option G_OPT_V_MAP
+# %end
+# %option G_OPT_V_FIELD
+# %end
+# %option
+# % key: column
+# % type: string
+# % description: Old and new name of the column (old,new)
+# % required: yes
+# % multiple: no
+# % key_desc: oldcol,newcol
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 34 - 34
scripts/v.db.univar/v.db.univar.py

@@ -16,40 +16,40 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Calculates univariate statistics on selected table column for a GRASS vector map.
-#% keyword: vector
-#% keyword: statistics
-#% keyword: attribute table
-#%end
-#%option G_OPT_V_MAP
-#% required: yes
-#%end
-#%option G_OPT_V_FIELD
-#%end
-#%option G_OPT_DB_COLUMN
-#% description: Name of attribute column on which to calculate statistics (must be numeric)
-#% required: yes
-#%end
-#%option G_OPT_DB_WHERE
-#%end
-#%option
-#% key: percentile
-#% type: double
-#% description: Percentile to calculate (requires extended statistics flag)
-#% required : no
-#% answer: 90
-#% options: 0-100
-#% multiple: yes
-#%end
-#%flag
-#% key: e
-#% description: Extended statistics (quartiles and 90th percentile)
-#%end
-#%flag
-#% key: g
-#% description: Print stats in shell script style
-#%end
+# %module
+# % description: Calculates univariate statistics on selected table column for a GRASS vector map.
+# % keyword: vector
+# % keyword: statistics
+# % keyword: attribute table
+# %end
+# %option G_OPT_V_MAP
+# % required: yes
+# %end
+# %option G_OPT_V_FIELD
+# %end
+# %option G_OPT_DB_COLUMN
+# % description: Name of attribute column on which to calculate statistics (must be numeric)
+# % required: yes
+# %end
+# %option G_OPT_DB_WHERE
+# %end
+# %option
+# % key: percentile
+# % type: double
+# % description: Percentile to calculate (requires extended statistics flag)
+# % required : no
+# % answer: 90
+# % options: 0-100
+# % multiple: yes
+# %end
+# %flag
+# % key: e
+# % description: Extended statistics (quartiles and 90th percentile)
+# %end
+# %flag
+# % key: g
+# % description: Print stats in shell script style
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 36 - 36
scripts/v.db.update/v.db.update.py

@@ -15,42 +15,42 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Updates a column in the attribute table connected to a vector map.
-#% keyword: vector
-#% keyword: attribute table
-#% keyword: database
-#% keyword: attribute update
-#% keyword: type casting
-#%end
-#%option G_OPT_V_MAP
-#%end
-#%option G_OPT_V_FIELD
-#% required: yes
-#%end
-#%option G_OPT_DB_COLUMN
-#% key: column
-#% description: Name of attribute column to update
-#% required: yes
-#%end
-#%option
-#% key: value
-#% type: string
-#% description: Literal value to update the column with
-#% required: no
-#%end
-#%option G_OPT_DB_COLUMN
-#% key: query_column
-#% description: Name of other attribute column to query, can be combination of columns (e.g. co1+col2)
-#%end
-#%option G_OPT_DB_WHERE
-#%end
-#%option G_OPT_F_INPUT
-#% key: sqliteextra
-#% description: Name of SQLite extension file for extra functions (SQLite backend only)
-#% gisprompt: old,bin,file
-#% required: no
-#%end
+# %module
+# % description: Updates a column in the attribute table connected to a vector map.
+# % keyword: vector
+# % keyword: attribute table
+# % keyword: database
+# % keyword: attribute update
+# % keyword: type casting
+# %end
+# %option G_OPT_V_MAP
+# %end
+# %option G_OPT_V_FIELD
+# % required: yes
+# %end
+# %option G_OPT_DB_COLUMN
+# % key: column
+# % description: Name of attribute column to update
+# % required: yes
+# %end
+# %option
+# % key: value
+# % type: string
+# % description: Literal value to update the column with
+# % required: no
+# %end
+# %option G_OPT_DB_COLUMN
+# % key: query_column
+# % description: Name of other attribute column to query, can be combination of columns (e.g. co1+col2)
+# %end
+# %option G_OPT_DB_WHERE
+# %end
+# %option G_OPT_F_INPUT
+# % key: sqliteextra
+# % description: Name of SQLite extension file for extra functions (SQLite backend only)
+# % gisprompt: old,bin,file
+# % required: no
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 18 - 18
scripts/v.dissolve/v.dissolve.py

@@ -15,24 +15,24 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Dissolves boundaries between adjacent areas sharing a common category number or attribute.
-#% keyword: vector
-#% keyword: dissolve
-#% keyword: area
-#% keyword: line
-#%end
-#%option G_OPT_V_INPUT
-#%end
-#%option G_OPT_V_FIELD
-#% label: Layer number or name.
-#% required: no
-#%end
-#%option G_OPT_DB_COLUMN
-#% description: Name of attribute column used to dissolve common boundaries
-#%end
-#%option G_OPT_V_OUTPUT
-#%end
+# %module
+# % description: Dissolves boundaries between adjacent areas sharing a common category number or attribute.
+# % keyword: vector
+# % keyword: dissolve
+# % keyword: area
+# % keyword: line
+# %end
+# %option G_OPT_V_INPUT
+# %end
+# %option G_OPT_V_FIELD
+# % label: Layer number or name.
+# % required: no
+# %end
+# %option G_OPT_DB_COLUMN
+# % description: Name of attribute column used to dissolve common boundaries
+# %end
+# %option G_OPT_V_OUTPUT
+# %end
 import sys
 import sys
 import os
 import os
 import atexit
 import atexit

+ 80 - 80
scripts/v.import/v.import.py

@@ -16,86 +16,86 @@
 #
 #
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Imports vector data into a GRASS vector map using OGR library and reprojects on the fly.
-#% keyword: vector
-#% keyword: import
-#% keyword: projection
-#%end
-#%option
-#% key: input
-#% type: string
-#% required: yes
-#% description: Name of OGR datasource to be imported
-#% gisprompt: old,datasource,datasource
-#% guisection: Input
-#%end
-#%option
-#% key: layer
-#% type: string
-#% multiple: yes
-#% description: OGR layer name. If not given, all available layers are imported
-#% guisection: Input
-#% gisprompt: old,datasource_layer,datasource_layer
-#%end
-#%option G_OPT_V_OUTPUT
-#% description: Name for output vector map (default: input)
-#% required: no
-#% guisection: Output
-#%end
-#%option
-#% key: extent
-#% type: string
-#% options: input,region
-#% answer: input
-#% description: Output vector map extent
-#% descriptions: input;extent of input map;region;extent of current region
-#% guisection: Output
-#%end
-#%option
-#% key: encoding
-#% type: string
-#% label: Encoding value for attribute data
-#% descriptions: Overrides encoding interpretation, useful when importing ESRI Shapefile
-#% guisection: Output
-#%end
-#%option
-#% key: snap
-#% type: double
-#% label: Snapping threshold for boundaries (map units)
-#% description: A suitable threshold is estimated during import
-#% answer: -1
-#% guisection: Output
-#%end
-#%option
-#% key: epsg
-#% type: integer
-#% options: 1-1000000
-#% guisection: Input SRS
-#% description: EPSG projection code
-#%end
-#%option
-#% key: datum_trans
-#% type: integer
-#% options: -1-100
-#% guisection: Input SRS
-#% label: Index number of datum transform parameters
-#% description: -1 to list available datum transform parameters
-#%end
-#%flag
-#% key: f
-#% description: List supported OGR formats and exit
-#% suppress_required: yes
-#%end
-#%flag
-#% key: l
-#% description: List available OGR layers in data source and exit
-#%end
-#%flag
-#% key: o
-#% label: Override projection check (use current location's projection)
-#% description: Assume that the dataset has the same projection as the current location
-#%end
+# %module
+# % description: Imports vector data into a GRASS vector map using OGR library and reprojects on the fly.
+# % keyword: vector
+# % keyword: import
+# % keyword: projection
+# %end
+# %option
+# % key: input
+# % type: string
+# % required: yes
+# % description: Name of OGR datasource to be imported
+# % gisprompt: old,datasource,datasource
+# % guisection: Input
+# %end
+# %option
+# % key: layer
+# % type: string
+# % multiple: yes
+# % description: OGR layer name. If not given, all available layers are imported
+# % guisection: Input
+# % gisprompt: old,datasource_layer,datasource_layer
+# %end
+# %option G_OPT_V_OUTPUT
+# % description: Name for output vector map (default: input)
+# % required: no
+# % guisection: Output
+# %end
+# %option
+# % key: extent
+# % type: string
+# % options: input,region
+# % answer: input
+# % description: Output vector map extent
+# % descriptions: input;extent of input map;region;extent of current region
+# % guisection: Output
+# %end
+# %option
+# % key: encoding
+# % type: string
+# % label: Encoding value for attribute data
+# % descriptions: Overrides encoding interpretation, useful when importing ESRI Shapefile
+# % guisection: Output
+# %end
+# %option
+# % key: snap
+# % type: double
+# % label: Snapping threshold for boundaries (map units)
+# % description: A suitable threshold is estimated during import
+# % answer: -1
+# % guisection: Output
+# %end
+# %option
+# % key: epsg
+# % type: integer
+# % options: 1-1000000
+# % guisection: Input SRS
+# % description: EPSG projection code
+# %end
+# %option
+# % key: datum_trans
+# % type: integer
+# % options: -1-100
+# % guisection: Input SRS
+# % label: Index number of datum transform parameters
+# % description: -1 to list available datum transform parameters
+# %end
+# %flag
+# % key: f
+# % description: List supported OGR formats and exit
+# % suppress_required: yes
+# %end
+# %flag
+# % key: l
+# % description: List available OGR layers in data source and exit
+# %end
+# %flag
+# % key: o
+# % label: Override projection check (use current location's projection)
+# % description: Assume that the dataset has the same projection as the current location
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 16 - 16
scripts/v.in.e00/v.in.e00.py

@@ -21,22 +21,22 @@
 # REQUIREMENTS:
 # REQUIREMENTS:
 #      -  avcimport: http://avce00.maptools.org
 #      -  avcimport: http://avce00.maptools.org
 
 
-#%module
-#% description: Imports E00 file into a vector map.
-#% keyword: vector
-#% keyword: import
-#% keyword: E00
-#%end
-#%option G_OPT_F_BIN_INPUT
-#% description: Name of input E00 file
-#%end
-#%option G_OPT_V_TYPE
-#% options: point,line,area
-#% answer: point
-#% required: yes
-#%end
-#%option G_OPT_V_OUTPUT
-#%end
+# %module
+# % description: Imports E00 file into a vector map.
+# % keyword: vector
+# % keyword: import
+# % keyword: E00
+# %end
+# %option G_OPT_F_BIN_INPUT
+# % description: Name of input E00 file
+# %end
+# %option G_OPT_V_TYPE
+# % options: point,line,area
+# % answer: point
+# % required: yes
+# %end
+# %option G_OPT_V_OUTPUT
+# %end
 
 
 import os
 import os
 import shutil
 import shutil

+ 11 - 11
scripts/v.in.geonames/v.in.geonames.py

@@ -22,17 +22,17 @@
 #       fix spurious char stuff in elevation column
 #       fix spurious char stuff in elevation column
 #############################################################################
 #############################################################################
 
 
-#%module
-#% description: Imports geonames.org country files into a vector points map.
-#% keyword: vector
-#% keyword: import
-#% keyword: gazetteer
-#%end
-#%option G_OPT_F_INPUT
-#% description: Name of uncompressed geonames file (with .txt extension)
-#%end
-#%option G_OPT_V_OUTPUT
-#%end
+# %module
+# % description: Imports geonames.org country files into a vector points map.
+# % keyword: vector
+# % keyword: import
+# % keyword: gazetteer
+# %end
+# %option G_OPT_F_INPUT
+# % description: Name of uncompressed geonames file (with .txt extension)
+# %end
+# %option G_OPT_V_OUTPUT
+# %end
 
 
 import os
 import os
 import sys
 import sys

+ 18 - 18
scripts/v.in.lines/v.in.lines.py

@@ -15,24 +15,24 @@
 #               for details.
 #               for details.
 #
 #
 #############################################################################
 #############################################################################
-#%module
-#% description: Imports ASCII x,y[,z] coordinates as a series of lines.
-#% keyword: vector
-#% keyword: import
-#% keyword: line
-#% keyword: point
-#%end
-#%flag
-#% key: z
-#% description: Create a 3D line from 3 column data
-#%end
-#%option G_OPT_F_INPUT
-#% description: Name of input file (or "-" to read from stdin)
-#%end
-#%option G_OPT_V_OUTPUT
-#%end
-#%option G_OPT_F_SEP
-#%end
+# %module
+# % description: Imports ASCII x,y[,z] coordinates as a series of lines.
+# % keyword: vector
+# % keyword: import
+# % keyword: line
+# % keyword: point
+# %end
+# %flag
+# % key: z
+# % description: Create a 3D line from 3 column data
+# %end
+# %option G_OPT_F_INPUT
+# % description: Name of input file (or "-" to read from stdin)
+# %end
+# %option G_OPT_V_OUTPUT
+# %end
+# %option G_OPT_F_SEP
+# %end
 
 
 import sys
 import sys
 import os
 import os

+ 0 - 0
scripts/v.in.mapgen/v.in.mapgen.py


Vissa filer visades inte eftersom för många filer har ändrats