Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Convert text with ansi color codes to HTML
HTML Python

This branch is 199 commits behind develop

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ansi2html
tests
.gitignore
.travis.yml
LICENSE
MANIFEST.in
README.rst
python-ansi2html.spec
setup.py
ugly-uninstall.sh

README.rst

ansi2html

Author: Ralph Bean <rbean@redhat.com>
http://secure.travis-ci.org/ralphbean/ansi2html.png

Convert text with ANSI color codes to HTML

Inspired by and developed off of the work of pixelbeat and blackjack.

Example - Python API

>>> from ansi2html import Ansi2HTMLConverter
>>> conv = Ansi2HTMLConverter()
>>> ansi = " ".join(sys.stdin.readlines())
>>> html = conv.convert(ansi)

Example - Shell Usage

$ ls --color=always | ansi2html > directories.html
$ sudo tail /var/log/messages | ccze -A | ansi2html > logs.html
$ task burndown | ansi2html > burndown.html

Get this project:

Source: http://github.com/ralphbean/ansi2html/

pypi: http://pypi.python.org/pypi/ansi2html/

License

ansi2html is licensed GPLv3+.

Something went wrong with that request. Please try again.