#cli #filter #coloring #stdio #color #input #tool

bin+lib corrupt

minimal cli stdio coloring filter

1 unstable release

0.1.0 Apr 24, 2020

#15 in #coloring

MIT/Apache

10KB
217 lines

corrupt

In short: this tool colors strings input from stdin and outputs them to stdout.

Color theme is defined with RON, and what to color is defined based on regexps. Both of which are user-defined input (currently only with cli arguments, config-file-based support is planned).

Try this:

ping 192.168.1.1 | corrupt 'bytes?|time' '[0-9]{1,3}(\.[0-9]{1,3}){3,3}' -s '[Fg(Red), Bg(Blue)]' '[Fg(Blue), Attr(Underlined)]'

Dependencies

~6.5–9MB
~154K SLoC