Skip to content

This script generates an animated Tetris-style GIF based on a GitHub user's contributions for a specific year.

License

Notifications You must be signed in to change notification settings

debba/gh-contributions-tetris-gif-maker

Repository files navigation

GitHub Contributions Tetris GIF Maker

This script generates an animated Tetris-style GIF based on a GitHub user's contributions for a specific year.

@debba 2023 - sample

Prerequisites

Make sure you have the following Python packages installed:

  • Pillow
  • requests
  • argparse

You can install them using pip:

pip install -r requirements.txt

Usage

  • Clone the repository or download the main.py file.

  • Run the script from the command line by providing the GitHub username and the year for which you want to fetch the contributions:

python main.py -u <username> -y <year>

For example:

python main.py -u debba -y 2024

The script will generate an animated GIF of the specified user's GitHub contributions for the specified year and save it in the images folder with the name github_tetris.gif.

It will generate a github_tetris.gif file in the images folder showing the daily contributions of the user debba for the year 2024 in Tetris style.

Docker Usage

  • Create docker/crontab file (You can start from docker/crontab.example)
  • Create upload_to_s3.py (You can start from upload_to_s3.example.py)
  • Create a docker build
docker build -t github-tetris-maker .
  • Execute ad docker container
docker run -d --name github-tetris-maker \
  -e AWS_ACCESS_KEY_ID=your_access_key_id \
  -e AWS_SECRET_ACCESS_KEY=your_secret_access_key \
  github-tetris-maker

You can show container logs with the following command:

docker logs -f github-tetris-maker

Credits

This script was developed by debba.

About

This script generates an animated Tetris-style GIF based on a GitHub user's contributions for a specific year.

Topics

Resources

License

Stars

Watchers

Forks