Metadata-Version: 1.0
Name: miniparser
Version: 1.0.3
Summary: minimum commandline option parser.
Home-page: http://github.com/alice1017
Author: alice1017
Author-email: takemehighermore@gmail.com
License: MIT
Download-URL: http://github.com/alice1017/miniparser
Description: What's miniparser?
        ##################
        
        The **miniparser** is minimum commandline option parser.
        
        miniparser can use easily.
        This is a library for people that think argparse or optparse is difficult.
        
        How to use
        -----------
        
        ::
        
            #!/usr/bin/env python
            #coding: utf-8
        
            import miniparser
        
            parser = miniparser.parser(version="1.0")
        
            @parser.option("-m","msg","--message","--msg", description="this is help msg.", argument_types={"msg":str,"count":int})
            def printer(msg, count):
                print msg*count
        
            @parser.option("-p","plus","--plus", description="plus number.", argument_types={"num1":int,"num2":int})
            def calc(num1, num2):
                print num1+num2
        
            if __name__ == "__main__":
                parser.parse()
        
        Help message
        
        ::
        
            parser.normal.test.py var.1.0
            $ parser.normal.test.py [OPTIONS]
            ------------------------------
            OPTIONS :
               -m, msg, --message, --msg [[msg], [count]]
                  this is help msg.
            
               -p, plus, --plus [[num1], [num2]]
                  plus number.
            
               -h, --help, help
                  Show this usage message.
            
               -v, --version, version
                  Show this application version.
        
        First, import script.
        ^^^^^^^^^^^^^^^^^^^^^^
        
            import miniparser
        
        Second, create parser instance.
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
            parser = miniparser.parser()
        
        Third, define optin.
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
        
        Miniparser use **decorator** to defininig option.
        
        The arguments of decorator
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
        hooks
            The option hook. write option name as you like. You can set multiple but cannot duplicate.
        
        description
            The description of option.
        
        argument_types
            You can set types about argument of option. this is only required dictionary that {'argument_name':'argument_type'}.
        
        Forth, Parsing
        ^^^^^^^^^^^^^^^^
        
            parser.parse()
        
        That's only!
        
        Install
        ---------
        
        ::
        
            git clone git://github.com/alice1017/miniparser.git
            cd miniparser
            python setup.py build install
        
        or
        
        ::
        
            easy_install miniparser
        
        
        This is opensource.
        ----------------------
        
        You can see source code on `Github <https://github.com/alice1017/miniparser>`_ .
        
        License is MIT License.
        
        ChangeLog
        -------------
        
        var 1.0.0 : 正式リリース。  
        var 1.0.1 : option定義時のhooksが重複していたらエラーが出るようになりました  
        var 1.0.2 : option定義時にargument_typesという{引数名:型}このような辞書オブジェクトを指定すると、関数が起動したときにチェックしてくれようになりました。
        var 1.0.3 : argument_typesを指定していないときにエラーが発生するバグをfixed.
        
        Author
        ----------
        
        author name is 'Alice'.
        
        * Twitter id : alice1017
        * github id  : alice1017
        
        Thank you!
        
        
Platform: UNKNOWN
