Skip to main content

ansito

pipeline status coverage report documentation pypi version

Translate ANSI codes to any other format.

Currently, only Conky format is supported.

Requirements

ansito requires Python 3.6 or above.

To install Python 3.6, I recommend using pyenv.
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.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

Installation

With pip:

python3.6 -m pip install ansito

With pipx:

# install pipx with the recommended method
curl https://raw.githubusercontent.com/cs01/pipx/master/get-pipx.py | python3

pipx install --python python3.6 ansito

Usage (as a library)

TODO

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'

Metadata

Release files for ansito 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ansito 0.1.0
File Size Uploaded
ansito-0.1.0.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ansito 0.1.0
File Interpreter ABI Platform
ansito-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.3 kB

Release files / ansito-0.1.0.tar.gz

Download URL ansito-0.1.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8119a2deee9a69d2a6549784f237a953c594f9712a8dd0b1879facedc35ec406
BLAKE2b-256 checksum
How to use checksums
bad1d4f0a1d6f651fbe396b5b61fe2d569c603408c98b347b3774ce66c4761a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.11 CPython/3.6.8 Linux/4.9.0-8-amd64

Release files / ansito-0.1.0-py3-none-any.whl

Download URL ansito-0.1.0-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
103add704d90c897b8fc6a9de1aa7b0c975a76cf1ec54b8c218771aa188e36ae
BLAKE2b-256 checksum
How to use checksums
7f86440b2cb4a4a9f826ad6fa68857e3c450561b0b75a17a4c3791e9755e42d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.11 CPython/3.6.8 Linux/4.9.0-8-amd64

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page