ansifilter-go — ANSI escape codes to markup

A Go port of André Simon's ansifilter 2.23. It takes terminal output containing ANSI escape sequences — colors, bold, underline, cursor movement — and converts it to text, HTML, Pango markup, LaTeX, plain TeX, RTF, BBCode or SVG, preserving the styling.

The two halves of the tool are escape codes going in and markup coming out, and a page that draws its own approximation of either is showing you something other than the answer. So this demo shows the same input in both real renderers at once: the ANSI in an actual terminal emulator, and the exported HTML in an actual browser.

Source code: github.com/0magnet/ansifilter-go. More Go and WebAssembly projects: magnetosphere.net/software.

loading…