Generates GIFs based on Tom Scott's Banhammer
Project description
Tom Scott Banhammer Generator
Generates GIFs based on Tom Scott's Banhammer
For the full video and additional context, please watch [https://youtu.be/nyD7FMwhwxc]("We Made a Banhammer (feat. NerdCubed)") by Tom Scott.
Installing
Python 3.10+ is required
To install the library, simply run the following command:
pip install banhammer
If you would like to use a pillow drop-in replacement, such as pillow-simd, then install that prior to installing the banhammer. All requirements should automatically install.
Usage
banhammer.Generator() is the main generator object. To generate an image, use Generator().image_gen(str) where str is your string of choice. This will return an io.BytesIO() object, which you can then manually write to a file or upload somewhere.
Example
The following example generates a GIF and saves it to a file called output.gif:
from banhammer import Generator
# Setup the generator
g = Generator()
# Generate the GIF (returns a BytesIO object)
im = g.image_gen('Example')
# Write the image to a file called output.gif
f = open('output.gif', 'wb')
f.write(im.read())
f.close()
The resulting GIF looks something like this:
Font Licensing
The font file included is a modified version of the Bungee Regular font. The font has been modified to include missing unicode characters and emoji provided by other fonts. The licensing and source information can be found below.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file banhammer-1.0.0.tar.gz.
File metadata
- Download URL: banhammer-1.0.0.tar.gz
- Upload date:
- Size: 14.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b5b56c2913cff24d6ec0d72f59537ce5cb4d7f4772b46750583d5e55848fecc
|
|
| MD5 |
420fd1013e8148934daaae8aba456b0a
|
|
| BLAKE2b-256 |
591c4db531905f52a863d3b1924114760bd4f34ac448757e0e110fef8e666cc0
|
Provenance
The following attestation bundles were made for banhammer-1.0.0.tar.gz:
Publisher:
publish.yml on DerpyChap/banhammer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
banhammer-1.0.0.tar.gz -
Subject digest:
4b5b56c2913cff24d6ec0d72f59537ce5cb4d7f4772b46750583d5e55848fecc - Sigstore transparency entry: 864321419
- Sigstore integration time:
-
Permalink:
DerpyChap/banhammer@68048695b7396d75586069f57a4cb82fd72222e5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/DerpyChap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@68048695b7396d75586069f57a4cb82fd72222e5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file banhammer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: banhammer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f94546624d6f58fc8cf3dfa5c52929378a36399846b9c3bcc02ddf44c518b74
|
|
| MD5 |
77334ff9c86eff9df275b99d5d530aca
|
|
| BLAKE2b-256 |
31ca424bf505b43e28a000b40a1c89bd4237e22d94b0a36dd49e5440d6f14be5
|
Provenance
The following attestation bundles were made for banhammer-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on DerpyChap/banhammer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
banhammer-1.0.0-py3-none-any.whl -
Subject digest:
1f94546624d6f58fc8cf3dfa5c52929378a36399846b9c3bcc02ddf44c518b74 - Sigstore transparency entry: 864321420
- Sigstore integration time:
-
Permalink:
DerpyChap/banhammer@68048695b7396d75586069f57a4cb82fd72222e5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/DerpyChap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@68048695b7396d75586069f57a4cb82fd72222e5 -
Trigger Event:
release
-
Statement type: