A simple ASCII art animator
Project description
ascii-animator
A simple ASCII text animator.
The ascii-art-animator
CLI will take as input a GIF image, extract all the frames from it, convert each frame to ASCII art using ascii-magic, then display each frame to the terminal using list2term.
Installation
pip install ascii_animator
Usage
usage: ascii-art-animator [-h] [-s SPEED] [-f FILE] [-d] [-a] [-m MAX_LOOPS] [-c COLUMNS]
Ascii Art Animator from GIF
optional arguments:
-h, --help show this help message and exit
-s SPEED, --speed SPEED
speed of the animation: very_slow, slow, normal, fast (default normal)
-f FILE, --file FILE the path to a gif file
-d, --debug display debug messages to stdout
-a, --show_axis display the grid axis
-m MAX_LOOPS, --max_loops MAX_LOOPS
maximum number of loops, set to 0 to loop through image until keyboard interrupt (default 1)
-c COLUMNS, --columns COLUMNS
the number of characters per row (default 150)
Examples
ASCII Art Animator
Use ascii-art-animator
to convert the following GIF image to an ascii animation and demonstrate the use of the optional arguments.
- show x and y axis
- loop through the image 3 times
- set columns to 100 characters
ascii-art-animator -f docs/images/marcovich.gif -a -m 3 -c 100
input
output
Animation
class
Use the Animation class to create your own animations.
Binary Search Animation
A binary search is a search algorithm that finds a specific value in a sorted array by repeatedly dividing the search interval in half.
Selection Sort Animation
A selection sort search is a simple and efficient sorting algorithm that works by repeatedly selecting the smallest (or largest) element from the unsorted portion of the list and moving it to the sorted portion of the list.
Here is another example of a selection sort animation this time using vertical bars.
Equalizer Bars Animation
An animation for symmetrical equalizer bars.
Matrix Animation
A Matrix animation.
Game-Of-Life
A Conway Game-Of-Life implementation that uses ascii_animator
to display the game to the terminal.
Development
Clone the repository and ensure the latest version of Docker is installed on your development server.
Build the Docker image:
docker image build \
-t ascii-animator:latest .
Run the Docker container:
docker container run \
--rm \
-it \
-v $PWD:/code \
ascii-animator:latest \
bash
Execute the build:
pyb -X
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
File details
Details for the file ascii_animator-0.2.1.tar.gz
.
File metadata
- Download URL: ascii_animator-0.2.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57bbc2bd12c4e0daf2b46d55bab6874ab4316b92d3e82365a76774cd1630b564 |
|
MD5 | 1f1f7e8df7cf852e15eb75fbe3d54484 |
|
BLAKE2b-256 | e6a42b622d829d27205b982070f1a35c37d8d4b41afaac0d66e4ad927159fa66 |
File details
Details for the file ascii_animator-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: ascii_animator-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 357562b264fa33123b692cfb273a7774eaaeb7b5e7e16cf0e3afb2d4974f36fb |
|
MD5 | 0563099ca1a7f264614119b0885a28a5 |
|
BLAKE2b-256 | af319d5b883799482c0c61449cf548d2fab5642063e6e51f0f80c89b76a374ad |