-
-
Notifications
You must be signed in to change notification settings - Fork 183
/
package.json
289 lines (289 loc) · 9.42 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
{
"bin": {
"git-stats": "bin/git-stats"
},
"name": "git-stats",
"version": "3.2.0",
"description": "Local git statistics including GitHub-like contributions calendars.",
"main": "lib/index.js",
"scripts": {
"test": "node test",
"postinstall": "node scripts/migration/2.0.0.js"
},
"author": "Ionică Bizău <[email protected]> (https://ionicabizau.net)",
"contributors": [
"Gnab <[email protected]>",
"William Boman <[email protected]>",
"Fabian Furger <[email protected]>",
"Jonah Lawrence <[email protected]>"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/IonicaBizau/git-stats.git"
},
"keywords": [
"git",
"stats",
"github",
"cli"
],
"bugs": {
"url": "https://github.com/IonicaBizau/git-stats/issues"
},
"homepage": "https://github.com/IonicaBizau/git-stats",
"dependencies": {
"abs": "^1.0.0",
"bug-killer": "^4.0.0",
"cli-gh-cal": "^1.4.0",
"cli-pie": "^2.0.0",
"deffy": "^2.2.2",
"gitlog-parser": "0.0.4",
"gry": "^6.1.0",
"is-there": "^4.0.0",
"iterate-object": "^1.1.0",
"moment": "^2.29.3",
"r-json": "^1.0.0",
"tilda": "^4.3.3",
"typpy": "^2.1.0",
"ul": "^5.0.0",
"w-json": "^1.0.0"
},
"blah": {
"h_img": "http://i.imgur.com/Q7TQYHx.png",
"description": [
{
"p": "I'd be curious to see your calendar with all your commits. Ping me on Twitter ([**@IonicaBizau**](https://twitter.com/IonicaBizau)). :smile: Until then, here's my calendar:"
},
{
"img": {
"source": "http://i.imgur.com/PpM0i3v.png"
}
},
{
"h2": "Contents"
},
{
"ul": [
"[Installation](#cloud-installation)",
[
"[Usage](#usage)",
{
"ul": [
"[Importing and deleting commits](#importing-and-deleting-commits)",
"[Importing all the commits from GitHub and BitBucket](#importing-all-the-commits-from-github-and-bitbucket)",
"[What about the GitHub Contributions calendar?](#what-about-the-github-contributions-calendar)"
]
}
],
"[Documentation](#memo-documentation)",
"[How to contribute](#yum-how-to-contribute)"
]
}
],
"installation_command": {
"language": "sh",
"content": [
"# Install the package globally",
"npm i -g git-stats",
"",
"# Initialize git hooks",
"# This is for tracking the new commits",
"curl -s https://raw.githubusercontent.com/IonicaBizau/git-stats/master/scripts/init-git-post-commit | bash"
]
},
"installation": [
{
"h2": "Usage"
},
{
"h3": "Importing and deleting commits"
},
{
"p": [
"I know it's not nice to start your git commit calendar from scratch. That's why I created [`git-stats-importer`](https://github.com/IonicaBizau/git-stats-importer)–a tool which imports or deletes the commits from selected repositories.",
"Check it out here: https://github.com/IonicaBizau/git-stats-importer",
"The usage is simple:"
]
},
{
"code": {
"language": "sh",
"content": [
"# Install the importer tool",
"$ npm install -g git-stats-importer",
"",
"# Go to the repository you want to import",
"$ cd path/to/my-repository",
"",
"# Import the commits",
"$ git-stats-importer",
"",
"# ...or delete them if that's a dummy repository",
"$ git-stats-importer --delete"
]
}
},
{
"h3": "Importing all the commits from GitHub and BitBucket"
},
{
"p": "Yes, that's also possible. I [built a tool which downloads and then imports all the commits you have pushed to GitHub and BitBucket](https://github.com/IonicaBizau/repository-downloader)!"
},
{
"code": {
"language": "sh",
"content": [
"# Download the repository downloader",
"$ git clone https://github.com/IonicaBizau/repository-downloader.git",
"",
"# Go to repository downloader",
"$ cd repository-downloader",
"",
"# Install the dependencies",
"$ npm install",
"",
"# Start downloading and importing",
"$ ./start"
]
}
},
{
"h3": "What about the GitHub Contributions calendar?"
},
{
"p": "If you want to visualize the calendars that appear on GitHub profiles, you can do that using [`ghcal`](https://github.com/IonicaBizau/ghcal)."
},
{
"code": {
"language": "sh",
"content": [
"# Install ghcal",
"$ npm install -g ghcal",
"",
"# Check out @alysonla's contributions",
"$ ghcal -u alysonla"
]
}
},
{
"p": [
"For more detailed documentation, check out the repository: https://github.com/IonicaBizau/ghcal.",
"If want to get even more GitHub stats in your terminal, you may want to try [`github-stats`](https://github.com/IonicaBizau/github-stats)--this is like `git-stats` but with data taken from GitHub."
]
},
{
"h2": "Using the configuration file"
},
{
"p": [
"You can tweak the git-stats behavior using a configuration file in your home directory: `~/.git-stats-config.js`.",
"This file should export an object, like below (defaults are listed):"
]
},
{
"code": {
"language": "js",
"content": [
"module.exports = {",
" // \"DARK\", \"LIGHT\" or an object interpreted by IonicaBizau/node-git-stats-colors",
" \"theme\": \"DARK\"",
"",
" // The file where the commit hashes will be stored",
" , \"path\": \"~/.git-stats\"",
"",
" // [DEPRECATED] First day of the week https://github.com/IonicaBizau/git-stats/issues/121",
" , first_day: \"Sun\"",
"",
" // This defaults to *one year ago*",
" // It can be any parsable date",
" , since: undefined",
"",
" // This defaults to *now*",
" // It can be any parsable date",
" , until: undefined",
"",
" // Don't show authors by default",
" // If true, this will enable the authors pie",
" , authors: false",
"",
" // No global activity by default",
" // If true, this will enable the global activity calendar in the current project",
" , global_activity: false",
"};"
]
}
},
{
"p": "Since it's a js file, you can `require` any other modules there."
},
{
"h2": "Saving the data as HTML and images"
},
{
"p": [
"`git-stats --raw` outputs raw JSON format which can be consumed by other tools to generate results such as HTML files or images.",
"[`git-stats-html`](https://github.com/IonicaBizau/git-stats-html) interprets the JSON data and generates an HTML file. Example:",
{
"code": {
"content": [
"# Install git-stats-html",
"npm install -g git-stats-html",
"",
"# Export the data from the last year (generate out.html)",
"git-stats --raw | git-stats-html -o out.html",
"",
"# Export data since 2015 (save the results in out.html)",
"git-stats --since '1 January 2015' --raw | ./bin/git-stats-html -o out.html --big"
],
"language": "sh"
}
},
"After we have the HTML file, we can generate an image file using [`pageres`](https://github.com/sindresorhus/pageres) by [**@sindresorhus**](https://github.com/sindresorhus/):",
{
"code": {
"content": [
"# Install pageres",
"npm install -g pageres-cli",
"",
"# Generate the image from HTML",
"pageres out.html 775x250"
],
"language": "sh"
}
}
]
},
{
"h2": "Cross-platform compatibility"
},
{
"p": [
"`git-stats` is working fine in terminal emulators supporting ANSI styles. It should work fine on Linux and OS X.",
"If you run `git-stats` to display graph on Windows, please use a terminal that can properly display ANSI colors.",
"Cygwin Terminal is known to work, while Windows Command Prompt and Git Bash do not. Improvements are more than welcome! :dizzy:"
]
}
],
"press": {
"ul": [
"[*A GitHub-like contributions calendar, but locally, with all your git commits*, The Changelog](https://changelog.com/github-like-contributions-calendar-locally-git-commits/)"
]
}
},
"files": [
"bin/",
"app/",
"lib/",
"dist/",
"src/",
"scripts/",
"resources/",
"menu/",
"cli.js",
"index.js",
"bloggify.js",
"bloggify.json",
"bloggify/"
]
}