Skip to main content

No project description provided

Project description

Words in names counter

This script calculate words count (nouns and verbs) in funcs and vars names in .py files.
Script check all folders recursively.
Script can clone repo from github&

How to install

Run pip3 install words_counter
Run on CLI for update nltk if it need:
$ python3
>> import nltk

How to use

Script have some arguments to run:
-p - Projects dirpathes.
--all_names - Get all vars and funcs names.
--by_type - Get all info by word type.
--top_names - Get top funcs and vars names.
-d - Clone code from outsource(Github in this version, need repo URL and pathway to create folder)
-t - Add word type for search. Avaliable types: NN(Noun), NNS(Nouns), VB(Verb).
--data_type - Structure to search choice. Available funcs or vars.
--cli - Output result to CLI.
--json - Output result to JSON file(need pathway to create json file).
--csv - Output result to CSV file(need pathway to create csv file).
Attention! In current version -t and --data_type required, only if you don’t want use -d.

Usage example:

We have some folders structure with

├── django
│   ├── css
│   ├── bootstrap.min.css
│   ├──
├── flask
│   ├── favicon.ico
│   ├──
│   ├── garbage_files
│   │   ├──bootstrap.min.js
│   │   ├──html5shiv.min.js
│   │   ├──
├── myproject
│   ├──ie-emulation-modes-warning.js
│   ├──
│   ├──
In all folders - 5 .py files.
All files have funcs like this (for example):
def foo():
   test_var1 = 'test'
   return test_var1
def bar():
    test_var2 = 'haha'
    return test_var2
if __name__ == '__main__':
    foo_var = foo()
    bar_var = bar()

And another funcs.

Run check(for example from project folder):
$ python words_counter -p myproject -t vb --data_type funcs --all_names --cli
project: myproject
funcs names:
vars names:


MIT license

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for words_counter, version 1.3.7
Filename, size File type Python version Upload date Hashes
Filename, size words_counter-1.3.7.tar.gz (7.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page