<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 4:35 PM, Markus Metz <span dir="ltr"><<a target="_blank" href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class="gmail-">On Tue, Sep 27, 2016 at 5:55 PM, Vaclav Petras <<a href="mailto:wenzeslaus@gmail.com">wenzeslaus@gmail.com</a>> wrote:<br>
><br>
> On Mon, Sep 26, 2016 at 5:50 PM, Vaclav Petras <<a href="mailto:wenzeslaus@gmail.com">wenzeslaus@gmail.com</a>> wrote:<br>
>><br>
>> If the --help is just for scanning and the issue is that it simply too<br>
>> long, hiding some parameters is not the only option we have. For many (and<br>
>> more in the future hopefully) parameters we have (short) label and (longer)<br>
>> description. --help prints both (if both are present, that's at least 2<br>
>> lines per parameter). Additionally, if the option has predefined values<br>
>> which have descriptions, there is one line for each of those. So, the<br>
>> question is would it be helpful (at least as a first step) if --help would<br>
>> print less information for each parameter but still provided all parameters?<br>
><br>
><br>
> Additionally, the label and description is also for the module itself, so<br>
> when we have label, we don't need to show description, that's -1 line for<br>
> r.slope.aspect. Then we can remove keywords, that's -3 lines. Then we have<br>
> the standard/long flags. (These might be similar to the general options from<br>
> `ogr2ogr --help-general` which Madi posted.) They are the same all the time,<br>
> except for --o, so that's -4 or -3 for the old ones (depending on module)<br>
> and -2 for the recently added flags (--qq --ui). They still can be in<br>
> `Usage:` section or they may not. There is also an empty line at the<br>
> beginning, we can remove it as well because don't go for beauty and the<br>
> `Description:` title is also not necessary, so we could remove that as well,<br>
> that's -2 lines. That would be 12 lines total. (I have 55 lines in the<br>
> terminal windows I'm using right now, so 12 seems to be quite a lot).<br>
<br>
</span>+1</blockquote></div><br></div><div class="gmail_extra">Done in r69602. I limited the changes to the usage() function (G_usage() backend). The behavior is driven by 3 variables which can become function parameters in the future. For now, full description can be found in the using man or g.manual commands. Some --full-help can be implemented if desired. Related to that, I did not preserved the functionality of --help-text, this can be fixed as well.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Next step would be ensuring that each module has its label (or description) short enough that it fits into one line (72 characters?). Similarly, each option and flag should have label (or description) which fits on one line considering that we need some space for flag, option name and horizontal spacing.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Anyway, here is the state before:<br></div><div class="gmail_extra"><br>> r.slope.aspect --help 2>&1 | wc<br>     48     255    2137<br>> v.in.lidar --help 2>&1 | wc<br>     72     462    3634<br><br></div><div class="gmail_extra">And after:<br></div><div class="gmail_extra"><br>> r.slope.aspect --help 2>&1 | wc<br>     32     194    1620<br>> v.in.lidar --help 2>&1 | wc<br>     43     242    2002<br><br></div><div class="gmail_extra">Please test,<br></div><div class="gmail_extra">Vaclav<br><br><br><a href="https://trac.osgeo.org/grass/changeset/69602">https://trac.osgeo.org/grass/changeset/69602</a><br></div></div>