Updated docs

This commit is contained in:
Ionică Bizău 2017-03-20 19:18:24 +02:00
parent 67ae0c5045
commit b149eec702
3 changed files with 38 additions and 12 deletions

View file

@ -41,7 +41,8 @@ Records a new commit.
#### Return #### Return
- **GitStats** The `GitStats` instance. - **GitStats** The `GitStats` instance.
### `removeCommit(data, callback)` ### `record(data, callback)`
removeCommit
Deletes a specifc commit from the history. Deletes a specifc commit from the history.
#### Params #### Params

View file

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2015-17 Ionică Bizău <bizauionica@gmail.com> (http://ionicabizau.net) Copyright (c) 2015-17 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -3,7 +3,7 @@
# `$ git-stats` # `$ git-stats`
[![Patreon](https://img.shields.io/badge/Support%20me%20on-Patreon-%23e6461a.svg)][patreon] [![PayPal](https://img.shields.io/badge/%24-paypal-f39c12.svg)][paypal-donations] [![AMA](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/git-stats.svg)](https://www.npmjs.com/package/git-stats) [![Downloads](https://img.shields.io/npm/dt/git-stats.svg)](https://www.npmjs.com/package/git-stats) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github) [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Version](https://img.shields.io/npm/v/git-stats.svg)](https://www.npmjs.com/package/git-stats) [![Downloads](https://img.shields.io/npm/dt/git-stats.svg)](https://www.npmjs.com/package/git-stats)
> Local git statistics including GitHub-like contributions calendars. > Local git statistics including GitHub-like contributions calendars.
@ -20,11 +20,9 @@ I'd be curious to see your calendar with all your commits. Ping me on Twitter ([
- [Importing and deleting commits](#importing-and-deleting-commits) - [Importing and deleting commits](#importing-and-deleting-commits)
- [Importing all the commits from GitHub and BitBucket](#importing-all-the-commits-from-github-and-bitbucket) - [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) - [What about the GitHub Contributions calendar?](#what-about-the-github-contributions-calendar)
- [Documentation](#documentation) - [Documentation](#documentation)
- [How to contribute](#how-to-contribute) - [How to contribute](#how-to-contribute)
## :cloud: Installation ## :cloud: Installation
You can install the package globally and use it as command line tool: You can install the package globally and use it as command line tool:
@ -175,24 +173,39 @@ Since it's a js file, you can `require` any other modules there.
[`git-stats-html`](https://github.com/IonicaBizau/git-stats-html) interprets the JSON data and generates an HTML file. Example: [`git-stats-html`](https://github.com/IonicaBizau/git-stats-html) interprets the JSON data and generates an HTML file. Example:
```sh ```sh
# Install git-stats-html # Install git-stats-html
npm install -g git-stats-html npm install -g git-stats-html
# Export the data from the last year (generate out.html) # Export the data from the last year (generate out.html)
git-stats --raw | git-stats-html -o out.html git-stats --raw | git-stats-html -o out.html
# Export data since 2015 (save the results in 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 git-stats --since '1 January 2015' --raw | ./bin/git-stats-html -o out.html --big
``` ```
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/): 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/):
```sh ```sh
# Install pageres # Install pageres
npm install -g pageres-cli npm install -g pageres-cli
# Generate the image from HTML # Generate the image from HTML
pageres out.html 775x250 pageres out.html 775x250
``` ```
## Cross-platform compatibility ## Cross-platform compatibility
@ -238,20 +251,27 @@ For full API reference, see the [DOCUMENTATION.md][docs] file.
- [*A GitHub-like contributions calendar, but locally, with all your git commits*, The Changelog](https://changelog.com/github-like-contributions-calendar-locally-git-commits/) - [*A GitHub-like contributions calendar, but locally, with all your git commits*, The Changelog](https://changelog.com/github-like-contributions-calendar-locally-git-commits/)
## :yum: How to contribute ## :yum: How to contribute
Have an idea? Found a bug? See [how to contribute][contributing]. Have an idea? Found a bug? See [how to contribute][contributing].
## :moneybag: Donations ## :sparkling_heart: Support my projects
Another way to support the development of my open-source modules is I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously,
to [set up a recurring donation, via Patreon][patreon]. :rocket: this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).
[PayPal donations][paypal-donations] are appreciated too! Each dollar helps. However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
- Starring and sharing the projects you like :rocket:
- [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
- [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
- **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`
![](https://i.imgur.com/z6OQI95.png)
Thanks! :heart: Thanks! :heart:
## :dizzy: Where is this library used? ## :dizzy: Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles: If you are using this library in one of your projects, add it in this list. :sparkles:
@ -263,11 +283,16 @@ If you are using this library in one of your projects, add it in this list. :spa
[MIT][license] © [Ionică Bizău][website] [MIT][license] © [Ionică Bizău][website]
[badge_patreon]: http://ionicabizau.github.io/badges/patreon.svg
[badge_amazon]: http://ionicabizau.github.io/badges/amazon.svg
[badge_paypal]: http://ionicabizau.github.io/badges/paypal.svg
[badge_paypal_donate]: http://ionicabizau.github.io/badges/paypal_donate.svg
[patreon]: https://www.patreon.com/ionicabizau [patreon]: https://www.patreon.com/ionicabizau
[amazon]: http://amzn.eu/hRo9sIZ
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW [paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW
[donate-now]: http://i.imgur.com/6cMbHOC.png [donate-now]: http://i.imgur.com/6cMbHOC.png
[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(http%3A%2F%2Fionicabizau.net)&year=2015#license-mit [license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(https%3A%2F%2Fionicabizau.net)&year=2015#license-mit
[website]: http://ionicabizau.net [website]: https://ionicabizau.net
[contributing]: /CONTRIBUTING.md [contributing]: /CONTRIBUTING.md
[docs]: /DOCUMENTATION.md [docs]: /DOCUMENTATION.md