Skip to main content

Line Counter

This is a short utility script for counting lines in each file type in a directory and subdirectories

Installation

Using uv (recommended)

install globally

uv tool install linecounter-python

or run temporarily to check out:

uvx linecounter-python [OPTIONS]

Usage

linec [OPTIONS]

Options:

--target              -t      <directory>  Directory to analyze [default: .]
--no-default          -a                   Discard default list of globs [default: True]
--allow-hidden        -A                   Allow hidden files and directories (.)
--no-gitignore        -g                   Skip using rules from .gitignore [default: True]
--no-recurse          -r                   do not recurse into subdirectories [default: True]
--ignore              -i      <str>        Additional patterns to ignore (e.g. -i "*.log")
--install-completion                       Install completion for the current shell.
--show-completion                          Show completion for the current shell, to copy it or
                                           customize the installation.
--help                                     Show this message and exit

Example:

linec -gt . -i "*.lock"

[!NOTE] -t . is completely useless, not specifying target defaults to .

produces

Summary for: /home/.../linecounter-python

.py   :      255 lines
.md   :       57 lines
.toml :       17 lines

Download files

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

Source Distribution

linecounter_python-2.1.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linecounter_python-2.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file linecounter_python-2.1.1.tar.gz.

File metadata

  • Download URL: linecounter_python-2.1.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.2

File hashes

Hashes for linecounter_python-2.1.1.tar.gz
Algorithm Hash digest
SHA256 a503de2b9bd2f537ebb7b1490128fc5f82296b95bf494b86111970b29bebe864
MD5 91718c9a9f4797cb7552c7b619f1b0d9
BLAKE2b-256 99f40d9e8c5b733a989054f7bebc7ec5fa4b3aeedbab4f32e0f3f94baf72ce31

See more details on using hashes here.

File details

Details for the file linecounter_python-2.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for linecounter_python-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbe54303162ce32857e58095a5e193dfea05b0316e213b8f8413a1b3639ba158
MD5 f833d3dac2e81032f877999839d1fcfd
BLAKE2b-256 e34d25b97b21a7afaa618e1491f3d4afac846d646f0eff00d276d5362c087735

See more details on using hashes here.

Supported by

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