clide - the text colorizer
clide is a program that will colorize ascii text on the command line using ANSI escape sequences and user defined and predefined expressions. Searches can include Perl Compatible Regular Expressions for the most part, there are a few limitations though.
There are other programs that do this kind of thing but many of them were written for one specific purpose or the person who wrote it didn't promote it enough. My goal is to make something that is general purpose, but that can be easily be configured for specific purposes (ie. different types of logs or program output) and also to package it for at least rpm and deb based systems so that its easily available.
Also, I've been able to get over some hurdles that the other programs fell short on, like one pattern being able to be within another and have the old color pickup after the internal one is done.
Here are some usage examples.
clide -e /searchstring/,fg=red,bold file.txt
clide -e URL,fg=yellow,background=black,bold links.html
twidge lsrecent | clide -f twidgestyle
In the above example, the file twidgestyle contains these lines:
HTMLTAG,fg=red # This is a comment. URL,fg=yellow,bold TWITTERMENTION,fg=cyan,bold,blink /linux/i,bg=yellow #The pattern below will highlight the word source # only if its preceded by the word open. /(?<=open) source/i,fg=blue,bold
clide is being developed using git and you can download the latest version from github at http://github.com/deltaray/clide