Translate ANSI codes to any other format.
Currently, only Conky format is supported.
With pip
:
pip install ansito
With pipx
:
python3.8 -m pip install --user pipx
pipx install ansito
usage: ansito [-h] FILENAME
positional arguments:
FILENAME File to translate, or - for stdin.
optional arguments:
-h, --help show this help message and exit
Example:
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'