You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -75,42 +73,12 @@ Then, run `<%- _.pack.name %> --help` and see what the cli tool can do.
75
73
76
74
```sh
77
75
$ git-stats --help
78
-
git-stats --help
79
-
A GitHub-like contributions calendar, but locally, with all your git commits.
80
-
81
-
usage: git-stats [start] [end] [options] [data]
82
-
83
-
start: Optional start date
84
-
end: Optional end date
85
-
86
-
options:
87
-
-v Displays version information.
88
-
-h --help Displays this help.
89
-
--no-ansi Doesn't use ANSI colors in the squares.
90
-
--record <data> Records a new commit. Don't use this unless you are
91
-
a mad scientist. If you are a developer, just use this
92
-
option as part of the module.
93
-
--light Enable the light theme.
94
-
95
-
examples:
96
-
git-stats # Displays your commit calendar
97
-
git-stats -v
98
-
git-stats -h
99
-
git-stats --light # Light mode
100
-
git-stats '1 January 2012' # All the commits from 1 January 2012, to now
101
-
git-stats '1 January 2012' '31 December 2012' # All the commits from 2012
102
-
103
-
Your commit history is kept in the .git-stats, in your $HOME directory (~/)
104
-
105
-
Documentation can be found at https://github.com/IonicaBizau/git-stats
76
+
TODO
106
77
```
107
78
108
-
If you run `git-stats` to display graph on Windows, please use a terminal that can properly display ANSI colors.
109
-
Cygwin Terminal is known to work, while Windows Command Prompt and Git Bash do not.
110
-
111
79
### Importing and deleting commits
112
80
I know it's not nice to start your git commit calendar from scratch. That's why I
113
-
created a `git-stats-importer` that imports or deletes the commits from a repository.
81
+
created [`git-stats-importer`](https://github.com/IonicaBizau/git-stats-importer)--a tool which imports or deletes the commits from selected repositories.
114
82
115
83
Check it out here: https://github.com/IonicaBizau/git-stats-importer
116
84
@@ -131,7 +99,7 @@ $ git-stats-importer --delete
131
99
```
132
100
133
101
### Importing all the commits from GitHub and BitBucket
134
-
Yes, you read correctly! That's also possible. I [built a tool for that too](https://github.com/IonicaBizau/repository-downloader)!
102
+
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)!
135
103
136
104
```sh
137
105
# Download the repository downloader
@@ -146,18 +114,62 @@ $ npm install
146
114
# Start downloading and importing
147
115
$ ./start
148
116
```
149
-
### See the GitHub Contributions calendar
150
-
There is a solution for that, too! :smile: It's called [`ghcal`](https://github.com/IonicaBizau/ghcal).
117
+
### What about the GitHub Contributions calendar?
118
+
If you want to visualize the calendars that appear on GitHub profiles, you can do that using [`ghcal`](https://github.com/IonicaBizau/ghcal).
151
119
152
120
```sh
153
121
# Install ghcal
154
122
$ npm install -g ghcal
155
123
156
-
# Checkout my contributions
157
-
$ ghcal ionicabizau
124
+
# Check out @alysonla's contributions
125
+
$ ghcal -u alysonla
158
126
```
127
+
159
128
For more detailed documentation, check out the repository: https://github.com/IonicaBizau/ghcal.
160
129
130
+
If want to get even more GitHub stats in your terminal, you may want to try [`github-stats`](https://github.com/Ioni56caBizau/github-stats)--this is like `git-stats` but with data taken from GitHub.
131
+
132
+
## Using the configuration file
133
+
You can tweak the git-stats behavior using a configuration file in your home directory: `~/.git-stats-config.json`.
134
+
135
+
This file will contain a JSON object like below (in this example comments are added to explain what's going on, but you should not include them since the JSON format doesn't support such comments). Defaults are listed.
136
+
137
+
```js
138
+
{
139
+
// "DARK", "LIGHT" or an object interpreted by IonicaBizau/node-git-stats-colors
140
+
"theme":"DARK"
141
+
142
+
// The file where the commit hashes will be stored
143
+
, "path":"~/.git-stats"
144
+
145
+
// First day of the week
146
+
, first_day:"Sun"
147
+
148
+
// This defaults to *one year ago*
149
+
// It can be any parsable date
150
+
, since:undefined
151
+
152
+
// This defaults to *now*
153
+
// It can be any parsable date
154
+
, until:undefined
155
+
156
+
// Don't show authors by default
157
+
// If true, this will enable the authors pie
158
+
, authors:false
159
+
160
+
// No global activity by default
161
+
// If true, this will enable the global activity calendar in the current project
162
+
, global_activity:false
163
+
}
164
+
```
165
+
166
+
## Cross-platform compatibility
167
+
168
+
`git-stats` is working fine in terminal emulators supporting ANSI styles. It should work fine on Linux and OS X.
169
+
170
+
If you run `git-stats` to display graph on Windows, please use a terminal that can properly display ANSI colors.
171
+
Cygwin Terminal is known to work, while Windows Command Prompt and Git Bash do not. Improvements are more than welcome! :dizzy:
172
+
161
173
<% // Show the example if there is one %>
162
174
<% if (example) { %>
163
175
<% var exStrPath = Path.join(example, "index.js"); %>
Then, run `git-stats --help` and see what the cli tool can do.
51
49
52
50
```sh
53
51
$ git-stats --help
54
-
git-stats --help
55
-
A GitHub-like contributions calendar, but locally, with all your git commits.
56
-
57
-
usage: git-stats [start] [end] [options] [data]
58
-
59
-
start: Optional start date
60
-
end: Optional end date
61
-
62
-
options:
63
-
-v Displays version information.
64
-
-h --help Displays this help.
65
-
--no-ansi Doesn't use ANSI colors in the squares.
66
-
--record <data> Records a new commit. Don't use this unless you are
67
-
a mad scientist. If you are a developer, just use this
68
-
option as part of the module.
69
-
--light Enable the light theme.
70
-
71
-
examples:
72
-
git-stats # Displays your commit calendar
73
-
git-stats -v
74
-
git-stats -h
75
-
git-stats --light # Light mode
76
-
git-stats '1 January 2012'# All the commits from 1 January 2012, to now
77
-
git-stats '1 January 2012''31 December 2012'# All the commits from 2012
78
-
79
-
Your commit history is kept in the .git-stats, in your $HOME directory (~/)
80
-
81
-
Documentation can be found at https://github.com/IonicaBizau/git-stats
52
+
TODO
82
53
```
83
54
84
-
If you run `git-stats` to display graph on Windows, please use a terminal that can properly display ANSI colors.
85
-
Cygwin Terminal is known to work, while Windows Command Prompt and Git Bash do not.
86
-
87
55
### Importing and deleting commits
88
56
I know it's not nice to start your git commit calendar from scratch. That's why I
89
-
created a `git-stats-importer` that imports or deletes the commits from a repository.
57
+
created [`git-stats-importer`](https://github.com/IonicaBizau/git-stats-importer)--a tool which imports or deletes the commits from selected repositories.
90
58
91
59
Check it out here: https://github.com/IonicaBizau/git-stats-importer
92
60
@@ -107,7 +75,7 @@ $ git-stats-importer --delete
107
75
```
108
76
109
77
### Importing all the commits from GitHub and BitBucket
110
-
Yes, you read correctly! That's also possible. I [built a tool for that too](https://github.com/IonicaBizau/repository-downloader)!
78
+
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)!
111
79
112
80
```sh
113
81
# Download the repository downloader
@@ -122,18 +90,62 @@ $ npm install
122
90
# Start downloading and importing
123
91
$ ./start
124
92
```
125
-
### See the GitHub Contributions calendar
126
-
There is a solution for that, too! :smile: It's called[`ghcal`](https://github.com/IonicaBizau/ghcal).
93
+
### What about the GitHub Contributions calendar?
94
+
If you want to visualize the calendars that appear on GitHub profiles, you can do that using[`ghcal`](https://github.com/IonicaBizau/ghcal).
127
95
128
96
```sh
129
97
# Install ghcal
130
98
$ npm install -g ghcal
131
99
132
-
#Checkout my contributions
133
-
$ ghcal ionicabizau
100
+
#Check out @alysonla's contributions
101
+
$ ghcal -u alysonla
134
102
```
103
+
135
104
For more detailed documentation, check out the repository: https://github.com/IonicaBizau/ghcal.
136
105
106
+
If want to get even more GitHub stats in your terminal, you may want to try [`github-stats`](https://github.com/Ioni56caBizau/github-stats)--this is like `git-stats` but with data taken from GitHub.
107
+
108
+
## Using the configuration file
109
+
You can tweak the git-stats behavior using a configuration file in your home directory: `~/.git-stats-config.json`.
110
+
111
+
This file will contain a JSON object like below (in this example comments are added to explain what's going on, but you should not include them since the JSON format doesn't support such comments). Defaults are listed.
112
+
113
+
```js
114
+
{
115
+
// "DARK", "LIGHT" or an object interpreted by IonicaBizau/node-git-stats-colors
116
+
"theme":"DARK"
117
+
118
+
// The file where the commit hashes will be stored
119
+
, "path":"~/.git-stats"
120
+
121
+
// First day of the week
122
+
, first_day:"Sun"
123
+
124
+
// This defaults to *one year ago*
125
+
// It can be any parsable date
126
+
, since:undefined
127
+
128
+
// This defaults to *now*
129
+
// It can be any parsable date
130
+
, until:undefined
131
+
132
+
// Don't show authors by default
133
+
// If true, this will enable the authors pie
134
+
, authors:false
135
+
136
+
// No global activity by default
137
+
// If true, this will enable the global activity calendar in the current project
138
+
, global_activity:false
139
+
}
140
+
```
141
+
142
+
## Cross-platform compatibility
143
+
144
+
`git-stats` is working fine in terminal emulators supporting ANSI styles. It should work fine on Linux and OS X.
145
+
146
+
If you run `git-stats` to display graph on Windows, please use a terminal that can properly display ANSI colors.
147
+
Cygwin Terminal is known to work, while Windows Command Prompt and Git Bash do not. Improvements are more than welcome! :dizzy:
148
+
137
149
## Example
138
150
139
151
Here is an example how to use this package as library.
0 commit comments