code-statistic
code-statistic copied to clipboard
⚡ Dynamically generate your github stat cards! Contains User Card, Repo Card, Contributor Card, Release Card, Issue Card and PR Card! Support dark mode, API calling, waiting for you to explore! ⚡ 动...
🍊 User Card
Hey, want to generate quickly? Have a look at our website!
The user card is used to count the languages of all projects under the user and generate statistics, calculate total stars earned, forks acquired, followers, watchers, number of open issues, etc.
[](https://github.com/zmh-program/code-statistic)
Note currently only your own repositories as statistics, do not support the repositories contributed to others, do not support private repositories, excluding fork repositories.
We will count all repository data such as stars, forks, open issues and output the statistic.
🍉 Repository Card
The repository card are used to show the language analysis of the project, stars, forks, license, repository size, etc.
[](https://github.com/zmh-program/code-statistic)
Warning by default, we can't get the data of private repo, please use your own token to deploy. Don't forget to check the box to access your private repositories!
🍎 Contributor Card
The contributor card is used to count the contributors in a project and will be ranked by the number of commits
.
[](https://github.com/zmh-program/code-statistic)
The param column
is the number of contributors in each row. The minimum is 4 and the default is 6.
Add &column=
to customize the number of columns.
🍇 Release Card
The release card is used to display information about the release, such as branch, tag name, time and description, etc.
[](https://github.com/zmh-program/code-statistic)
Show previous release versions by setting the parameter tag
. Customize the release tag by adding &tag=
. The default is latest.
🍋 Issue Card
The issue card is used to show the status of the issue, title, time, communication, etc.
[](https://github.com/zmh-program/code-statistic)
🍓 Pull Request Card
The pull request card is used to show the status of the pull request, branches, title, time, migrations, etc.
[](https://github.com/zmh-program/code-statistic)
🥝 Dark Theme
Very easy, just add ?theme=dark
after it in any kind of card!
[](https://github.com/zmh-program/code-statistic)
👨💻 API
-
User
GET
https://stats.deeptrain.net/api/user/{user}
Example response:
{ "username": "zmh-program", "org": false, "location": "Shandong, China", "repos": 24, "stars": "0.3k", "watchers": "0.3k", "followers": "45", "forks": "10", "issues": "2", "languages": [ { "color": "#3572A5", "lang": "Python", "percent": 35.30345154490841, "text": "Python 35% (525.1k)", "value": 525070 }, ... ] }
Error response:
{ "message": "user not found" }
-
Repo
GET
https://stats.deeptrain.net/api/repo/{user}/{repo}
Example response:
{ "username": "zmh-program", "license": "MIT", "repo": "code-statistic", "stars": "26", "watchers": "26", "color": "#a91e50", "forks": "1", "issues": "0", "size": "1.0 MiB", "languages": [ { "color": "#3178c6", "lang": "TypeScript", "percent": 42.76333789329686, "text": "TypeScript 43% (21.9k)", "value": 21882 }, ... ] }
Error response:
{ "message": "repo not found" }
-
Contributor
GET
https://stats.deeptrain.net/api/contributor/{user}/{repo}
Example response:
{ "color": "#d2cece", "contributors": [{ "avatar": "https://avatars.githubusercontent.com/u/112773885?v=4", "commits": 18, "image": "iVBORw0KGgoAAAANSUhEUgAA…uxEC+HwAAAAAElFTkSuQmCC", "username": "zmh-program" }], "repo": "zmh-program", "username": "zmh-program" }
Error response:
{ "message": "repo not found" }
-
Release
GET
https://stats.deeptrain.net/api/release/{user}/{repo}/{tag|latest}
Example response:
{ "assets": [ { "name": "install.sh", "size": "1.6k", "type": "application/x-sh" }, { "name": "package.zip", "size": "791.5k", "type": "application/zip" } ], "author": { "avatar": "https://avatars.githubusercontent.com/u/112773885?v=4", "image": "iVBORw0KGgoAAAANSUhEUgAA…uxEC+HwAAAAAElFTkSuQmCC", "type": "User", "username": "zmh-program" }, "branch": "main", "color": "#41b883", "date": "2023-05-23T15:17:52Z", "draft": false, "name": "1.6", "prerelease": false, "repo": "web-chatgpt-qq-bot", "tag": "1.6", "text": "here is release description...", "username": "zmh-program" }
Error response:
{ "message": "release not found" }
-
Issue
GET
https://stats.deeptrain.net/api/issue/{user}/{repo}/{id}
Example response:
{ "color": "#f1e05a", "comments": 1, "date": "2022-01-18T21:10:09Z", "description": "...", "id": 12, "labels": [], "opener": { "avatar": "https://avatars.githubusercontent.com/u/63081316?v=4", "image": "iVBORw0KGgoAAAANSUhEUgAA…0cg9hQAAAAASUVORK5CYII=", "type": "User", "username": "mollthecoder" }, "reactions": 0, "repo": "extensions", "state": "closed", "title": "Create dictionaries.js", "username": "turbowarp" }
Error response:
{ "message": "issue not found" }
-
Pull Request
GET
https://stats.deeptrain.net/api/pull/{user}/{repo}/{id}
Example response:
{ "additions": "72", "changed_files": 1, "color": "#f1e05a", "comments": 1, "commits": 1, "creator": { "avatar": "https://avatars.githubusercontent.com/u/63081316?v=4", "image": "iVBORw0KGgoAAAANSUhEUgAA…0cg9hQAAAAASUVORK5CYII=", "type": "User", "username": "mollthecoder" }, "date": "2022-01-18T21:10:09Z", "deletions": "0", "description": "...", "id": 12, "labels": [], "migration": { "base": "TurboWarp:master", "head": "mollthecoder:patch-1" }, "repo": "extensions", "state": "closed", "title": "Create dictionaries.js", "username": "turbowarp" }
Error response:
{ "message": "pull requst not found" }
Changelog
- v1
Express + EJS
- v2
Nuxt + Element
- v3
Golang + PHP + Vue3 + TDesign