# count-line
## Usage
A cross-platform command line tool to count the amount of lines and files under current directory.
## Installation
You can install, upgrade, uninstall count-line with these commands(without $):
```
$ pip install count-line
$ pip install --upgrade count-line
$ pip unstall count-line
```
## Help
```
usage: line.py [-h] [-s SUFFIX | -f FILTER] [-d]
count the amount of lines and files under the current directory
optional arguments:
-h, --help show this help message and exit
-s SUFFIX, --suffix SUFFIX
count by suffix file name, format: .suffix1.suffix2...
e.g: .cpp.py (without space)
-f FILTER, --filter FILTER
count without filter name, format: .suffix1.suffix2...
e.g: .cpp.py (without space)
-d, --detail show detail results
```
## Examples
1. Count all files under the current directory:
```
$ line
Search in /Users/macbook/Desktop/Examples1/
file count: 4
line count: 373
```
2. Count all files under the current directory with detail results:
```
$ line -d
Search in /Users/macbook/Desktop/Examples2/
========================================
文件后缀名 文件数 总行数
.py 5 397
.cpp 240 11346
总文件数: 245 总行数: 11743
========================================
```
3. Count specified files under the current directory, using -s to pass suffix as parameters, if there are more than one parameter, don't have space, for example, count cpp files and python files:
```
$ line -s .cpp.py
Search in /Users/macbook/Desktop/Examples3/
file count: 3
line count: 243
$ line -s .cpp.py -d
Search in /Users/macbook/Desktop/Examples3/
========================================
文件后缀名 文件数 总行数
.py 5 397
.cpp 240 11346
总文件数: 245 总行数: 11743
========================================
```
4. Count files under the current directory with filter:
```
$ line -f .py -d
Search in /Users/macbook/Desktop/Examples4/
========================================
文件后缀名 文件数 总行数
.cpp 240 11346
总文件数: 240 总行数: 11528
========================================
$ line -d
Search in /Users/macbook/Desktop/Examples4/
========================================
文件后缀名 文件数 总行数
.py 5 397
.cpp 240 11346
总文件数: 245 总行数: 11743
========================================
```
Metadata
Release files for count-line 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| count-line-0.1.2.tar.gz | 4.4 kB | Without provenance | Details for count-line-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| count_line-0.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for count_line-0.1.2-py2.py3-none-any.whl |
Total release size: 8.1 kB
Release files / count-line-0.1.2.tar.gz
| Download URL | count-line-0.1.2.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1d0f1f9b4d4b5444bd09bd8ebd549fe105beb43054e4511dc9363c95fe8da4a
|
|
BLAKE2b-256 checksum How to use checksums |
e9b3b9686f3fcb413a8668e1196bd40d278cd6cb772a1879f6f2cf027513d29a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
|
Release files / count_line-0.1.2-py2.py3-none-any.whl
| Download URL | count_line-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
33210f8bb7115991b1db0769a1d7e51e6a6466512ad2a54de2b7fcb020e2e5c8
|
|
BLAKE2b-256 checksum How to use checksums |
1a42577dcba4be994c4837cdbe46eeb0172605e4f2dcc0347d00627e1c759c67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
|
Security for count-line 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.