Skip to main content

cloc (Count LOC) is a terminal utility to easily count lines of code in a file / project.

Project description

cloc

Description

cloc (Count LOC) is a simple terminal utility to easily count lines of code in a file / project.

Installation

Windows, Linux & Mac

  1. Make sure you have a recent version of Python installed.
  2. Run the command pip install plazma-cloc to install.
  3. Done.

Usage

  1. Open a terminal and run the command cloc <PATH_TO_FILE_OR_PROJECT>
  2. For help run the command cloc -h

To narrow the file types down use the --ignore flag. This flag allows you to ignore certain files, directories and file extensions.

Ignoring singular files

To ignore one file use cloc your_project_folder --ignore your_file.txt

You can also ignore multiple files with this same syntax.

E.G. cloc your_project_folder --ignore "your_file.txt" "your_other_file.txt"

Note: It is good practice to surround each file / directory / extension in quotation marks to avoid your terminal getting confused

Ignoring singular directories

To ignore one directory use cloc your_project_folder --ignore your_directory

You can also ignore multiple directories with this same syntax.

E.G. cloc your_project_folder --ignore "your_directory" "your_other_directory"

Ignoring files with certain file extensions

To ignore all files with a certain file extension use `cloc your_project_folder --ignore "*.txt"

The '*' character is a wildcard character and tells the program it means every file with the file extension after the wildcard.

Then after the wildcard you enter the file extension. E.G. ".txt" or ".exe"...

You can also ignore multiple file extensions with the same syntax as before. cloc your_project_folder --ignore "*.txt" "*.exe" "*.json"

Ignoring all directories with the same name

To ignore all directories with the same name use a similar ignore pattern as before: cloc your_project_folder --ignore your_directory/*

You must append /* to the end of the directory name so that the program knows it is a recursive directory ignore.

You can ignore multiple directories using a similar command: cloc your_project_folder --ignore "your_directory/*" "your_other_directory/*"

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

plazma_cloc-1.0.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

plazma_cloc-1.0.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file plazma_cloc-1.0.0.tar.gz.

File metadata

  • Download URL: plazma_cloc-1.0.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for plazma_cloc-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1f14ec98b0f1b2b17246c9d9f0b24b7d0a875cf3a9edc8881e3dad0e42b41b08
MD5 1a291432e48f37a71867da36c5bf46fe
BLAKE2b-256 ce1b0d08c72e2c448db5db81780e42c89766b53f8d283401af5a18fd9d8629e3

See more details on using hashes here.

File details

Details for the file plazma_cloc-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: plazma_cloc-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for plazma_cloc-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe52d7f94046e892d2963cdbee43fc70bc7fb98162e8ed2e6f5b95dc38842947
MD5 5b809d1e38a4f30d83f6f0de6dea94ce
BLAKE2b-256 180c4704aef2c2c4d07dad485447525179336e3e812863541936813ed0a344ad

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