Convert text with ansi color codes to HTML
Clone or download
ralphbean Merge pull request #93 from aalekseyev/patch-1
Tweak 6x6x6 color cube colors
Latest commit ac3b230 Dec 3, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ansi2html fix implementation and tests Nov 28, 2018
man Add and integrate man page Sep 28, 2013
tests another test fix Nov 28, 2018
.gitignore Tox for tests. Jan 10, 2017
.travis.yml py36 Apr 9, 2018
CHANGELOG.rst 1.5.2 Oct 22, 2018
LICENSE LGPLv3+ Nov 29, 2017
MANIFEST.in Exclude .pyc files from the release tarball. Mar 2, 2016
Makefile LGPLv3+ Nov 29, 2017
README.rst LGPLv3+ Nov 29, 2017
setup.cfg Revert "six is called six, not python-six" Jan 10, 2017
setup.py 1.5.2 Oct 22, 2018
tox.ini py36 Apr 9, 2018

README.rst

ansi2html

Author: Ralph Bean <rbean@redhat.com>
Contributor:Robin Schneider <ypid23@aol.de>

Convert text with ANSI color codes to HTML or to LaTeX.

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

Build Status

Branch Status
master Build Status - master branch
develop Build Status - develop branch

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 rc._forcecolor:yes limit:0 burndown | ansi2html > burndown.html

See the list of full options with:

$ ansi2html --help

Get this project:

$ sudo yum install python-ansi2html

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

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

License

ansi2html is licensed LGPLv3+.