A tool to convert original ANSI art files for viewing in a modern terminal.
Important
This is not an AI-generated project! I wrote this as a labor of love. I test it extensively against original artwork.
I made some videos of demo conversions that are on youtube:
- Demo ANSI Conversion | g80-impure: https://www.youtube.com/watch?v=ZBk6FdzMkck
- Demo ANSI conversion | goto80-goto20: https://www.youtube.com/watch?v=Phbriy19yCY
You can install the ansi-art-convert package via pip:
pip install ansi-art-convertImportant
As a prerequisite, you will need to install the ANSI megafont on your system via your regular font installer, and ensure that your terminal emulator is configured to use it.
Alternatively, you can install it via a one-liner (you will still need to configure your terminal to use it):
install commands:
# osx
curl -sOL --output-dir ~/Library/Fonts/ https://github.com/tmck-code/ansi-megafont/releases/download/v0.1.1/ANSICombined.ttf \
&& fc-cache -f ~/Library/Fonts/ \
&& fc-list | grep "ANSICombined"
# linux
curl -sOL --output-dir ~/.fonts/ https://github.com/tmck-code/ansi-megafont/releases/download/v0.1.1/ANSICombined.ttf \
&& fc-cache -f ~/.fonts/ \
&& fc-list | grep "ANSICombined"usage: ansi-art-convert [-h] --fpath FPATH [--encoding ENCODING] [--sauce-only] [--verbose] [--ice-colours] [--font-name FONT_NAME] [--width WIDTH]
options:
-h, --help show this help message and exit
--fpath, -f FPATH Path to the ANSI file to render.
--encoding, -e ENCODING
Specify the file encoding (cp437, iso-8859-1, ascii, utf-8) if the auto-detection was incorrect.
--sauce-only, -s Only output the SAUCE record information as JSON and exit.
--verbose, -v Enable verbose debug output.
--ice-colours Force enabling ICE colours (non-blinking background).
--font-name FONT_NAME
Specify the font name to determine glyph offset (overrides SAUCE font).
--width, -w WIDTH Specify the output width (overrides SAUCE tinfo1).