Skip to content

Commit b92c7e2

Browse files
committed
docs: update instructions for use
1 parent 1359521 commit b92c7e2

File tree

2 files changed

+69
-2
lines changed

2 files changed

+69
-2
lines changed

README.md

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# git-commit-analytics
22

3-
Developing…
4-
53
A tool to analyze your git repository's commit log. I can help you generate daily/weekly or longer work reports.
64

75
一个可以分析你的 Git 仓库 commit 记录的工具。它可以帮你生成一份工作日报 / 周报,或者你需要的更长时间范围的工作报告。
@@ -17,3 +15,70 @@ This is a client tool, so you need to download the program to use it. See: [The
1715
You can look at the [CHANGELOG](./CHANGELOG.md) to understand the content of each update.
1816

1917
你可以查看 [更新记录](./CHANGELOG.md) 去了解每个版本的更新内容。
18+
19+
## Usage
20+
21+
Create and fill in your configuration file, and then run the program to get your work report.
22+
23+
创建并填写你的配置文件,然后运行程序,即可获得你的工作报告。
24+
25+
## Configuration
26+
27+
You need to create a `config.json` at the same folder with the program, and write the content in the following format.
28+
29+
你需要在与程序相同的文件夹下,创建一个名为 `config.json` 的文件,并写入以下格式的内容。
30+
31+
```json
32+
{
33+
"lang": "zh",
34+
"authors": [
35+
"chengpeiquan"
36+
],
37+
"dateRange": [
38+
"2021-12-01",
39+
"2021-12-31"
40+
],
41+
"repos": [
42+
"D:\\Project\\node-project\\git-commit-analytics"
43+
],
44+
"format": {
45+
"git-commit-analytics": "Git Commit Analytics"
46+
},
47+
"includes": [
48+
"feat",
49+
"fix",
50+
"docs",
51+
"style",
52+
"refactor",
53+
"test",
54+
"chore"
55+
],
56+
"excludes": [
57+
"typo",
58+
"backup",
59+
"progress"
60+
]
61+
}
62+
```
63+
64+
The configuration items are described as follows:
65+
66+
配置项说明如下:
67+
68+
key|type|description
69+
:-:|:-:|:-:
70+
lang|string|Set program default language, support `en` (English) and `zh` (Simplified Chinese).<br>设置软件的默认语言,支持 `en` (英语)和 `zh` (简体中文)。
71+
authors|string[]|Filter the author name of commits, support multiple author names, for you may have different names in different repos.<br>筛选 commit 的作者名称,支持多个作者名称,用于你在不同的仓库可能有不同的名字。
72+
dateRange|[string, string]|Fill in [start date, end date], support the legal time format, and count from the start date `00:00:00` to the end date `23:59:59`.<br>填写 [开始日期, 结束日期] , 支持合法的时间格式,会从开始日期的 `00:00:00` 统计到截止日期的 `23:59:59`
73+
repos|string[]|The Git repo folder on your computer, need to be switched to the branch you want to count.<br>你电脑里的 Git 仓库文件夹,需要提前切换到你要统计的分支。
74+
format|{ [key: string]: string }|Format your folder name as the project name.<br>格式化你的文件夹名称为项目名。
75+
includes|string[]|The commit message prefix to be included in the statistics.<br>要纳入统计的 commit message 前缀。
76+
excludes|string[]|In the statistical results, exclude commit messages that contain these keywords.<br>在统计出来的结果里,排除掉包含了这些关键词的 commit message 。
77+
78+
Among them, `authors` / `includes` / `excludes` will be created as regular expressions to match data.
79+
80+
其中,`authors` / `includes` / `excludes` 会创建为正则表达式去匹配数据。
81+
82+
## License
83+
84+
[MIT License](./LICENSE) © 2019 [chengpeiquan](https://github.com/chengpeiquan)

config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
"2021-12-31"
1010
],
1111
"repos": [
12+
"D:\\Project\\node-project\\git-commit-analytics",
1213
"D:\\Project\\npm-project\\vue-picture-cropper",
1314
"D:\\Project\\npm-project\\vue-baidu-analytics",
1415
"D:\\Project\\npm-project\\vue-cnzz-analytics"
1516
],
1617
"format": {
18+
"git-commit-analytics": "Git Commit Analytics",
1719
"vue-picture-cropper": "Vue Picture Cropper",
1820
"vue-baidu-analytics": "Vue Baidu Analytics",
1921
"vue-cnzz-analytics": "Vue CNZZ Analytics"

0 commit comments

Comments
 (0)