Skip to content

Generate a nicely-formatted text table listing information about the arguments to a Python script.

Notifications You must be signed in to change notification settings

jveldridge/ArgparseHelpTable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

ArgparseHelpTable

Script for generating a nicely-formatted text table listing information about the arguments to a Python script that uses the argparse module.

Usage

The arguments to the makeHelpTable.py script are (as generated by makeHelpTable.py itself):

=============================================================================================================
| PARAMETER NAME          | REQUIRED/DEFAULT   | DESCRIPTION                                                |
=============================================================================================================
|-s/--script              | REQUIRED           |Path to script for which argument table should be generated |
-------------------------------------------------------------------------------------------------------------
|-m/--method              | get_parser         |Name of (0-argument) method that returns                    |
|                         |                    |argparse.ArgumentParser                                     |
-------------------------------------------------------------------------------------------------------------
|-nw/--name_width         | 25                 |Number of characters for parameter name column              |
-------------------------------------------------------------------------------------------------------------
|-rw/--required_width     | 20                 |Number of characters for required/default column            |
-------------------------------------------------------------------------------------------------------------
|-dw/--description_width  | 60                 |Number of characters for description column                 |
-------------------------------------------------------------------------------------------------------------

About

Generate a nicely-formatted text table listing information about the arguments to a Python script.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages