Skip to main content

Translate ANSI codes to any other format.

Project description


pipeline status coverage report documentation pypi version

Translate ANSI codes to any other format.

Currently, only Conky format is supported.


ansito requires Python 3.6 or above.

To install Python 3.6, I recommend using pyenv.
# install pyenv
git clone ~/.pyenv

# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"

# install Python 3.6
pyenv install 3.6.8

# make it available globally
pyenv global system 3.6.8


With pip:

python3.6 -m pip install ansito

With pipx:

# install pipx with the recommended method
curl | python3

pipx install --python python3.6 ansito

Usage (as a library)


Usage (command-line)

usage: ansito [-h] FILENAME

positional arguments:
  FILENAME    File to translate, or - for stdin.

optional arguments:
  -h, --help  show this help message and exit


command-that-output-colors | ansito -

Real-word example with taskwarrior in a Conky configuration file:

${texecpi 60 flock ~/.task task limit:10 rc.defaultwidth:80 rc._forcecolor:on rc.verbose:affected,blank list | ansito - | sed -r 's/([^ ])#/\1\\#/g'

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ansito, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size ansito-0.1.0-py3-none-any.whl (25.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ansito-0.1.0.tar.gz (8.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page