Skip to content

Commit c3ee5ae

Browse files
committed
📝 New docs
1 parent f8adda1 commit c3ee5ae

File tree

2 files changed

+104
-80
lines changed

2 files changed

+104
-80
lines changed

.blah/README.ejs

+52-40
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ I'd be curious to see your calendar with all your commits. Ping me on Twitter ([
4848
## Contents
4949

5050
- [Installation](#installation)
51-
- [Catching the `git commit` command](#catching-the-git-commit-command)
52-
- [Using `git` hooks](#using-git-hooks)
53-
- [Overriding the `git` command](#overriding-the-git-command)
5451
- [Usage](#usage)
5552
- [Importing and deleting commits](#importing-and-deleting-commits)
5653
- [Importing all the commits from GitHub and BitBucket](#importing-all-the-commits-from-github-and-bitbucket)
@@ -67,6 +64,7 @@ You can install the package globally and use it as command line tool:
6764
# Install the package globally
6865
npm i -g <%- _.pack.name %>
6966
# Initialize git hooks
67+
# This is for tracking the new commits
7068
curl -s https://raw.githubusercontent.com/IonicaBizau/git-stats/master/scripts/init-git-post-commit | bash
7169
```
7270
@@ -75,42 +73,12 @@ Then, run `<%- _.pack.name %> --help` and see what the cli tool can do.
7573
7674
```sh
7775
$ 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
10677
```
10778
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-
11179
### Importing and deleting commits
11280
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.
11482
11583
Check it out here: https://github.com/IonicaBizau/git-stats-importer
11684
@@ -131,7 +99,7 @@ $ git-stats-importer --delete
13199
```
132100
133101
### 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)!
135103
136104
```sh
137105
# Download the repository downloader
@@ -146,18 +114,62 @@ $ npm install
146114
# Start downloading and importing
147115
$ ./start
148116
```
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).
151119
152120
```sh
153121
# Install ghcal
154122
$ npm install -g ghcal
155123
156-
# Checkout my contributions
157-
$ ghcal ionicabizau
124+
# Check out @alysonla's contributions
125+
$ ghcal -u alysonla
158126
```
127+
159128
For more detailed documentation, check out the repository: https://github.com/IonicaBizau/ghcal.
160129
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+
161173
<% // Show the example if there is one %>
162174
<% if (example) { %>
163175
<% var exStrPath = Path.join(example, "index.js"); %>

README.md

+52-40
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ I'd be curious to see your calendar with all your commits. Ping me on Twitter ([
2626
## Contents
2727

2828
- [Installation](#installation)
29-
- [Catching the `git commit` command](#catching-the-git-commit-command)
30-
- [Using `git` hooks](#using-git-hooks)
31-
- [Overriding the `git` command](#overriding-the-git-command)
3229
- [Usage](#usage)
3330
- [Importing and deleting commits](#importing-and-deleting-commits)
3431
- [Importing all the commits from GitHub and BitBucket](#importing-all-the-commits-from-github-and-bitbucket)
@@ -44,49 +41,20 @@ You can install the package globally and use it as command line tool:
4441
# Install the package globally
4542
npm i -g git-stats
4643
# Initialize git hooks
44+
# This is for tracking the new commits
4745
curl -s https://raw.githubusercontent.com/IonicaBizau/git-stats/master/scripts/init-git-post-commit | bash
4846
```
4947

5048
Then, run `git-stats --help` and see what the cli tool can do.
5149

5250
```sh
5351
$ 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
8253
```
8354

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-
8755
### Importing and deleting commits
8856
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.
9058

9159
Check it out here: https://github.com/IonicaBizau/git-stats-importer
9260

@@ -107,7 +75,7 @@ $ git-stats-importer --delete
10775
```
10876

10977
### 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)!
11179

11280
```sh
11381
# Download the repository downloader
@@ -122,18 +90,62 @@ $ npm install
12290
# Start downloading and importing
12391
$ ./start
12492
```
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).
12795

12896
```sh
12997
# Install ghcal
13098
$ npm install -g ghcal
13199

132-
# Checkout my contributions
133-
$ ghcal ionicabizau
100+
# Check out @alysonla's contributions
101+
$ ghcal -u alysonla
134102
```
103+
135104
For more detailed documentation, check out the repository: https://github.com/IonicaBizau/ghcal.
136105

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+
137149
## Example
138150

139151
Here is an example how to use this package as library.

0 commit comments

Comments
 (0)