A simple text animator
Project description
text-animator
A simple text animator.
Ths is a subclass of the Animation
abstract class and uses the Animator
class to display the animated text to the terminal; both classes are defined in the ascii-animator package.
Installation
pip install text_animator
Usage
example1
Animate some text and display characters from left to right (default).
Code
from text_animator import TextAnimation
text = """This is the text
that we want to animate
let's see how well
this works ..."""
TextAnimation(text)()
example2
Animate some text and display characters from right to left.
Code
from text_animator import TextAnimation, Effect
text = """This is the text
that we want to animate
let's see how well
this works ..."""
TextAnimation(text, effect=Effect.RIGHT_TO_LEFT)()
example3
Animate some text and display characters at random.
Code
from text_animator import TextAnimation, Effect
text = """This is the text
that we want to animate
let's see how well
this works ..."""
TextAnimation(text, effect=Effect.RANDOM)()
example4
Animate some text and display characters from left to right then surround text with a border. A border can be customized with top|bottom|left|right margins as well as top|bottom|left|right padding, default for all margins and padding is 1. Margins define the space outside the border, and padding define the space between the border and text.
Code
from text_animator import TextAnimation, Effect, Border
text = """This is the text
that we want to animate
let's see how well
this works ..."""
TextAnimation(text, border=Border(lm=0, tm=0, bm=0, tp=0, bp=0))()
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 \
text-animator:latest .
Run the Docker container:
docker container run \
--rm \
-it \
-v $PWD:/code \
text-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 text-animator-0.1.0.tar.gz
.
File metadata
- Download URL: text-animator-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 277e3ae8faae6b6d7fb942b40778c4ea3037ffbc4faa06a19f20aebfa5b669c6 |
|
MD5 | a9fe5fca395007bd182645ba76f472dc |
|
BLAKE2b-256 | 7c9fb3beabf0350ae7f0a8b393bde24112fec623e6ca9fa06fad18a111252f6b |
File details
Details for the file text_animator-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: text_animator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ffa75b9f237bade55f76c17541291fdd2fd7d480e537d5edee06b7ece48282d |
|
MD5 | e43647d48a48ff4ad9a820d0bd571ccc |
|
BLAKE2b-256 | fa5d57dc0b7ee68fd6e385b02cdc24faad2b42fab9cdac69325c114ac9fb5130 |