Skip to content

zozlak/argparse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Argparse

Latest Stable Version Build status Coverage Status License

A humble PHP clone of Python's argparse.

Used to reduce my cognitive workload when switching between Python and PHP.

Implements only primary set of argparse features (see below) but strictly follows Python's argparse behavior.

API documentation

See the argparse docs with the following remarks:

  • ArgumentParser constructor supports only prog, description, epilog and exit-on-error parameters.
  • Almost all features of the add_argument() method are implemented.
    Known discrepancies include:
    • If you want to define many names for a given argument, pass them as an array to the name parameter (it's impossible to implement it in PHP in exactly the same way it works in Python as PHP handles positional/named parameters in a slightly different way).
    • Lack of support for %(prog)s placeholder in the help parameter.
    • Lack of support for metavar parameter being an array.
  • All features described under other utilities are not implemented.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages