Retrofit is an ANSI art adapter for the modern terminal. It uses a series of transformations to make it possible to view ANSI art pieces in a regular Unix-like terminal and Windows console (see below for details).
Rather than recreating the whole picture within an in-memory virtual terminal, retrofit uses the actual terminal as a live buffer. That makes it possible to view the art piece at limited baud, with accurate timing. It also correctly handles drawing out-of-order and full-blown ansimations.
Check out Dispenser for a quick live-demo!
Basic usage involves stating the ANSI file as a running parameter:
$ retrofit example.ans
You can also pipe into retrofit:
$ curl -s https://example.com/example.ans | retrofit
Limit the baud count with the
$ retrofit -b 9600 example.ans
Note that this feature behaves erratically in certain environments, like within virtual machines. This issue is tracked here.
For best accuracy of the original color palette, as well as support for PabloDraw color codes, use 24-bit mode:
$ retrofit -c 24bit example.ans
Current Windows 10 console is able to view ANSI art pieces correctly, but user
needs to enable the VT support
chcp 65001 command before running retrofit.
Note that terminal Windows Subsystem for Linux works out of the box.
Retrofit is built with Rust. It requires Rust toolset to build from source. Once available:
$ git clone https://git.sr.ht/~exitb/retrofit $ cd retrofit/ $ cargo install --path .
Roam is licensed under ISC.