跳转到主要内容

将ANSI代码转换为任何其他格式。

项目描述

ansito

pipeline status coverage report documentation pypi version

将ANSI代码转换为任何其他格式。

目前,仅支持Conky格式。

要求

ansito需要Python 3.6或更高版本。

要安装Python 3.6,我推荐使用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

安装

使用pip

python3.6 -m pip install ansito

使用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: 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 -

在Conky配置文件中使用taskwarrior的实例

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

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

ansito-0.1.0.tar.gz (8.6 kB 查看哈希值)

上传时间:

构建分布

ansito-0.1.0-py3-none-any.whl (25.7 kB 查看哈希值)

上传时间: Python 3

由以下支持