Changeset 58319
- Timestamp:
- Nov 27, 2013, 12:59:34 PM (11 years ago)
- Location:
- grass/branches/releasebranch_6_4/general/g.parser
- Files:
-
- 1 added
- 3 edited
-
. (modified) (1 prop)
-
Makefile (modified) (1 diff)
-
description.html (modified) (6 diffs)
-
g_parser_test.png (added)
Legend:
- Unmodified
- Added
- Removed
-
grass/branches/releasebranch_6_4/general/g.parser
- Property svn:ignore
-
old new 1 OBJ.* 1 2 *.tmp.html 2 *OBJ*
-
- Property svn:ignore
-
grass/branches/releasebranch_6_4/general/g.parser/Makefile
r45515 r58319 9 9 10 10 default: cmd 11 $(INSTALL_DATA) g_parser_test.png $(HTMLDIR)/g_parser_test.png 11 12 12 #hardcoded here, this is an exeption due to the g.parser specialities: 13 #FIXME: please comment or file bug reports instead of just quietly 14 # bypassing portability problems with a ifneq(). otherwise underlying 15 # problems never get fixed. thanks 13 16 ifneq ($(MSYSTEM),MINGW32) 17 18 # hardcoded here, this is an exeption due to the g.parser specialities: 14 19 htmlcmd: 15 20 $(MAKE) $(HTMLDIR)/$(PGM).html HTMLSRC= 21 16 22 endif -
grass/branches/releasebranch_6_4/general/g.parser/description.html
r55069 r58319 13 13 <em><b>g.parser</b></em> 14 14 15 <h2>SYNOPSIS</h2> 16 <b>g.parser help</b><br> 17 <b>g.parser</b> [-<b>s</b>] [-<b>t</b>] <em>filename</em> [<em>argument</em>,...] 18 19 <h3>Flags:</h3> 20 <dl> 21 <dt><b>-t</b></dt> 22 <dd>Print strings for translation</dd> 23 <dt><b>-s</b></dt> 24 <dd>Write option values to stdout instead of reinvoking script</dd> 25 </dl> 26 15 27 <h2>DESCRIPTION</h2> 16 28 … … 49 61 <div class="code"><pre> 50 62 #%module 51 #% description: g.parser test script63 #% description: g.parser test script 52 64 #%end 53 65 #%flag 54 #% key: f 55 #% description: A flag 56 #%end 57 #%option 58 #% key: raster 59 #% type: string 60 #% gisprompt: old,cell,raster 61 #% description: Raster input map 62 #% required : yes 63 #%end 64 </pre></div> 65 66 <h2>SYNOPSIS</h2> 67 <b>g.parser help</b><br> 68 <b>g.parser</b> [-<b>s</b>] [-<b>t</b>] <em>filename</em> [<em>argument</em>,...] 69 70 <h3>Flags:</h3> 71 <dl> 72 <dt><b>-t</b></DT> 73 <dd>Print strings for translation</DD> 74 <dt><b>-s</b></DT> 75 <dd>Write option values to stdout instead of reinvoking script</DD> 76 </dl> 66 #% key: f 67 #% description: A flag 68 #%end 69 #%option 70 #% key: raster 71 #% type: string 72 #% gisprompt: old,cell,raster 73 #% description: Raster input map 74 #% required : yes 75 #%end 76 </pre></div> 77 77 78 78 <h2>NOTES</h2> … … 177 177 <h2>EXAMPLES</h2> 178 178 179 All examples below autogenerate the graphical user interface when invoked 180 without parameters of flags: 181 182 <p> 183 <img src="g_parser_test.png" alt="Autogenerated GUI window"> 184 179 185 <h3>Example code for SHELL</h3> 180 186 … … 238 244 echo "Value of GIS_OPT_VECTOR: '$GIS_OPT_VECTOR'" 239 245 246 </pre></div> 247 248 To run properly, the script needs to be copied into $GISBASE/scripts/ 249 with the executable flag being set. The script will provide a GUI 250 (as above) and the following usage help text: 251 252 <div class="code"><pre> 253 test.sh --help 254 255 Description: 256 g.parser test script (python) 257 258 Usage: 259 test.sh [-f] raster=string vector=string [option1=string] 260 [--verbose] [--quiet] 261 262 Flags: 263 -f A flag 264 --v Verbose module output 265 --q Quiet module output 266 267 Parameters: 268 raster Raster input map 269 vector Vector input map 270 option1 An option 240 271 </pre></div> 241 272 … … 309 340 </pre></div> 310 341 311 The <tt>test.py</tt> script will provide following help text: 342 The <tt>test.py</tt> script will provide a GUI (as above) and the 343 following usage help text: 312 344 313 345 <div class="code"><pre> … … 414 446 <a href="g.filename.html">g.filename</a>, 415 447 <a href="g.findfile.html">g.findfile</a>, 416 <a href="g.tempfile.html">g.tempfile</a> ,448 <a href="g.tempfile.html">g.tempfile</a> 417 449 </em> 418 450
Note:
See TracChangeset
for help on using the changeset viewer.
