Skip to content

Instantly share code, notes, and snippets.

@jeremypruitt
jeremypruitt / generate-animated-counter-gif.py
Last active July 11, 2021 08:23
Generates an animated gif of a counter
from PIL import Image, ImageDraw, ImageSequence, ImageFont
import io
import click
FIRST_NUMBER = click.prompt('Enter the low number of the range', default=10330, type=int)
LAST_NUMBER = click.prompt('Enter the high number of the range', default=10346, type=int)
FRAME_DURATION = click.prompt('How long to hold on each number', default=100, type=int)
ANIMATED_GIF_FILENAME = click.prompt('Enter the name of the animated gif to generate', default="incrementing-counter.gif", type=str)
TEXT_COLOR = (255,255,255)