A command line tool to analyze the amount of lines and files under current directory.
You can install, upgrade, uninstall line-counter.py with these commands:
$ pip install line-counter $ pip install --upgrade line-counter $ pip uninstall line-counter
Usage: line [options] [args] Analyze the amount of lines and files under current directory following the rules in 'line.select' or analyze all files if 'line.select' doesn't exist Options: --version show program's version number and exit -h, --help show this help message and exit -d, --detail show more detail in the result -s, --show show rules in 'line.select'
Example usage and output
Analyze all files (when ‘line.select’ doesn’t exist) or specific files (when ‘line.select’ exists) under current directory.
$ line Search in /Users/Morgan/Documents/Example/ file count: 4 line count: 839
$ line -d Search in /Users/Morgan/Documents/Example/ Dir A/file C.c 72 Dir A/file D.py 268 file A.py 467 file B.c 32 file count: 4 line count: 839
Show the rules in ‘line.select’
$ line -s Here are the rules in 'line.select' under /Users/Morgan/Documents/Example/: #Select rules: *.c #Ignore rules: !Dir A !*.py
Check current version
$ line --version line 0.7.4
This file works like ‘.gitignore’. * Each line is a rule * Each line starts with a ‘#’ means that’s a comment * Each line starts with a ‘!’ means it’s a ignore rule * Otherwise it’s a select rule * The order of rules is irrelevant and ignore rules can always override select rules * The rules can find all the pathnames matching a specified pattern according to the rules used by the Unix shell. No tilde expansion is done, but *, ?, and character ranges expressed with [ ] will be correctly matched.
- Add order output function
- Add option to only count file amount or line amount
- 0.7.4 03/25/2017Fix distribution on PyPI.
- 0.7.3 03/25/2017Fix the long description format on PyPI.
- 0.7.2 03/25/2017Fix a bug that file cannot be matched when there is a ‘[‘ in the path.
The MIT license.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|line_counter-0.7.4-py2.py3-none-any.whl (6.9 kB) Copy SHA256 Checksum SHA256||2.7||Wheel||Mar 26, 2017|
|line-counter-0.7.4.tar.gz (4.3 kB) Copy SHA256 Checksum SHA256||–||Source||Mar 26, 2017|