Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

Commit fd7c683

Browse files
committed
update readme
1 parent f519ce6 commit fd7c683

3 files changed

Lines changed: 115 additions & 1 deletion

File tree

README.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<div align="center">
2+
3+
[<img src="docs/icon.png" alt="Code Statistic" width="64" height="64" style="transform: translateY(50px);">](https://stats.deeptrain.net)
4+
# [Code Statistic](https://stats.deeptrain.net)
5+
6+
#### Dynamically generate your GitHub statistic card!
7+
8+
![License](https://img.shields.io/github/license/zmh-program/code-statistic?style=flat-square)
9+
![GitHub release](https://img.shields.io/github/v/release/zmh-program/code-statistic?style=flat-square)
10+
![GitHub stars](https://img.shields.io/github/stars/zmh-program/code-statistic?style=flat-square)
11+
<br>
12+
</div>
13+
14+
## 🍊 User Card
15+
Hey, want to generate quickly? Have a look at our [website](https://stats.deeptrain.net/)!
16+
17+
Use in your Github homepage! use it in your website! use it anywhere you want!
18+
```markdown
19+
[![zmh-program's Github Stats](https://stats.deeptrain.net/user/zmh-program/)](https://github.com/zmh-program/code-statistic)
20+
```
21+
[![zmh-program's Github Stats](https://stats.deeptrain.net/user/zmh-program/)](https://github.com/zmh-program/code-statistic)
22+
23+
> **Note**
24+
> Currently only your own repositories as statistics, do not support the repositories **contributed** to others, do not support **private** repositories, excluding **fork** repositories.
25+
>
26+
> We will count all repository data such as stars, forks, open issues and output the statistic.
27+
28+
29+
## 🍉 Repository Card
30+
Use in repository introduction! use in pull request! use in issue! use it anywhere you want to introduce the project!
31+
32+
```markdown
33+
[![Deeptrain's Github Stats](https://stats.deeptrain.net/repo/zmh-program/Deeptrain)](https://github.com/zmh-program/code-statistic)
34+
```
35+
[![Deeptrain's Github Stats](https://stats.deeptrain.net/repo/zmh-program/Deeptrain)](https://github.com/zmh-program/code-statistic)
36+
37+
> **Warning**
38+
> By default, we can't get the data of private repo, please use your own [token](https://github.com/settings/tokens/new) to deploy. Don't forget to check the box to access your private repositories!
39+
40+
## 🥝 Dark Theme
41+
Very easy, just add `?theme=dark` after it in any kind of card!
42+
```markdown
43+
[![web-chatgpt-qq-bot's Github Stats](https://stats.deeptrain.net/repo/zmh-program/web-chatgpt-qq-bot/?theme=dark)](https://github.com/zmh-program/code-statistic)
44+
```
45+
[![web-chatgpt-qq-bot's Github Stats](https://stats.deeptrain.net/repo/zmh-program/web-chatgpt-qq-bot/?theme=dark)](https://github.com/zmh-program/code-statistic)
46+
47+
48+
## 👨‍💻 API
49+
1. `GET` `https://stats.deeptrain.net/api/user/{user}`
50+
51+
> Example response:
52+
> ```json
53+
> {
54+
> "username": "zmh-program",
55+
> "org": false,
56+
> "location": "Shandong, China",
57+
> "repos": 24,
58+
> "stars": "0.3k",
59+
> "watchers": "0.3k",
60+
> "followers": "45",
61+
> "forks": "10",
62+
> "issues": "2",
63+
> "languages": [
64+
> {
65+
> "color": "#3572A5",
66+
> "lang": "Python",
67+
> "percent": 35.30345154490841,
68+
> "text": "Python 35% (525.1k)",
69+
> "value": 525070
70+
> },
71+
> ...
72+
> ]
73+
> }
74+
> ```
75+
> Error response:
76+
> ```json
77+
> {
78+
> "message": "user not found"
79+
> }
80+
> ```
81+
<br>
82+
83+
2. `GET` `https://stats.deeptrain.net/api/repo/{user}/{repo}`
84+
85+
> Example response:
86+
> ```json
87+
> {
88+
> "username": "zmh-program",
89+
> "license": "MIT",
90+
> "repo": "code-statistic",
91+
> "stars": "26",
92+
> "watchers": "26",
93+
> "color": "#a91e50",
94+
> "forks": "1",
95+
> "issues": "0",
96+
> "size": "1.0 MiB",
97+
> "languages": [
98+
> {
99+
> "color": "#3178c6",
100+
> "lang": "TypeScript",
101+
> "percent": 42.76333789329686,
102+
> "text": "TypeScript 43% (21.9k)",
103+
> "value": 21882
104+
> },
105+
> ...
106+
> ]
107+
> }
108+
> ```
109+
> Error response:
110+
> ```json
111+
> {
112+
> "message": "repo not found"
113+
> }
114+
> ```

app/utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
//header('Content-Type: image/svg+xml');
2+
header('Content-Type: image/svg+xml');
33
header('Cache-Control: no-cache');
44

55
function compress($buffer)

docs/icon.png

93.1 KB
Loading

0 commit comments

Comments
 (0)