Move "Available commands in Glance" to argparse epilog
glance help
emits this:
Available commands in Glance:
info list information about a list of files
stats summarize the statistical differences between two files
help print help for a specific command or list of commands
gui start the Glance graphical user interface
plotDiffs create a set of images comparing two files
inspectReport create a report to inspect the contents of one file
colocateData colocate data from two files
reportGen create a report comparing two files
inspectStats create statistics summary of one file
It is automatically appended to glance typotypo
or bare glance
. It does not get appended to glance --help
. These should be unified, ideally by moving it into the argparse logic.
-
In compare.py's main(), move the logic for collecting the commands above the call to config_organizer.parse_arguments()
-
Move logic for generating help message out of compare.py's main's help() into generating a string to pass to config_organizer.parse_arguments()
-
Have config_organizer.parse_arguments() pass that string in as an epilog. (This will probably require formatter=argparse.RawDescriptionHelpFormatter
in the call toargparse.ArgumentParser
! Otherwise the text will be reflowed!) -
Modify compare.py's main's help() to call options.print_help() for the print_all_summary
case. (This may require some cleverness, ashelp()
is defined before we get options back!)
In the long run we'll want to do more clever things with subparsers, potentially eliminating the need for this logic at all. But this is a step forward.
Edited by Eva Schiffer