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.3.tar.gz (11.0 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.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repogif-0.0.3.tar.gz
  • Upload date:
  • Size: 11.0 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.3.tar.gz
Algorithm Hash digest
SHA256 f0c735609b031a74444da3c2d2e1a7a44dae621f9339aea30a51505d29da17e5
MD5 f55e997ff542dbc3f8534134812adc7e
BLAKE2b-256 16038e035c7faacb59fcd02b2de5c11d2bee2ddf04c496f39c18b3605a72abc3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: repogif-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a096a153052099876f0dc7e4d4be2961c5defb359b449e253871daaea15a7824
MD5 58f6b0ecd933a3f14b6ac434f1f7fe99
BLAKE2b-256 930c2737bf94cf55423b4da01639908bad6092ba553530b31640a248694f4dcf

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