ASCII Terminal Animation Package
Project description
bruhanimate
bruhanimate offers a series of files to aid in rendering out animations in the terminal. This is heavily inspisred by the Asciimatics package. While Asciimatics is the end-all be-all for termianl animations, I figured it would be good practice to go ahead and attempt something like this myself.
Installation
From PyPI
python -m pip install --upgrade bruhanimate
From source
git clone https://github.com/ethanlchristensen/bruhanimate
cd bruhanimate
python -m pip install .
Usage
This is not complete, but currently offers the ability to render out background-effects. There also exists renderers that can render out images to the screen, but these need to be modified following the implementation of the Effects
class. A great example of the effects can be found in demo.py
. Here is a what a simple example might look like.
"""
Here is a simple program that uses the EffectRenderer to render out one
of the prebuilt effects to the terminal.
"""
from bruhanimate.bruhrenderer import *
from bruhanimate.bruhscreen import Screen
import bruhanimate.images as images
import sys
def demo(screen, img, frames, time, effect_type, background, transparent):
# CREATE THE RENDERER
renderer = CenterRenderer(screen, frames, time, img, effect_type, background, transparent)
# SET EFFECT ATTRIBUTES
renderer.update_smart_transparent(True)
renderer.effect.update_color(True)
renderer.effect.update_intensity(100)
# RUN THE ANIMATION
renderer.run()
# CATCH THE END WITH INPUT() --> for Win-Systems --> Ctl-C for Unix-Systems
input()
def main():
Screen.show(demo, args=(images.get_image("TWOPOINT"), 300, 0, "noise", " ", False))
if __name__ == "__main__":
main()
Project details
Release history Release notifications | RSS feed
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
Hashes for bruhanimate-0.1.48-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db6b3e01b29c941b38d200dcbce55a42439fdc38b03b3df8b901cd5384ac2c9c |
|
MD5 | 9a2307358eb3017bca09b833ec1a889a |
|
BLAKE2b-256 | 1d7111b7f2a7edd1bc69b7eed63d083cb6b38c73610b18431b6d6fb1015d85c3 |