[GRASS-dev] module header definitions add: text/multiline and latex support?

Paulo van Breugel p.vanbreugel at gmail.com
Wed Jan 14 01:01:35 PST 2015


+1 for adding description option

On Wed, Jan 14, 2015 at 9:42 AM, Pietro <peter.zamb at gmail.com> wrote:

> Dear devs,
>
> sometimes I would like to add some multiline text on the module GUI to
> help to understand the meaning of the parameter, and/or understand the
> logic of the module.
>
> Do you think that would be possible to have a description option that
> it does not take any input but allow us to be more descriptive inside
> the module interface?
>
> for instance if I have two mutual exclusive options like:
>
> {{{
> #%module
> #%  description: test script
> #%end
> ...
> #%option
> #% key: raster
> #% type: string
> #% gisprompt: old,cell,raster
> #% description: Raster input map:
> #% required : no
> #%end
> #%option
> #% type: description
> #% answer: OR
> #%end
> #%option
> #% key: vector
> #% type: string
> #% gisprompt: old,vector,vector
> #% description: Vector input map
> #% required : no
> #%end
> }}}
>
> So in the gui of the module I will have:
>
> Raster input map:
> -> raster menu
>
> OR
>
> Vector input map:
> -> vector menu
>
> or add a relation, to do something like:
>
> {{{
> #%module
> #%  description: test script
> #%end
> ...
> #%option
> #% key: raster
> #% type: string
> #% gisprompt: old,cell,raster
> #% description: Raster input map:
> #% required : yes
> #%end
> #%option
> #% key: vector
> #% type: string
> #% gisprompt: old,vector,vector
> #% description: Vector input map
> #% required : yes
> #%end
> #%keyrelation: raster OR vector
> }}}
>
> Is it this possible already? If yes how? Do you have some links?
>
> Do you think that would be feasible add also a LaTex option?
> To do something like:
>
> {{{
> #%module
> #%  description: test script
> #%end
> ...
> #%option
> #% guisection: Costs
> #% type: description
> #% answer: This option is used to compute the total
> #% cost of %%%% using this formula:
> #%end
> #%option
> #%option
> #% guisection: Costs
> #% type: latex
> #% answer: \rho = \frac{\gamma}{\pi}
> #%end
> #%option
> #% guisection: Costs
> #% key: gamma
> #% type: double
> #% description: $\gamma$ value
> #% required : no
> #% answer: 12.45
> #%end
> #%option
> #% guisection: Costs
> #% key: currency
> #% type: string
> #% description: the currency
> #% required : no
> #% answer: €
> #%end
> }}}
>
> In this way the GUI could be more descriptive and clearer.
>
> I have not idea if this could be feasible or not... What do you think?
>
> Best regards
>
> Pietro
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150114/52aaa897/attachment-0001.html>


More information about the grass-dev mailing list