Doc: Clean up argument documentation for new CLI
Feature description
The argument documentation for the new CLI needs some cleaning up. I see the following problems:
- the options that are unique to the tool being documented are intermixed with standard options like
--input-format, making them hard to find - only a subset of standard options that apply to a given tool actually appear on that tool's documentation
- options are not listed in any particular order
- options are divided between sections like "Options", "Standard Options", and "Advanced Options" without any obvious distinction between them.
I would propose the following organization:
- Section "Program-Specific Options" that lists options that are either specific to a given tool, or have a behavior that may be specific to that tool (such as
--band.) Options are listed in alphabetic order. - Section "Standard Options" that lists all other options for that tool, again in alphabetic order. To avoid being visually overwhelming, we may want to bury this under a "collapse:: " directive.
Additional context
I started some work on a hackish Sphinx extension to help with this:
https://github.com/dbaston/gdal/blob/doc-fix-alg-options/doc/source/_extensions/check_program_options.py
It currently outputs about 700 undocumented program/option combinations. Some of these are false-positives.
I would propose the following organization:
That sounds good to me. The current categorization comes from the early days of the framework before pipeline and other re-usable arguments, and can definitely be revised. That's not uniquely a documentation issue, but also the code must be changed to have SetCategory() consistent