Skip to content

Commit

Permalink
Merge pull request #12 from 1911860538/feat-meta
Browse files Browse the repository at this point in the history
doc: update README.md
  • Loading branch information
1911860538 authored Apr 12, 2024
2 parents e876e0f + af57f5e commit a059575
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion README.md
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.
```

0 comments on commit a059575

Please sign in to comment.