github.com/KMilkevych/linecount
master / published Feb 4, 2025 / repository
A tool to count lines of code in your projects and display the information in a fancy way
linecount
A tool to summarize the type and amount of code written inside directories and files.
Installation
Build linecount using:
crystal build src/linecount.cr
then run using:
./linecount [flags] [files/directories]
Usage
The tool can be executed as is, e.g. by running ./linecount which will summarize the current directory with recursive descent.
Files can be specified by passing their names as arguments to the call:
./linecount testfile.txt testdir1 testdir2
To specify a maximum recursion depth use the -d or --depth flag:
./linecount --depth 2 testdir
Using --depth 0 disables recursion and only examines the files in top-level.
Contributing
- Fork it (https://github.com/KMilkevych/linecount/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Kostiantyn Milkevych - creator and maintainer
- Peter Pisarczyk - gist containing information on file formats and programming languages
API
- Filemod
Module for interacting with files and directories
- LanguageSpec
Used for working with languages Data parsed from https://gist.github.com/ppisarczyk/43962d06686722d26d176fad46879d41
- Linecount
Counts lines in files