hevi9 / pynames

Count and present the usage of names in python source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pynames

Count and present the usage of names in python source code. Point of this tool is to study name usage in code and find out names that could be contextually reused.

Install

Install from github:

> pip3 install git+git://github.com/hevi9/pynames.git

Requirements:

* Python 3
* jinja2

Usage

List name usage to terminal, for example in this pynames project:

> pynames pynames/*.py

==>:

1 *
5 ARGS
3 AST
1 ArgumentParser
1 D
1 DEBUG
..

List name usage to html file, for example in this pynames project:

> pynames --html out.html pynames/*.py
> firefox out.html

==> out.html as http://hevi9.github.io/pynames/pynames.html

List name usage in python library:

> find /usr/lib/python3.4 -name "*py" | xargs pynames --html out.html
> firefox out.html

==> out.html as http://hevi9.github.io/pynames/python-lib.html (over 20k names, takes a while)

About

Count and present the usage of names in python source code

License:GNU Lesser General Public License v2.1


Languages

Language:Python 70.1%Language:Makefile 13.5%Language:HTML 7.9%Language:CSS 5.8%Language:JavaScript 2.6%