Skip to main content

Generate beautiful animated GIFs that mimic GitHub repo stars/forks with realistic visuals. Perfect for social sharing, repo previews, documentation, or just for fun.

Project description

RepoGif 🎥⭐

Generate beautiful animated GIFs that mimic GitHub repo stars/forks with realistic visuals.
Perfect for social sharing, repo previews, documentation, or just for fun.

Features

  • 🌈 Gradient backgrounds with authentic GitHub styling
  • 🎨 Web-based animation with HTML/CSS/JS for high-quality visuals
  • ⚙️ Customizable repository name, star count, and fork count
  • 🔍 High-fidelity captures using Puppeteer

[!TIP] Starring this repo helps more developers discover RepoGif 🎥

template1_1k


Install

git clone https://github.com/yourname/RepoGif.git
cd RepoGif
pip install -e .
playwright install

Dependencies

  • Pillow - Image processing
  • imageio - GIF creation
  • imageio-ffmpeg - Video encoding support
  • numpy - Numerical operations
  • playwright - Browser automation

Usage

Call from Python:

from repogif.generator import generate_repo_gif

generate_repo_gif(repo_name="RepoGif", stars=250, forks=30, out="output.gif")

Run from CLI (after install):

repogif

Advanced Options

You can customize various aspects of the generated GIF:

generate_repo_gif(
    repo_name="MyAwesomeProject",
    stars="5.8k",  # Supports string format for larger numbers
    forks=397,
    out="custom_animation.gif"
)

How It Works

RepoGif uses a multi-step process to create high-quality animations:

  1. Uses static HTML templates with customizable parameters via URL query strings
  2. Uses Playwright to capture two frames (unstarred and starred states)
  3. Creates final GIF using PIL with 1-second duration per frame

The template-based approach allows for visually appealing animations with:

  • Gradient backgrounds
  • Proper GitHub styling and iconography
  • Realistic cursor positioning
  • Star button interactions with visual feedback

Customization

The templates are located in repogif/templates/, with each template in its own directory:

  • Each template has its own template.html file and necessary assets
  • Templates can be customized via URL parameters:
    • Repository name
    • Star count
    • Fork count
    • Display dimensions
  • You can also create new templates following the existing structure

👉 This repo is fully usable right now. Just run:

python examples/example.py

and you'll get a RepoGif output in the examples/ folder 🎥.

Templates

RepoGif offers a variety of templates to showcase your repository in different styles and formats. Choose the one that best suits your needs.

Template 1 - Simple Star Animation

A simple 2-frame GIF showing star button animation with authentic GitHub styling.

template1_1k

Default Dimensions: Variable based on content

Variants:

  • template1_no_forks
  • template1_100stars

Template 2 - Square Badge

A square badge displaying repository statistics with clean, modern design.

square_badge_test

Default Dimensions: 250x250 pixels

Template 3 - Horizontal Banner

A wide banner perfect for repository headers or documentation pages.

horizontal_banner_test

Default Dimensions: 600x120 pixels

Template 4 - Circular Badge

A circular badge with focused repository statistics in a compact form.

circular_badge_test

Default Dimensions: 250x250 pixels

Template 5 - Vertical Card

A vertical card layout with gradient background for an elegant presentation.

vertical_card_test

Default Dimensions: 300x400 pixels

Template 6 - Minimalist Tile

A clean, monochrome design focusing on essential repository information.

minimalist_tile_test

Default Dimensions: 320x200 pixels

Template 7 - Animated Badge

An eye-catching badge with pulsing star effect animation.

animated_badge_test

Default Dimensions: 280x280 pixels

Template 8 - Commit Pattern

template8_default

Variants:

  • template8_increasing
  • template8_with_zeros

Template 9 - Contributors

template9_clustered

Variants:

  • template9_large
  • template9_small

Troubleshooting

Common Issues

Blank or Corrupted GIF

This could be due to:

  • Frame capture issues - Check for browser compatibility
  • Puppeteer configuration - Try running with different arguments
  • File path problems - Ensure all paths are correct

Example Output

When run, this package generates an animated GIF showing a GitHub repository with stars and forks, along with a realistic cursor animation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repogif-0.0.2.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repogif-0.0.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file repogif-0.0.2.tar.gz.

File metadata

  • Download URL: repogif-0.0.2.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for repogif-0.0.2.tar.gz
Algorithm Hash digest
SHA256 82320d34c93ecd0cd519838e44ca0e7c2580cca679b4cc9cb4d626034bf08e3c
MD5 df8ba8511ed42abff7da5684b7a1dc48
BLAKE2b-256 9e672933b6728904703441118df216348449d24e03f7247004e1b5d523d01b1c

See more details on using hashes here.

File details

Details for the file repogif-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: repogif-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for repogif-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2755d1829ab5c211647c3970ee1b627353c866daa963fb6d878d31dcfe53c037
MD5 4824927708ad0e01052952567198eaf4
BLAKE2b-256 3ccc2045acc8e45b201937ba1a81fe1dc157ab695501c7ba5b5d3af0bfce1216

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page