Metadata-Version: 1.0
Name: opster
Version: 2.2
Summary: command line parsing speedster
Home-page: http://piranha.org.ua/opster/
Author: Alexander Solovyov
Author-email: piranha@piranha.org.ua
License: BSD
Description: .. -*- mode: rst -*-
        
        ========
        Opster
        ========
        
        Opster is a command line options parser, intended to make writing command line
        applications easy and painless. It uses built-in Python types (lists,
        dictionaries, etc) to define options, which makes configuration clear and
        concise. Additionally it contains possibility to handle subcommands (i.e.
        ``hg commit`` or ``svn update``).
        
        Quick example
        -------------
        
        That's an example of an option definition::
        
        import sys
        from opster import command
        
        @command(usage='%name [-n] MESSAGE')
        def main(message,
        no_newline=('n', False, 'don\'t print a newline')):
        'Simple echo program'
        sys.stdout.write(message)
        if not no_newline:
        sys.stdout.write('\n')
        
        if __name__ == '__main__':
        main()
        
        Running this program will print the help::
        
        echo.py [-n] MESSAGE
        
        Simple echo program
        
        options:
        
        -n --no-newline  don't print a newline
        -h --help        show help
        
        As you can see, here we have defined option to not print newline: keyword
        argument name is a long name for option, default value is a 3-tuple, containing
        short name for an option (can be empty), default value (on base of which
        processing is applied - `see description`_) and a help string.
        
        Underscores in long names are converted into dashes.
        
        If you are calling a command with option using long name, you can supply it
        partially. In this case it could look like ``./echo.py --nonew``. This is also
        true for subcommands: read about them and everything else you'd like to know in
        `documentation`_.
        
        .. _documentation: http://hg.piranha.org.ua/opster/docs/
        .. _see description: http://hg.piranha.org.ua/opster/docs/overview.html#options-processing
        
        Plans
        -----
        
        - Better documentation
        - (under consideration) ability to have few command collectors in a single
        application (more than one dispatching entry point)
        
        
        
        Changelog
        ---------
        
        2.2 (2010.03.23)
        ~~~~~~~~~~~~~~~~
        
        - adjust indentation level in multiline docstrings (compare `1`_ and `2`_)
        - small fix for internal getopt exception handling
        
        .. _1: http://solovyov.net/opster/tests.html#multihelp1
        .. _2: http://solovyov.net/opster/tests.html#multihelp2
        
        
        2.1 (2010.01.23)
        ~~~~~~~~~~~~~~~~
        
        - fix help display in case middleware returns original function
        
        2.0 (2010.01.23)
        ~~~~~~~~~~~~~~~~
        
        - fix help display when there is no __doc__ declared for function
        - ``dict`` type `handling`_
        - ``.help()`` attribute for every function, printing help on call
        
        .. _handling: http://hg.piranha.org.ua/opster/docs/overview.html#options-processing
        
        1.2 (2010.12.29)
        ~~~~~~~~~~~~~~~~
        
        - fix option display for a list of subcommands if docstring starts with a blank
        line
        
        1.1 (2010.12.07)
        ~~~~~~~~~~~~~~~~
        
        - _completion was failing to work when global options were supplied to command
        dispatcher
        
        1.0 (2010.12.06)
        ~~~~~~~~~~~~~~~~
        
        - when middleware was used and command called without arguments, instead of
        help, traceback was displayed
        
        0.9.13 (2010.11.18)
        ~~~~~~~~~~~~~~~~~~~
        
        - fixed exception handling (cleanup previous fix, actually)
        - display only name of application, without full path
        
        0.9.12 (2010.11.02)
        ~~~~~~~~~~~~~~~~~~~
        
        - fixed trouble with non-ascii characters in docstrings
        
        0.9.11 (2010.09.19)
        ~~~~~~~~~~~~~~~~~~~
        
        - fixed exceptions handling
        - autocompletion improvements (skips middleware, ability of options completion)
        
        0.9.10 (2010.04.10)
        ~~~~~~~~~~~~~~~~~~~
        
        - if default value of an option is a fuction, always call it (None is passed in
        case when option is not supplied)
        - always call a function if it's default argument for an option
        - some cleanup with better support for python 3
        - initial support for autocompletion (borrowed from PIP)
        
        0.9 - 0.9.9 (since 2009.07.13)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
        Ancient history ;-)
        
Platform: any
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
