Generate your GitHub yearly statistics chart.
简体中文 | English
👉 Try it now: https://2024.ch3nyang.top
Note
Since this project counts every commits, it may take 1-10 minutes to generate. Please be patient.
由于本项目统计了每一次提交的信息,因此可能需要 1-10 分钟的时间来生成。请耐心等待。
Warning
This tool involves a large number of network requests, and the server may be restricted by GitHub, resulting in failure to use it normally. If the server is down, please refer to the Run locally section to run locally.
本工具涉及到海量网络请求,服务器很可能会被 GitHub 限制,导致无法正常使用。如遇服务器宕机,请参考本地运行部分在本地运行。
-
Make sure you have installed Python3.12 and other necessary dependencies:
apt install python3.12 python3-pip python3-gunicorn python3-virtualenv nginx certbot python3-certbot-nginx -y
-
Clone the repository:
mkdir /var/www cd /var/www git clone https://github.com/WCY-dt/my-github-2024.git cd my-github-2024
-
Configure environment variables:
nano .env
.envThe file content is as follows:CLIENT_ID=your_client_id CLIENT_SECRET=your_client_secret
-
Install dependencies:
virtualenv venv source venv/bin/activate pip3 install -r requirements.txt -
Run:
nohup python3 my-github-2024.py & -
Install and configure Gunicorn:
pip3 install gunicorn cp my-github-2024.service /etc/systemd/system
Start the service:
systemctl daemon-reload systemctl start my-github-2024 systemctl enable my-github-2024 -
Configure SSL certificate:
certbot --nginx -d YOUR_URL certbot renew --dry-run
You need to change
YOUR_URLto your domain name. -
Configure Nginx:
cp my-github-2024 /etc/nginx/sites-available rm /etc/nginx/sites-enabled/default
Before that, you need to modify
YOUR_URLin themy-github-2024file to your domain name.Enable the site:
ln -s /etc/nginx/sites-available/my-github-2024 /etc/nginx/sites-enabled nginx -t systemctl restart nginx nginx -s reload
-
Visit
https://YOUR_URLto see the effect.
-
Clone the repository:
mkdir /var/www cd /var/www git clone https://github.com/WCY-dt/my-github-2024.git cd my-github-2024
-
Create a Github OAuth App:
Visit GitHub Developer Settings to create a new OAuth App. In the Homepage URL and Authorization callback URL, fill in
http://127.0.0.1:5000andhttp://127.0.0.1:5000/callbackrespectively.Get
Client IDandClient Secret. -
Configure environment variables:
nano .env
.envfile content is as follows:CLIENT_ID=your_client_id CLIENT_SECRET=your_client_secret
-
Install dependencies:
pip3 install -r requirements.txt
-
Run:
python3 my-github-2024.py
-
Visit
http://127.0.0.1:5000to see the effect.
