Skip to content

Commit f639051

Browse files
authored
Update README.md
1 parent 9b261f1 commit f639051

File tree

1 file changed

+59
-37
lines changed

1 file changed

+59
-37
lines changed

README.md

Lines changed: 59 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
[![Gem Version](https://badge.fury.io/rb/git-keyword-stats.svg)](https://rubygems.org/gems/git-keyword-stats) [![Gem](https://img.shields.io/gem/dt/git-keyword-stats.svg)](https://rubygems.org/gems/git-keyword-stats)
22

3-
Inspired by [git-swear-stats], [the Linux Kernel Fuck Count] and [its descendent],
4-
`git-keyword-stats` will give you some interesting statistics on keywording in a
5-
git repository's commit messages.
3+
How many times are words, names or functions found in the git repository?
4+
5+
`Git-keyword-stats` will give you some interesting statistics on keywording in a
6+
git repository's commit messages.
67

7-
[the Linux Kernel Fuck Count]: http://durak.org/sean/pubs/kfc/
8-
[its descendent]: http://www.vidarholen.net/contents/wordcount/
9-
[git-swear-stats]: https://github.com/xiongchiamiov/git-swear-stats
108

119
# Installation
1210

13-
$ gem install git-keyword-stats
11+
```sh
12+
gem install git-keyword-stats
13+
```
1414

1515
# Usage
1616

17-
$ git-keyword-stats --help
18-
git-keyword-stats
19-
17+
```sh
18+
git-keyword-stats --help
19+
```
20+
21+
```sh
2022
Usage:
2123
git-keyword-stats [options] [messages|diffs]
2224

@@ -32,41 +34,61 @@ git repository's commit messages.
3234
3335
Readme:
3436
https://github.com/arzzen/git-keyword-stats
35-
37+
```
3638
3739
# Example Output
3840
3941
### With default keywords (bugfix,clear,typo,hotfix,debug,bug)
4042
41-
$ git keyword-stats
43+
```sh
44+
git keyword-stats
45+
```
46+
47+
```sh
4248
Reading in git log... done!
4349
Parsing git log.
4450
45-
+----------------+------+-------+-----+-------+--------+
46-
| Author/Keyword | typo | clear | bug | debug | readme |
47-
+----------------+------+-------+-----+-------+--------+
48-
| arzzen | 2 | 2 | 1 | 2 | 0 |
49-
| xiongchiamiov | 0 | 0 | 0 | 8 | 1 |
50-
| James Pearson | 0 | 0 | 0 | 5 | 0 |
51-
+----------------+------+-------+-----+-------+--------+
52-
| Overall | 2 | 2 | 1 | 15 | 1 |
53-
+----------------+------+-------+-----+-------+--------+
54-
55-
### With custom keywords file
56-
57-
$ git keyword-stats --config="path/to/file.yml"
58-
59-
# example config file (cat path/to/file.yml)
60-
51+
+----------------+--------+---------+
52+
| Author/Keyword | rename | replace |
53+
+----------------+--------+---------+
54+
| arzzen | 2 | 2 |
55+
| xiongchiamiov | 0 | 1 |
56+
| James Pearson | 0 | 5 |
57+
+----------------+--------+---------+
58+
| Overall | 2 | 8 |
59+
+----------------+--------+---------+
60+
```
61+
62+
### Custom keywords
63+
64+
##### Example config.yml
65+
66+
```sh
67+
# list of keywords
6168
keywords:
62-
- 'bugfix'
63-
- '^(clear)$'
64-
- 'typo'
65-
- 'hotfix'
66-
- 'readme'
67-
- 'debug'
68-
- '^(bug)$'
69-
- '^(hot|typo|bug)fix$'
70-
69+
# you can use plain word
70+
- 'rename'
71+
- 'replace'
72+
# you can use regexp
73+
- '^(hot|typo|bug)fix$'
74+
- '^(love|hate|meh)$'
75+
- '^(trash|garbage|rubbish|junk)$'
76+
- '^(ture|treu|tuer|flase|fasle|fales)$'
77+
```
78+
79+
##### Usage config
80+
81+
```sh
82+
git keyword-stats --config="path/to/config.yml"
83+
```
7184
85+
### TL;DR
86+
87+
Inspired by [git-swear-stats], [the Linux Kernel Fuck Count] and [its descendent],
88+
89+
[the Linux Kernel Fuck Count]: http://durak.org/sean/pubs/kfc/
90+
[its descendent]: http://www.vidarholen.net/contents/wordcount/
91+
[git-swear-stats]: https://github.com/xiongchiamiov/git-swear-stats
92+
93+
7294

0 commit comments

Comments
 (0)