Skip to main content

tox

ansi2html

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

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

Read the docs for more informations.

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:

$ pip3 install ansi2html

Source: https://github.com/pycontribs/ansi2html/

pypi: https://pypi.org/project/ansi2html/

License

ansi2html is licensed LGPLv3+.

Credits

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansi2html-1.9.5.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansi2html-1.9.5-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file ansi2html-1.9.5.tar.gz.

File metadata

  • Download URL: ansi2html-1.9.5.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ansi2html-1.9.5.tar.gz
Algorithm Hash digest
SHA256 ae17e92f1d6cac0e67d367e07fb0ba8a23dac8f193fc5d7a8c8a50fe5ddd95a4
MD5 c84307275a4bbb9a5d2b855573545703
BLAKE2b-256 c249682b08f7d8247d18aaafaedaf50609de6d91d5ab378c912b5508392578a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansi2html-1.9.5.tar.gz:

Publisher: release.yml on pycontribs/ansi2html

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansi2html-1.9.5-py3-none-any.whl.

File metadata

  • Download URL: ansi2html-1.9.5-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ansi2html-1.9.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fff3d25b149951474a688c7e22240f93e69ac5aa023c44ab5dce806befcba281
MD5 f034f750b98f453caa855903b0d34be7
BLAKE2b-256 c2d4104cba52b1aa94d1c60ae342c264d4308af59d3d8832b4975802e9fe8978

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansi2html-1.9.5-py3-none-any.whl:

Publisher: release.yml on pycontribs/ansi2html

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.9.5 This release

2 files

1.9.4

2 files

1.9.3

2 files

1.9.2

2 files

1.9.1

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.2

1 file

1.5.1

1 file

1.5.0

1 file

1.4.2

1 file

1.4.1

1 file

1.4.0

1 file

1.3.0

1 file

1.2.0

1 file

1.1.1

1 file

1.1.0

1 file

1.0.9

1 file

1.0.7

1 file

1.0.6

1 file

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

0.10.0

1 file

0.9.4

1 file

0.9.3

1 file

0.9.2

1 file

0.9.1

1 file

0.9.0

1 file

0.8.7

1 file

0.8.6

1 file

0.8.5

1 file

0.8.4

1 file

0.8.3

1 file

0.8.2

1 file

0.8.1

1 file

0.8.0

1 file

0.7.0

1 file

0.6.9

1 file

0.6.8

1 file

0.6.7

1 file

0.6.5

1 file

0.6.4

1 file

0.6.3

1 file

0.6.2

1 file

0.6.1

1 file

0.6.0

2 files

0.5.2

1 file

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