Giter Site home page Giter Site logo

terminal-animator's Introduction

Terminal Animator

A fun project to start learning Go.. Make some animations in terminal..

Demo

Terminal Animator running in Cool Retro Term:

terminal-animator-demo-small.mp4

Docs

Usage:

terminal-animator -h

Usage of terminal-animator:
  -config string
        Configuration file path for animation

Example:

terminal-animator -config demo-animation-108.yaml

Configuration documentation

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

Animation files - supported fields:

  • directives (map[string]any): Defines type and animation settings, see below
  • frames ([]string): List of text frames of the animation
Directives:
  • 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 frame
    • clear-screen: Animation that redraws whole screen, clearing whole screen before each frame
    • loop: Animation that loops specified amount of times after rendering all frames
    • printer: 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. Default 0.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 to loop animation
  • word (bool): For typewriter 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

terminal-animator's People

Contributors

mdpdesign avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.