#953: module help information in machine-readable format
----------------------------+-----------------------------------------------
Reporter: cmbarton | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: default | Version: unspecified
Keywords: help, metadata | Platform: All
Cpu: All |
----------------------------+-----------------------------------------------
The information returned from running "<module> help" would be useful for
a variety of interface=related tasks like auto-completion and automatic
menu building. Unfortunately, it is completely localized, making it
impossible to parse in a reliable fashion within scripts and computer
code.
I'm requesting the addition of a parameter to G_usage() which would
replace the human-readable section descriptions with markers which can be
relied upon to never occur in normal help text, e.g. "{{{KEYWORDS}}}\n",
then add a (e.g.) --help-data option. It would be helpful to also include
an unlocalized version of the keys for each of the description sections
(e.g., Description, Flags, Usage in an English localization).
#953: module help information in machine-readable format
--------------------------+-------------------------------------------------
Reporter: cmbarton | Owner: glynn
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: default | Version: unspecified
Resolution: | Keywords: help, metadata
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by glynn):
Replying to [ticket:953 cmbarton]:
> The information returned from running "<module> help" would be useful
for a variety of interface=related tasks like auto-completion and
automatic menu building. Unfortunately, it is completely localized, making
it impossible to parse in a reliable fashion within scripts and computer
code.
The --help output isn't appropriate for this. Use --interface-description
instead.
> I'm requesting the addition of a parameter to G_usage() which would
replace the human-readable section descriptions with markers which can be
relied upon to never occur in normal help text, e.g. "{{{KEYWORDS}}}\n",
then add a (e.g.) --help-data option. It would be helpful to also include
an unlocalized version of the keys for each of the description sections
(e.g., Description, Flags, Usage in an English localization).
I've added --help-text, which delimits the main sections of the --help
output with machine-readable markers, and also writes to stdout rather
than stderr.
Code should not attempt to parse the output further; if you want more
specific information, use the --interface-description output.
#953: module help information in machine-readable format
----------------------------+-----------------------------------------------
Reporter: cmbarton | Owner: glynn
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: Default | Version: unspecified
Keywords: help, metadata | Platform: All
Cpu: All |
----------------------------+-----------------------------------------------
#953: module help information in machine-readable format
----------------------------+-----------------------------------------------
Reporter: cmbarton | Owner: glynn
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: Default | Version: unspecified
Keywords: help, metadata | Platform: All
Cpu: All |
----------------------------+-----------------------------------------------
Comment(by cmbarton):
Replying to [comment:5 hamish]:
> can we consider the wish completed?
>
Probably.