pawamoy / ansito

Transform ANSI codes to any other format (currently only Conky style)

Repository from Github https://github.compawamoy/ansitoRepository from Github https://github.compawamoy/ansito

ansito

ci documentation pypi version gitpod gitter

Translate ANSI codes to any other format.

Currently, only Conky format is supported.

⚠️ This project is unmaintained. Drop me a message if you would like me to transfer it to you or add you as a collaborator.

Installation

With pip:

pip install ansito

With pipx:

python3.8 -m pip install --user pipx
pipx install ansito

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

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'

⚠️ Conky does not have "background colors" for text, so ansito will not be able to convert the ANSI codes for background colors to Conky colors!

About

Transform ANSI codes to any other format (currently only Conky style)

License:ISC License


Languages

Language:Python 89.3%Language:Shell 9.3%Language:Makefile 1.1%Language:Dockerfile 0.3%