~ph14nix/term-to-pango

Convert ANSI-styled text to Pango Markup
Deprecate in favor of ansifilter.
Build instructions

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~ph14nix/term-to-pango
read/write
git@git.sr.ht:~ph14nix/term-to-pango

You can also use your local clone with git send-email.

#term-to-pango

Deprecated in favor of ansifilter.

--

term-to-pango is a tool to convert ANSI escape-coded text to Pango Markup.

It's particularly useful if you want to display the output of a terminal tool inside a GUI program that renders text with Pango (and supports markup).

Screenshot: The output of Taskwarrior and grep rendered with term-to-tango and displayed in nwg-wrapper. It demonstrates underlined, bold and colored text

#Build & Install

https://docs.haskellstack.org/en/stable/

stack build
stack install

To use term-to-pango, simply pipe the ANSI-colored text through it, like so:

grep --color=always some-pattern file.txt | term-to-pango

#Limitations

Currently, we support only the simplest “named” colors like “red”, “green” and so on. In principle, nothing prevents us from supporting the whole RGB range. The support should be easy to add, so feel free to drop me a patch.

We also don't support some text attdibutes like reverseVideo, dim and blink. I wasn't sure what to map them to.

Do not follow this link