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.50-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71e16465ce044daabec7726cb98277b43ba69bd52e65331a407c568a1f6e6efa |
|
MD5 | 13ccc5053b4d8d0647f0b87715893c15 |
|
BLAKE2b-256 | f9cd4b4ec81f881732316b649cc2200871809eabd2b5422191128f3f145c0812 |