A fun project to start learning Go.. Make some animations in terminal..
Terminal Animator running in Cool Retro Term:
terminal-animator-demo-small.mp4
Usage:
terminal-animator -h
Usage of terminal-animator:
-config string
Configuration file path for animation
Example:
terminal-animator -config demo-animation-108.yaml
Terminal Animator is configured by specifying a list of animation files:
animationFiles:
- demo-animation-width-108/001-boot.yaml
- demo-animation-width-108/002-boot.yaml
- demo-animation-width-108/003-load.yaml
- demo-animation-width-108/004-welcome.yaml
- (...)
Each file describes the animation type and additional settings for that animation
- directives (
map[string]any
): Defines type and animation settings, see below - frames (
[]string
): List of text frames of the animation
- type (
string
): Animation type, currently supported animations:clear-line
,clear-screen
,loop
,printer
,typewriter
clear-line
: Animation that renders frames a on single line, clearing any previous frameclear-screen
: Animation that redraws whole screen, clearing whole screen before each frameloop
: Animation that loops specified amount of times after rendering all framesprinter
: Animation that renders each frame line by line, split by newline -\n
typewriter
: Typewriter animation effect, either by character or by word
- maxDelay (
float32
): Random delay duration between rendering frames. Default0.5
- evenDelay (
bool
): Whether delay between rendering frames should be even - endNewLines (
int
): Number of newlines to add after that particular animation - loop (
int
): Number of how many times the animation will be repeated. Only applicable toloop
animation - word (
bool
): Fortypewriter
animation, whether to split animation frame by word or by character (default)
Examples:
directives:
type: clear-line
maxDelay: 0.5
endNewLines: 2
frames:
- 00010 KB OK
- 00025 KB OK
- 00048 KB OK
- 00128 KB OK
- 00168 KB OK
- 00256 KB OK
- 00640 KB OK
directives:
type: typewriter
word: false # default, can be optional
maxDelay: 0.2
endNewLines: 0
frames:
- '# A: load-welcome-message'
For more examples, check the demo animation
Coded with some โค๏ธ on my really old ๐ป with Fedora