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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ansi2html-1.9.4.tar.gz
  • Upload date:
  • Size: 44.9 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.4.tar.gz
Algorithm Hash digest
SHA256 2b85cd050787186bc201c15635212258e9beda1463b63f327a8234abae2a4b30
MD5 6bf6d03ef9df4b2c09a9cf64c6d58353
BLAKE2b-256 7946d36cb16ae6fd815a75cb67012523b3711b8301695b05c14ccebf4e51d57b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ansi2html-1.9.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 277e5afbecea1083b30198dca91483b8353af29bdc3d18d643598fba7aac55ba
MD5 034075d7fc21aa5cf1cf92f4ce8b5bea
BLAKE2b-256 c4433b4491f5cda8ebb3321865f4629331ad85688124aa3fcbb829186b633a07

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansi2html-1.9.4-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.4 This release

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