[GRASS-dev] module header definitions add: text/multiline and latex support?
Vaclav Petras
wenzeslaus at gmail.com
Wed Jan 14 06:59:16 PST 2015
On Wed, Jan 14, 2015 at 9:13 AM, Huidae Cho <grass4u at gmail.com> wrote:
>
>
> On Wed, Jan 14, 2015 at 3: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?
>>
>
>
> Requiring raster OR vector is possible already.
>
> #%rules
> #% requires: raster, vector
> #%end
>
>
Can this have a description? I'm not sure where we would show it but it
might be useful. However, I'm against introducing some general inter-option
info, I'm not sure how it would work in code, GUI, command line and manual
page. You can always include this information into description of
individual options. Details can go to a manual page which is accessible
from GUI, using man or in web browser.
I don't see how you would like the GUI to look like. So if you have some
ideas or examples, please share. I can see what Moritz is saying, GUI
should be the same as command line because they are two interfaces to the
same thing.
Vaclav
>
>
>> 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
>
>
>
> _______________________________________________
> 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/d05a7e5b/attachment.html>
More information about the grass-dev
mailing list