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
Release files for text-animator 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| text-animator-0.1.0.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| text_animator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / text-animator-0.1.0.tar.gz
| Download URL | text-animator-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
277e3ae8faae6b6d7fb942b40778c4ea3037ffbc4faa06a19f20aebfa5b669c6
|
|
BLAKE2b-256 checksum How to use checksums |
7c9fb3beabf0350ae7f0a8b393bde24112fec623e6ca9fa06fad18a111252f6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / text_animator-0.1.0-py3-none-any.whl
| Download URL | text_animator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ffa75b9f237bade55f76c17541291fdd2fd7d480e537d5edee06b7ece48282d
|
|
BLAKE2b-256 checksum How to use checksums |
fa5d57dc0b7ee68fd6e385b02cdc24faad2b42fab9cdac69325c114ac9fb5130
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|