[GRASS-dev] table with the parser standard options

Pietro peter.zamb at gmail.com
Thu Jul 2 00:49:44 PDT 2015


Dear Luca and Moritz,

On Wed, Jul 1, 2015 at 11:58 AM, Moritz Lennert
<mlennert at club.worldonline.be> wrote:
> May I just suggest the following small modification

ok, added.

>> I believe we should add the generated table somewhere in the manual docs.
>> Should I add this python script to grass_addons/tools?
>
>
> Wouldn't it be better in tools/ directly in the source code ?

ok, committed in r65534.

Some examples:

{{{
$ python2 tools/parser_standard_options.py -t
lib/gis/parser_standard_options.c -f csv -o
parser_standard_options.csv

$ tail parser_standard_options.csv
G_OPT_STR3DS_INPUT;;Name of the input space time raster3d
dataset;;old,str3ds,str3ds;input;name;;;;YES;TYPE_STRING
G_OPT_STR3DS_INPUTS;;Name of the input space time raster3d
datasets;;old,str3ds,str3ds;inputs;name;;YES;;YES;TYPE_STRING
G_OPT_STR3DS_OUTPUT;;Name of the output space time raster3d
dataset;;new,str3ds,str3ds;output;name;;;;YES;TYPE_STRING
G_OPT_STDS_TYPE;strds;Type of the input space time
dataset;;;type;name;;;strds,stvds,str3ds;NO;TYPE_STRING
G_OPT_MAP_INPUT;;Name of the input map;;old,map,map;map;name;;;;YES;TYPE_STRING
G_OPT_MAP_INPUTS;;Name of the input
maps;;old,map,map;maps;name;;YES;;YES;TYPE_STRING
G_OPT_MAP_TYPE;raster;Type of the input
map;;;type;name;;;raster,vector,raster_3d;NO;TYPE_STRING
G_OPT_T_TYPE;absolute;The temporal type of the space time
dataset;;;temporaltype;name;;;absolute,relative;NO;TYPE_STRING
G_OPT_T_WHERE;;Example: start_time > '2001-01-01
12:30:00';;;where;sql_query;WHERE conditions of SQL statement without
'where' keyword used in the temporal GIS framework;;;NO;TYPE_STRING
G_OPT_T_SAMPLE;start;The method to be used for sampling the input
dataset;;;sampling;name;;YES;start,during,overlap,contain,equal,follows,precedes;NO;TYPE_STRING

$ python2 tools/parser_standard_options.py -t
lib/gis/parser_standard_options.c -f html -o
parser_standard_options.html

$ head parser_standard_options.html
<table border=1>
  <tr>
    <td>option</td>
    <td>answer</td>
    <td>description</td>
    <td>descriptions</td>
    <td>gisprompt</td>
    <td>key</td>
    <td>key_desc</td>
    <td>label</td>

$ python2 tools/parser_standard_options.py -t
lib/gis/parser_standard_options.c -f csv -o
parser_standard_options.csv -s Flg

$  tail parser_standard_options.csv
description;key
G_FLG_V_TABLE;Do not create attribute table;'t'
G_FLG_V_TOPO;Do not build topology;'b'
}}}

Best regards

Pietro


More information about the grass-dev mailing list