Skip to main content

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
  1. 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
		========================================
		

  1. 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
		========================================
		
  1. 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 countqingyuan 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for countqingyuan 0.1.2
File Size Uploaded
countqingyuan-0.1.2.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for countqingyuan 0.1.2
File Interpreter ABI Platform
countqingyuan-0.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 10.2 kB

Release files / countqingyuan-0.1.2.tar.gz

Download URL countqingyuan-0.1.2.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c680f9c3389341b83c27e1fe2bbb2465b9250a1dca769226e50a69f4525eea87
BLAKE2b-256 checksum
How to use checksums
d13f52758ad86b3ce437e9a7a9cdcee86802ecc2a84f72026db6c52d2836efee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.18

Release files / countqingyuan-0.1.2-py2.py3-none-any.whl

Download URL countqingyuan-0.1.2-py2.py3-none-any.whl
Size 4.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7b44ba19792f29daa283ec5dd417203563860df10c5880189ad5f3581a0aa65e
BLAKE2b-256 checksum
How to use checksums
b5a45b18d8c0a9ae4a287d00199912536175a9bcd88cb00fcdc3829c4a992556
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.18

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page