1
1
[ ![ 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 )
2
2
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.
6
7
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
10
8
11
9
# Installation
12
10
13
- $ gem install git-keyword-stats
11
+ ``` sh
12
+ gem install git-keyword-stats
13
+ ```
14
14
15
15
# Usage
16
16
17
- $ git-keyword-stats --help
18
- git-keyword-stats
19
-
17
+ ``` sh
18
+ git-keyword-stats --help
19
+ ```
20
+
21
+ ``` sh
20
22
Usage:
21
23
git-keyword-stats [options] [messages| diffs]
22
24
@@ -32,41 +34,61 @@ git repository's commit messages.
32
34
33
35
Readme:
34
36
https://github.com/arzzen/git-keyword-stats
35
-
37
+ ```
36
38
37
39
# Example Output
38
40
39
41
### With default keywords (bugfix,clear,typo,hotfix,debug,bug)
40
42
41
- $ git keyword-stats
43
+ ```sh
44
+ git keyword-stats
45
+ ```
46
+
47
+ ```sh
42
48
Reading in git log... done!
43
49
Parsing git log.
44
50
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
61
68
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
+ ```
71
84
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
+
72
94
0 commit comments