Skip to content

Statistics of your activities on GitHub in 2024. 统计2024年你在GitHub上的活动.

License

Notifications You must be signed in to change notification settings

WCY-dt/my-github-2024

Repository files navigation

logo

Statistics of your activities on GitHub in 2024.

简体中文 | English

Deploy state Server Status

👉 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 限制,导致无法正常使用。如遇服务器宕机,请参考本地运行部分。

Example

example

Self-deployment

  1. Assume your URL is YOUR_URL, server IP is YOUR_IP, and username is YOUR_USERNAME.

  2. Fork this repository.

  3. Create a Github OAuth App:

    Visit GitHub Developer Settings to create a new OAuth App. In it, Homepage URL and Authorization callback URL are filled in http://YOUR_URL and http://YOUR_URL/callback respectively.

    Get Client ID and Client Secret.

  4. Replace YOUR_URL with your URL, YOUR_CLIENT_ID with your Client ID, and YOUR_CLIENT_SECRET with your Client Secret in the script/setup.sh script. Then run the script on the server.

Warning

This script may overwrite existing configuration files, please use with caution.

  1. 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
  2. Add Secrets of GitHub Actions:

    • SERVER_IP: Server IP
    • SERVER_USERNAME: Server username
    • SERVER_KEY: Generated SSH key
  3. Run the Deploy to Server workflow of GitHub Actions to automatically deploy and run.

Run locally

Important

Due to the features of the datetime library, this project requires Python-3.12 or above.

  1. Clone the repository:

    git clone https://github.com/WCY-dt/my-github-2024.git
    cd my-github-2024
  2. Create a Github OAuth App:

    Visit GitHub Developer Settings to create a new OAuth App. In it, fill in Homepage URL and Authorization callback URL with http://127.0.0.1:5000 and http://127.0.0.1:5000/callback respectively.

    Get Client ID and Client Secret.

  3. 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
  4. Install dependencies:

    pip3 install -r requirements.txt
  5. Run the project:

    python3 my-github-2024.py
  6. Visit http://127.0.0.1:5000 and complete!

Statistics

Thanks to Ruanyifeng for the recommendation!

Stargazers over time