-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from 1911860538/feat-meta
doc: update README.md
- Loading branch information
Showing
1 changed file
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,46 @@ | ||
# line-counter | ||
The line-counter project is a Go-based utility that quickly analyzes directories and provides detailed statistics on file types, line counts, and empty lines. It's a handy tool for developers and administrators seeking insights into their codebase or file structure. | ||
| ||
The line-counter is a Go-based command line tool, | ||
that quickly analyzes directories and provides detailed statistics | ||
on file types, line counts, empty lines, and so on. | ||
It's a handy tool for developers and administrators | ||
seeking insights into their codebase. | ||
|
||
## Getting started | ||
### Install | ||
```shell | ||
go install github.com/1911860538/line-counter@latest | ||
``` | ||
### Usage | ||
```text | ||
$ line-counter --help | ||
Usage of line-counter: | ||
-in string | ||
ignore directories or files from statistics. | ||
For example: a/b/,a/c/x.txt | ||
-it string | ||
ignore types from statistics. | ||
For example: json,xml | ||
-n string | ||
target directory or file for statistics. Default is the current directory. | ||
-t string | ||
file types for statistics. | ||
For example: txt,go,py | ||
``` | ||
### Run | ||
```text | ||
$ line-counter -in=vendor -it=exe,mod | ||
2024/04/12 11:03:47 The target is `/home/someone/code/line-counter`. | ||
+---------------------------------------------------------------------------------------------------------------------------------------------+ | ||
| line-counter | | ||
+-----------+-------+----------+---------+---------+---------+-------+----------+----------+----------+-----------+--------------+------------+ | ||
| Extension | Count | SizeSum | SizeMin | SizeMax | SizeAvg | Lines | LinesMin | LinesMax | LinesAvg | LinesCode | LinesComment | LinesBlank | | ||
+-----------+-------+----------+---------+---------+---------+-------+----------+----------+----------+-----------+--------------+------------+ | ||
| .go | 39 | 15.66 KB | 96 B | 2.73 KB | 411 B | 903 | 6 | 120 | 23 | 774 | 0 | 129 | | ||
| .md | 1 | 851 B | 851 B | 851 B | 851 B | 35 | 35 | 35 | 35 | 26 | 5 | 4 | | ||
| .sum | 1 | 905 B | 905 B | 905 B | 905 B | 10 | 10 | 10 | 10 | 10 | 0 | 0 | | ||
+-----------+-------+----------+---------+---------+---------+-------+----------+----------+----------+-----------+--------------+------------+ | ||
2024/04/12 11:03:47 Done! Successfully calculated statistic in 8 milliseconds. | ||
``` |