Statistics of your activities on GitHub in 2024.
简体中文 | 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 visit it. If the server is down, please refer to the Run locally section.
本工具涉及到海量网络请求,服务器很可能会被 GitHub 限制,导致无法正常使用。如遇服务器宕机,请参考本地运行部分。
-
Assume your URL is
YOUR_URL
, server IP isYOUR_IP
, and username isYOUR_USERNAME
. -
Fork this repository.
-
Create a Github OAuth App:
Visit GitHub Developer Settings to create a new OAuth App. In it,
Homepage URL
andAuthorization callback URL
are filled inhttp://YOUR_URL
andhttp://YOUR_URL/callback
respectively.Get
Client ID
andClient Secret
. -
Replace
YOUR_URL
with your URL,YOUR_CLIENT_ID
with yourClient ID
, andYOUR_CLIENT_SECRET
with yourClient Secret
in thescript/setup.sh
script. Then run the script on the server.
Warning
This script may overwrite existing configuration files, please use with caution.
-
Generate SSH keys locally and add them to the server:
ssh-keygen -t rsa -b 4096 -C "[email protected]" -f ~/.ssh/id_rsa -N "" cat ~/.ssh/id_rsa.pub | ssh YOUR_USERNAME@YOUR_IP 'cat >> ~/.ssh/authorized_keys' cat ~/.ssh/id_rsa | clip
-
Add Secrets of GitHub Actions:
SERVER_IP
: Server IPSERVER_USERNAME
: Server usernameSERVER_KEY
: Generated SSH key
-
Run the
Deploy to Server
workflow of GitHub Actions to automatically deploy and run.
Important
Due to the features of the datetime
library, this project requires Python-3.12 or above.
-
Clone the repository:
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 it, fill in
Homepage URL
andAuthorization callback URL
withhttp://127.0.0.1:5000
andhttp://127.0.0.1:5000/callback
respectively.Get
Client ID
andClient Secret
. -
Configure the environment variable
.env
file in the root directory of the project. The content is as follows:CLIENT_ID=your_client_id CLIENT_SECRET=your_client_secret
-
Install dependencies:
pip3 install -r requirements.txt
-
Run the project:
python3 my-github-2024.py
-
Visit
http://127.0.0.1:5000
and complete!
Thanks to Ruanyifeng for the recommendation!