[GRASS-dev] Adding an expert mode to the parser

Markus Metz markus.metz.giswork at gmail.com
Wed Sep 28 13:35:37 PDT 2016


On Tue, Sep 27, 2016 at 5:55 PM, Vaclav Petras <wenzeslaus at gmail.com> wrote:
>
> On Mon, Sep 26, 2016 at 5:50 PM, Vaclav Petras <wenzeslaus at gmail.com> wrote:
>>
>> If the --help is just for scanning and the issue is that it simply too
>> long, hiding some parameters is not the only option we have. For many (and
>> more in the future hopefully) parameters we have (short) label and (longer)
>> description. --help prints both (if both are present, that's at least 2
>> lines per parameter). Additionally, if the option has predefined values
>> which have descriptions, there is one line for each of those. So, the
>> question is would it be helpful (at least as a first step) if --help would
>> print less information for each parameter but still provided all parameters?
>
>
> Additionally, the label and description is also for the module itself, so
> when we have label, we don't need to show description, that's -1 line for
> r.slope.aspect. Then we can remove keywords, that's -3 lines. Then we have
> the standard/long flags. (These might be similar to the general options from
> `ogr2ogr --help-general` which Madi posted.) They are the same all the time,
> except for --o, so that's -4 or -3 for the old ones (depending on module)
> and -2 for the recently added flags (--qq --ui). They still can be in
> `Usage:` section or they may not. There is also an empty line at the
> beginning, we can remove it as well because don't go for beauty and the
> `Description:` title is also not necessary, so we could remove that as well,
> that's -2 lines. That would be 12 lines total. (I have 55 lines in the
> terminal windows I'm using right now, so 12 seems to be quite a lot).

+1

>
> In GUI or even in the manual, we could put the standard/long flags to a
> separate section as well.
>
>> r.slope.aspect --help
>
> Description:
>  Generates raster maps of slope, aspect, curvatures and partial derivatives
> from an elevation raster map.
>  Aspect is calculated counterclockwise from east.
>
> Keywords:
>  raster, terrain, aspect, slope, curvature
>
> Usage:
>  r.slope.aspect [-a] elevation=name [slope=name] [aspect=name]
>    [format=string] [precision=string] [pcurvature=name] [tcurvature=name]
>    [dx=name] [dy=name] [dxx=name] [dyy=name] [dxy=name] [zscale=value]
>    [min_slope=value] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
>
> Flags:
>   -a   Do not align the current region to the raster elevation map
>  --o   Allow output files to overwrite existing files
>  --h   Print usage summary
>  --v   Verbose module output
>  --q   Quiet module output
>  --qq  Super quiet module output
>  --ui  Force launching GUI dialog
>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev


More information about the grass-dev mailing list