The chart library used to generate various indicators on Github

Github Repo Charts

Generate GitHub warehouse growth chart and personal data report for your README

characteristic

Generate warehouse growth chart

The Github Star growth legend is to cycle through the Github API and get the list of Stars in the warehouse. Due to API limitations, we cannot perfectly get all Stars and their corresponding time nodes, so only the legends of projects less than 500 Star are provided. If the number of stars in your project exceeds 500, then the legend will only render the first 500 items. For the time being, the items with more than 500 items are already slightly more mature ones, haha

Generate Stars chart

Copy the following code to your markdown files, you can enjoy your warehouse growth chart the

need to update repo=your warehouse name, owner=your user name

![TaroXin Repo Star](http://repo-charts.taroxin.cn/api/repo/starChart?repo=vue-pretty-logger&owner=TaroXin)
Set title and subtitle

In the legend, we use the default ${owner}/${repo}form as the main title, Star 成长曲线as the subtitle, you can modify them through mass participation

modifying title=your main title, subtitle=as your subtitle

You can also use showTitle=trueor showSubtitle=falseto control the main title and subtitle Hide

![TaroXin Repo Star](http://repo-charts.taroxin.cn/api/repo/starChart ?repo=vue-pretty-logger&owner=TaroXin&title=My-Repo-Star&subtitle= My warehouse growth track)
Generate Forks chart

Forks and Stars have the same reason. Due to the limitation of Github API, we can only get 500 pieces of data.

The following code can generate the Forks growth legend. As you may have noticed, we just added a special parameter from=fork. The fromparameter is used to distinguish whether the data is from staror from fork. If you do not pass this parameter, it will be used starby default . Other parameters and get Star legend The same interface

![TaroXin Repo Star](http://repo-charts.taroxin.cn/api/repo/starChart?repo=vue-pretty-logger&owner=TaroXin&from=form)

Generate warehouse language map

The Legend supports two ways to generate, when owner=the time is not empty, the user will get the name of the language map all warehouse, if owner=and repo=neither is empty, it generates a map of the warehouse language

The color options of the legend come from GitHub, and GitHub has unique color definitions for each language

Get all languages ​​of the user
![TaroXin Language](http://repo-charts.taroxin.cn/api/repo/languageChart?owner=TaroXin)

TaroXin Language

Get a single warehouse language
![TaroXin Repo Language](http://repo-charts.taroxin.cn/api/repo/languageChart?owner=TaroXin&repo=vue-pretty-logger)

TaroXin Repo Language

All Demo

  

Development

If you are interested in participating in this project, or you just want to run it locally, then you only need the following steps to run normally

step one

We need you to clone the project correctly and install related dependencies. It should be noted that the project contains puppeteer related dependencies. If the download fails, please refer to other documents.

git clone https://github.com/TaroXin/github-repo-charts.git
cd github-repo-charts && npm i
Step two

New .envfile, this is our private variable files, store personal Github Access Tokenand we need as a data cache Redisconfiguration, the following configuration is not available, you need to configure their own data

GITHUB_ACCESS_TOKEN=<Your Token>

REDIS_IP=<Redis ip>
REDIS_PORT=<Redis port>
REDIS_PASSWORD=<Redis password>
Step three

Run the project and visit

npm run dev
open http://localhost:7001/api/repo/starChart

You will get an 422error to remind you that the corresponding parameter configuration is missing

EVERYTHING

  • Generate a comparison histogram of original projects Star and Fork
  • Generate Github data homepage
  • Docker privatization deployment

Download Details:

Author: TaroXin

Source Code: https://github.com/TaroXin/github-repo-charts

#nodejs #node #javascript

The chart library used to generate various indicators on Github
3.20 GEEK