Skip to main content

Simple Python CLI to count SLOC in a codebase

Project description

lncn

Lncn is a simple python CLI that counts the SLOC (source lines of code) in a file or directory.

To install, simply run pip install lncn. Make sure the Scripts/ directory in your python installation is on the PATH.

If you want to count the lines within a project, just specify the directory as an absolute path. If you located within the directory, use '.'.

Common non-source files (documentation, metadata, configurations, build artifacts, assets, data, etc.) are ignored by default, but specific paths to ignore beyond this can be specified with the -i / --ignore flag. To disable this, and include everything by default, use the -k / --keep-all flag.

When specifying paths to ignore, '*' can be used to signify some arbitrary text, similar to the syntax of a gitignore file. For example, to ignore all python and all shell files in a directory, you could put --ignore *.py *.sh. Note that this does not work with more complex gitignore syntax.

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

lncn-0.2.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

lncn-0.2.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file lncn-0.2.0.tar.gz.

File metadata

  • Download URL: lncn-0.2.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for lncn-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5f162cdba95fdcc0a1353d101c1be3417e6e224ce9d2d06ff00eacfcfec0e23e
MD5 20065d3a14c952cc7e03c1cdf54d2b1f
BLAKE2b-256 a6aeac642d609e9ce6f22e8e7e0e2a714008ea19abb46fd7ac77ef40fb0ef9f9

See more details on using hashes here.

File details

Details for the file lncn-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: lncn-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for lncn-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 775cedd353525663067c69b59678aeff475a5282232291ba704a00bc39614ba4
MD5 313dea24cab6e145f945ffb1b66d5dde
BLAKE2b-256 fe5f7d09e09a20d5c0202103116c2e2d1d5daadc850bb5d85cc6113dbde370cd

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