[GRASS-SVN] r58777 - grass/branches/releasebranch_6_4/general/g.parser

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 25 11:03:32 PST 2014


Author: neteler
Date: 2014-01-25 11:03:32 -0800 (Sat, 25 Jan 2014)
New Revision: 58777

Modified:
   grass/branches/releasebranch_6_4/general/g.parser/description.html
Log:
g.parser manual: update (partial backport of r58759)

Modified: grass/branches/releasebranch_6_4/general/g.parser/description.html
===================================================================
--- grass/branches/releasebranch_6_4/general/g.parser/description.html	2014-01-25 18:47:22 UTC (rev 58776)
+++ grass/branches/releasebranch_6_4/general/g.parser/description.html	2014-01-25 19:03:32 UTC (rev 58777)
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
-<title>g.parser</title>
+<title>GRASS GIS manual: g.parser</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <link rel="stylesheet" href="grassdocs.css" type="text/css">
 </head>
@@ -10,7 +10,8 @@
 <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
 
 <h2>NAME</h2>
-<em><b>g.parser</b></em>
+<em><b>g.parser</b></em> - Provides full parser support for GRASS
+scripts.
 
 <h2>SYNOPSIS</h2>
 <b>g.parser help</b><br>
@@ -21,7 +22,7 @@
 <dt><b>-t</b></dt>
 <dd>Print strings for translation</dd>
 <dt><b>-s</b></dt>
-<dd>Write option values to stdout instead of reinvoking script</dd>
+<dd>Write option values to standard output instead of reinvoking script</dd>
 </dl>
 
 <h2>DESCRIPTION</h2>
@@ -47,12 +48,12 @@
 
 <p>
 If the <b>-s</b> switch is used, the options and flags are written to
-stdout in the form <em>opt_<name>=<value></em> and
+standard output in the form <em>opt_<name>=<value></em> and
 <em>flag_<name>=<value></em>, preceded by the string
 <b>@ARGS_PARSED@</b>. If this string doesn't appear as the first line
-of stdout, it indicates that the script was invoked with a switch such
+of standard output, it indicates that the script was invoked with a switch such
 as <b>--html-description</b>. In this case, the data written by
-<em>g.parser</em> to stdout should be copied to the script's stdout
+<em>g.parser</em> to standard output should be copied to the script's standard output
 verbatim.
 
 <p>
@@ -107,16 +108,16 @@
 <tt>[input=filename]</tt>.
 
 <p>
-If a script is run with --o, G_parser() will
+If a script is run with <b>--o</b>, G_parser() will
 set <tt>GRASS_OVERWRITE=1</tt>, which has the same effect as passing
---o to every module which is run from the script. Similarly, passing
---q or --v will set <tt>GRASS_VERBOSE</tt> to 0 or 3 respectively,
-which has the same effect as passing --q or --v to every module which
-is run from the script.  Rather than checking whether --o, --q or --v
+<b>--o</b> to every module which is run from the script. Similarly, passing
+<b>--q</b> or <b>--v</b> will set <tt>GRASS_VERBOSE</tt> to 0 or 3 respectively,
+which has the same effect as passing <b>--q</b> or <b>--v</b> to every module which
+is run from the script.  Rather than checking whether <b>--o</b>, <b>--q</b> or <b>--v</b>
 were used, you should be checking <tt>GRASS_OVERWRITE</tt> and/or
 <tt>GRASS_VERBOSE</tt> instead. If those variables are set, the
 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.
+by <b>--o</b>, <b>--q</b> or <b>--v</b> being passed to the script or set by other means.
 
 <h2>AUTOMATED SCRIPT CREATION</h2>
 
@@ -170,7 +171,7 @@
 </pre></div>
 
 <em>g.parser</em> will print the text of the translatable options to
-<tt>stdout</tt>, one per line, and exit. This is for internal use within
+standard output, one per line, and exit. This is for internal use within
 the build system to prepare GRASS scripts for translation.
 
 
@@ -180,7 +181,9 @@
 without parameters of flags:
 
 <p>
+<center>
 <img src="g_parser_test.png" alt="Autogenerated GUI window">
+</center>
 
 <h3>Example code for SHELL</h3>
 
@@ -316,6 +319,7 @@
     option1 = options['option1']
     raster = options['raster']
     vector = options['vector']
+
     #### add your code here ####
 
     if flag_f:
@@ -325,10 +329,10 @@
 
     # test if parameter present:
     if option1:
-        print "Value of option1= option: '%s'" % option1
+        print "Value of option1 option: '%s'" % option1
 
-    print "Value of raster= option: '%s'" % raster
-    print "Value of vector= option: '%s'" % vector
+    print "Value of raster option: '%s'" % raster
+    print "Value of vector option: '%s'" % vector
 
     #### end of your code ####
 
@@ -406,7 +410,6 @@
     exit 1;
 }
 
- 
 if( $ARGV[0] ne '@ARGS_PARSED@' ){
     my $arg = "";
     for (my $i=0; $i < @ARGV;$i++) {
@@ -448,7 +451,8 @@
   <a href="g.tempfile.html">g.tempfile</a>
 </em>
 
-and the <tt>SUBMITTING_SCRIPTS</tt> file in the GRASS source code.
+and <a href="http://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/SUBMITTING_PYTHON">SUBMITTING_PYTHON</a>
+file in the GRASS source code.
 <p>
 Related Wiki pages:
 <a href="http://grasswiki.osgeo.org/wiki/Category:Linking_to_other_languages">Using GRASS with other programming languages</a>
@@ -459,5 +463,8 @@
 
 <p>
 <i>Last changed: $Date$</i>
+<hr>
+<p><a href="index.html">Main index</a> | <a href="full_index.html">Full index</a></p>
+<p>© 2003-2014 <a href="http://grass.osgeo.org">GRASS Development Team</a>
 </body>
 </html>



More information about the grass-commit mailing list