$ git-statsGitHub와 같은 기부금 캘린더를 포함한 로컬 GIT 통계.
나는 당신의 모든 커밋으로 당신의 달력을보고 싶어합니다. 트위터 ( @ionicabizau )에 나를 핑. ? 그때까지 내 달력은 다음과 같습니다.
설치
용법
선적 서류 비치
기여하는 방법
전 세계적으로 패키지를 설치하고 명령 줄 도구로 사용할 수 있습니다.
# 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 그런 다음 git-stats --help 실행하고 CLI 도구가 무엇을 할 수 있는지 확인하십시오.
$ git-stats --help
Usage: git-stats [options]
Local git statistics including GitHub-like contributions calendars.
Options:
-r, --raw Outputs a dump of the raw JSON data.
-g, --global-activity Shows global activity calendar in the current
repository.
-d, --data <path> Sets a custom data store file.
-l, --light Enables the light theme.
-n, --disable-ansi Forces the tool not to use ANSI styles.
-A, --author Filter author related contributions in the current
repository.
-a, --authors Shows a pie chart with the author related
contributions in the current repository.
-u, --until <date> Optional end date.
-s, --since <date> Optional start date.
--record <data> Records a new commit. Don't use this unless you are
a mad scientist. If you are a developer just use
this option as part of the module.
-h, --help Displays this help.
-v, --version Displays version information.
Examples:
$ git-stats # Default behavior (stats in the last year)
$ git-stats -l # Light mode
$ git-stats -s '1 January, 2012' # All the commits from 1 January 2012 to now
$ git-stats -s '1 January, 2012' -u '31 December, 2012' # All the commits from 2012
Your commit history is kept in ~/.git-stats by default. You can create
~/.git-stats-config.js to specify different defaults.
Documentation can be found at https://github.com/IonicaBizau/git-stats.
나는 당신의 git 커밋 캘린더를 처음부터 시작하는 것이 좋지 않다는 것을 알고 있습니다. 그렇기 때문에 선택한 저장소에서 커밋을 가져 오거나 삭제하는 도구 인 git-stats-importer 만들었습니다.
여기에서 확인하십시오 : https://github.com/ionicabizau/git-stats-importer
사용법은 간단합니다.
# 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예, 그건 가능합니다. 다운로드하는 도구를 구축 한 다음 Github 및 Bitbucket에 밀어 넣은 모든 커밋을 가져옵니다!
# 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 GitHub 프로파일에 나타나는 캘린더를 시각화하려면 ghcal 사용하여 수행 할 수 있습니다.
# Install ghcal
$ npm install -g ghcal
# Check out @alysonla's contributions
$ ghcal -u alysonla자세한 내용은 저장소를 확인하십시오 : https://github.com/ionicabizau/ghcal.
터미널에서 더 많은 github 통계를 얻으려면 github-stats 시도해 볼 수 있습니다. 이것은 git-stats 와 같지만 Github에서 가져온 데이터가 있습니다.
홈 디렉토리의 구성 파일을 사용하여 git-stats 동작을 조정할 수 있습니다 : ~/.git-stats-config.js .
이 파일은 아래와 같은 객체를 내보내야합니다 (기본값은 나열됩니다).
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
} ; JS 파일이므로 다른 모듈이 require 수 있습니다.
git-stats --raw 다른 도구에서 소비 할 수있는 RAW JSON 형식을 출력하여 HTML 파일 또는 이미지와 같은 결과를 생성합니다.
git-stats-html JSON 데이터를 해석하고 HTML 파일을 생성합니다. 예:
# 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
html 파일이 있으면 @sindresorhus 의 pageres 사용하여 이미지 파일을 생성 할 수 있습니다.
# Install pageres
npm install -g pageres-cli
# Generate the image from HTML
pageres out.html 775x250
git-stats ANSI 스타일을 지원하는 터미널 에뮬레이터에서 잘 작동합니다. Linux와 OS X에서 잘 작동해야합니다.
Windows에 그래프를 표시하기 위해 git-stats 실행하는 경우 ANSI 색상을 올바르게 표시 할 수있는 터미널을 사용하십시오.
Cygwin Terminal은 작동하는 것으로 알려져 있으며 Windows Command Promp 및 Git Bash는 그렇지 않습니다. 개선은 환영하는 것 이상입니다! ?
다음은이 패키지를 라이브러리로 사용하는 방법입니다. 로컬로 설치하려면 라이브러리로서 npm install git-stats (또는 yarn add git-stats )를 사용할 수 있습니다.
// Dependencies
var GitStats = require ( "git-stats" ) ;
// Create the GitStats instance
var g1 = new GitStats ( ) ;
// Display the ansi calendar
g1 . ansiCalendar ( {
theme : "DARK"
} , function ( err , data ) {
console . log ( err || data ) ;
} ) ; 도움을받는 방법에는 몇 가지가 있습니다.
전체 API 참조는 documentation.md 파일을 참조하십시오.
아이디어가 있습니까? 버그를 찾았습니까? 기여하는 방법을보십시오.
나는 내가 할 수있는 거의 모든 것을 오픈 소스이며,이 프로젝트를 사용하는 데 도움이 필요한 모든 사람들에게 대답하려고 노력합니다. 분명히, 이것은 시간이 걸립니다. 응용 프로그램에서 이러한 프로젝트를 무료로 통합하고 사용할 수 있습니다! 소스 코드를 변경하고 재분배 할 수도 있습니다 (재판매하더라도).
그러나, 당신이 이것으로부터 약간의 이익을 얻거나, 그냥 물건을 계속 만들도록 격려하고 싶다면, 당신이 할 수있는 방법은 거의 없습니다.
좋아하는 프로젝트를 주연하고 공유합니다
- 나는 책을 좋아한다! 당신이 나를 사면 몇 년 후에 당신을 기억할 것입니다. ?
-PayPal을 통해 일회성 기부를 할 수 있습니다. 아마 구입할 것입니다 커피 차. ?
- 반복되는 월별 기부금을 설정하면 내가하는 일에 대한 흥미로운 소식 (모든 사람과 공유하지 않는 것).
Bitcoin -이 주소에서 비트 코인을 보낼 1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6 있습니다.
감사해요! ❤️
프로젝트 중 하나 에서이 라이브러리를 사용하는 경우이 목록에 추가하십시오.
git-stats-importergit-stats-fcc-importermit © IonicĂ bizĂu