Skip to main content

A command line tool to count lines and files numbers under current directory.

Project description

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

		

Project details


Download files

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

Source Distribution

count-linellw-0.1.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

count_linellw-0.1.2-py2.py3-none-any.whl (4.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file count-linellw-0.1.2.tar.gz.

File metadata

  • Download URL: count-linellw-0.1.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.18

File hashes

Hashes for count-linellw-0.1.2.tar.gz
Algorithm Hash digest
SHA256 de723ed2005d1829b177ca038a4e567deffc7dc849e0afcb12c7b1837cfa5d97
MD5 c101ff1efd89f6c19535303102e84f90
BLAKE2b-256 1c9293e532a1445b06e80438254b2071e8b4427e345579c83430af4507cc18d7

See more details on using hashes here.

File details

Details for the file count_linellw-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for count_linellw-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2eb6366352ebfa27f231a412b1d05c7fa4a36141e9a8a798bd3a2b680d4f72ca
MD5 0aba0baf845e743e2a60363720a45438
BLAKE2b-256 6a81792df8f52cd8ce51ad229f09449149718181f7deaae4acfd85ed6cea5545

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page