Browse Source

further cleaning (merge from devbr6) [test.py prob needs more work]

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38405 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 16 years ago
parent
commit
cf8f1300c4
4 changed files with 33 additions and 18 deletions
  1. 17 2
      general/g.parser/g.parser.html
  2. 5 5
      general/g.parser/test.pl
  3. 5 5
      general/g.parser/test.py
  4. 6 6
      general/g.parser/test.sh

+ 17 - 2
general/g.parser/g.parser.html

@@ -9,9 +9,11 @@
 
 <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
 
+
 <h2>NAME</h2>
 <em><b>g.parser</b></em>
 
+
 <h2>DESCRIPTION</h2>
 
 The <em>g.parser</em> module provides full parser support for GRASS
@@ -19,6 +21,7 @@ scripts, including an auto-generated GUI interface, help page
 template, and command line option checking. In this way a simple
 script can very quickly be made into a full-fledged GRASS module.
 
+
 <h2>OPTIONS</h2>
 
 After parsing the arguments are stored in environment variables for
@@ -52,6 +55,7 @@ Typical header definitions are as follows:
 #%end
 </pre></div>
 
+
 <h2>NOTES</h2>
 
 An option can be instructed to allow multiple inputs by adding the
@@ -95,6 +99,7 @@ were used, you should be checking <tt>GRASS_OVERWRITE</tt> and/or
 script should behave the same way regardless of whether they were set
 by --o, --q or --v being passed to the script or set by other means.
 
+
 <h2>AUTOMATED SCRIPT CREATION</h2>
 
 The flag <b>--script</b> added to a GRASS command, generates shell
@@ -106,24 +111,27 @@ to any GRASS command. Example:
 v.in.db --script
 </pre></div>
 
+
 <h2>Help page template (HTML)</h2>
 
-The flag <b>--html-description</b> added to a GRASS command,
+The flag <b>--html-description</b> added to a GRASS command
 generates a related help page template in HTML. Example:
 
 <div class="code"><pre>
 v.in.db --html-description
 </pre></div>
 
+
 <h2>GUI window parser (XML)</h2>
 
-The flag <b>--interface-description</b> added to a GRASS command,
+The flag <b>--interface-description</b> added to a GRASS command
 generates a related help page template in XML. Example:
 
 <div class="code"><pre>
 v.in.db --interface-description
 </pre></div>
 
+
 <h2>TRANSLATION</h2>
 
 <em>g.parser</em> provides some support for translating the options of
@@ -138,6 +146,7 @@ g.parser -t somescriptfile
 <tt>stdout</tt>, one per line, and exit. This is for internal use within
 the build system to prepare GRASS scripts for translation.
 
+
 <h2>EXAMPLES</h2>
 
 <h3>Example code for SHELL</h3>
@@ -291,6 +300,7 @@ Parameters:
   option1   An option
 </pre></div>
 
+
 <h3>Example code for Perl</h3>
 
 <div class="code"><pre>
@@ -360,6 +370,10 @@ printf ("Value of GIS_OPT_vect: '%s'\n", $ENV{'GIS_OPT_VECTOR'});
 
 </pre></div>
 
+The <tt>test.pl</tt> script will provide a GUI and usage help text similar
+to the other examples above.
+
+
 <h2>SEE ALSO</h2>
 
 <em>
@@ -370,6 +384,7 @@ printf ("Value of GIS_OPT_vect: '%s'\n", $ENV{'GIS_OPT_VECTOR'});
 
 and the <tt>SUBMITTING_SCRIPTS</tt> file in the GRASS source code.
 
+
 <h2>AUTHOR</h2>
 
 Glynn Clements

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

@@ -8,26 +8,26 @@ use strict;
 #%End
 #%flag
 #%  key: f
-#%  description: a flag
-#%END
+#%  description: A flag
+#%end
 #%option
 #% key: raster
 #% type: string
 #% gisprompt: old,cell,raster
-#% description: raster input map
+#% description: Raster input map
 #% required : yes
 #%end
 #%option
 #% key: vector
 #% type: string
 #% gisprompt: old,vector,vector
-#% description: vector input map
+#% description: Vector input map
 #% required : yes
 #%end
 #%option
 #% key: option1
 #% type: string
-#% description: an option
+#% description: An option
 #% required : yes
 #%end
 

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

@@ -11,26 +11,26 @@ import grass.script as grass
 #%End
 #%flag
 #%  key: f
-#%  description: a flag
-#%END
+#%  description: A flag
+#%end
 #%option
 #% key: raster
 #% type: string
 #% gisprompt: old,cell,raster
-#% description: raster input map
+#% description: Raster input map
 #% required : yes
 #%end
 #%option
 #% key: vector
 #% type: string
 #% gisprompt: old,vector,vector
-#% description: vector input map
+#% description: Vector input map
 #% required : yes
 #%end
 #%option
 #% key: option1
 #% type: string
-#% description: an option
+#% description: An option
 #% required : yes
 #%end
 

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

@@ -3,31 +3,31 @@
 # g.parser demo script
 
 #%Module
-#%  description: g.parser test script   
+#%  description: g.parser test script
 #%  keywords: keyword1, keyword2
 #%End
 #%flag
 #%  key: f
-#%  description: a flag
-#%END
+#%  description: A flag
+#%end
 #%option
 #% key: raster
 #% type: string
 #% gisprompt: old,cell,raster
-#% description: raster input map
+#% description: Raster input map
 #% required : yes
 #%end
 #%option
 #% key: vector
 #% type: string
 #% gisprompt: old,vector,vector
-#% description: vector input map
+#% description: Vector input map
 #% required : yes
 #%end
 #%option
 #% key: option1
 #% type: string
-#% description: an option
+#% description: An option
 #% required : yes
 #%end