Skip to main content

Build Status - main branch

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.3.tar.gz (44.8 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.3-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ansi2html-1.9.3.tar.gz
  • Upload date:
  • Size: 44.8 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.3.tar.gz
Algorithm Hash digest
SHA256 190b3fc65f0545fec6442527f8f55131949410fe97c15ac42a441f1e96726f57
MD5 50277ec088660c2db5cb8aa51c8a48ef
BLAKE2b-256 86bb7e7c177a038c15051cfa5ed18dd3a3bbde9fe81329f615a8c445ac2a0cb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansi2html-1.9.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: ansi2html-1.9.3-py3-none-any.whl
  • Upload date:
  • Size: 17.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bb7ebcbb64b36dabbfed8a29caad4f545f5e51d71be2171389a939ed69b524f9
MD5 b436472714fcea0f6523fbeb9d3a73af
BLAKE2b-256 a6a7da58da66babbf58ae6638473dbadd53c6401a6228bcadc49c20b9107d6c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansi2html-1.9.3-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

1.9.4

2 files

This release

1.9.3 This release

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