Skip to main content

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.

NOTE: This currently only runs on WINDOWS OS currently

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.bruhscreen import WinScreen

from bruhanimate.bruhrenderer import *



# Define a function that the screen warpper function will call

def render_stars(screen, frames, time, effect, background, transparent):

    

    # Create the renderer

    renderer = EffectRenderer(screen, frames, time, effect, background, transparent)

    

    # Change the exit messages if you want, wipe tells the renderer to wipe the final

    # animation frame before displaying the exit messages.

    renderer.set_exit_stats("  Animation Frames Completed  ", "    Press [Enter] to leave    ", wipe=True)

    

    # Set the intensity if you want, the higher the intensity, the more stars.

    # Intensity can be set for the Noise and Stars Effect, <= 200 is a good spot.

    renderer.effect.update_intensity(200)

    

    # Run the animation

    renderer.run()

    

    # Add an input() to catch the end of the enimation

    input()



# Now that we have a funciton to render the animation, let's

# create a screen and call the function

#              function            fram  time  effect   bk   img

WinScreen.show(render_stars, args=(100, 0.05, "stars", " ", None))

Project details


Release history Release notifications | RSS feed

This version

0.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bruhanimate-0.0.2.tar.gz (20.3 kB view hashes)

Uploaded Source

Built Distribution

bruhanimate-0.0.2-py3-none-any.whl (23.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page