Package: pystructure
Copyright (c) 2017 hanksPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.Description: |Build Status| |Coverage Status|pystructure===========A tiny tool to help reading source code with showing structure of pythonsource codeWhy===I use PyCharm as my python IDE, and sometimes I can use ``structure``navigation view to check code structure easily, like below:.. figure:: https://github.com/hanks/pystructure/blob/master/docs/images/pycharm-structure.jpg?raw=true:alt: structurestructureIt is useful when you read some open source codes, and for me, I like towrite memo for code structure down in my note, but you can not copy thestructure information to text from PyCharm, so I create this tool tohelp me easily to output text version of structure of python code.Installation============``pip install pystructure``Usage=====::> pystructureUsage:pystructure.py SRC_PATH [-o FILE | --output=FILE]::> pystructure pystructure.pyv __VERSION__c PYSymbol(object)v GLOBAL_VARv FUNCTIONv CLASSv METHODv ATTRIBUTEv PRIVATE_METHODc PYStructureVisitor(object)v PREFIXv LITERAL_VALUE_PREFIXf __init__(self)f visit(self, node_list)f visit_Assign(self, node)f visit_ClassDef(self, node)f visit_FunctionDef(self, node)f visit_literal_Num(self, node)f visit_literal_Name(self, node)f visit_literal_Str(self, node)f visit_literal_List(self, node)f visit_literal_Tuple(self, node)f visit_literal_Dict(self, node)f _get_visit_result(self, node, prefix="PREFIX")f _get_literal_value_list(self, node_list)f _build_func_signature(self, func_name, args_list, default_list, kwarg, vararg)f method_dict(self)c StructureParser(object)f __init__(self)f accept(self, visitor)f load(self, src)f export(self)f _format_structure(self, root, level=0, output=None)f main()Implementation==============-  ast - Build-in python library, to do static analytic for the sourcecode-  docopt - A great tool to help to create beautiful CLI for youContribution============1. Fork the repository on GitHub.2. Make a branch off of master and commit your changes to it.3. Run the tests with tox-  Either use tox to build against all supported Python versions (if youhave them installed) or use tox -e py{version} to test against aspecific version, e.g., tox -e py27 or tox -e py33.4. Submit a Pull Request to the master branch on GitHub.If you’d like to have a development environment for ``pystructure``, youshould create a virtualenv and then do ``pip install -e .`` from withinthe directory.Lisence=======MIT Lisence.. |Build Status| image:: https://travis-ci.org/hanks/pystructure.svg?branch=master:target: https://travis-ci.org/hanks/pystructure.. |Coverage Status| image:: https://coveralls.io/repos/github/hanks/pystructure/badge.svg?branch=master:target: https://coveralls.io/github/hanks/pystructure?branch=masterKeywords: pystructure structure astPlatform: UNKNOWNClassifier: Topic :: UtilitiesClassifier: Development Status :: 5 - Production/StableClassifier: License :: OSI Approved :: MIT LicenseClassifier: Programming Language :: Python :: 2Classifier: Programming Language :: Python :: 2.6Classifier: Programming Language :: Python :: 2.7Classifier: Programming Language :: Python :: 3Classifier: Programming Language :: Python :: 3.3Classifier: Intended Audience :: DevelopersClassifier: Operating System :: OS Independent