Markup for Sphinx formatting of argparse -
i using sphinx/restructuredtext create html , pdf docs project , including output of argparse command line tools. @ moment pasting output in manually plan @ point switch autogenerated output.
the problem while formatting fine named parameters (like -x or --xray) doesn't work on positional parameters. looks absence of leading '-' on parameter name confusing it. output looks normal text without neat indentation etc.
so question is, there exist markup force formatting positional parameters if had leading '-' characters? if not, suggest in docs or code should start looking put myself?
you may use sphinx-argparse extension. not use output of argparse help, instead introspects argparse parser , provides proper sphinx markup both positional arguments , options, formatting them definition list proper labels.
sub-commands handled.
http://sphinx-argparse.readthedocs.org/en/latest/
it cover needs in:
plan @ point switch autogenerated output
Comments
Post a Comment