diff --git a/cmake_scale.png b/cmake_scale.png new file mode 100644 index 0000000..e04c562 Binary files /dev/null and b/cmake_scale.png differ diff --git a/index.html b/index.html index d38e9dd..afa3c92 100644 --- a/index.html +++ b/index.html @@ -45,7 +45,7 @@
colout is a simple command to add colors to a text stream in your terminal.
The colout command line interface has been carefully designed to be simple. Basically, you will call it like: <text
-stream> | colout <pattern to color> [color [style]].
colout has the ability to use 8 colors mode, 256 colors mode, colormaps, themes and source code syntax coloring. Patterns are regular expressions.
@@ -60,20 +60,20 @@ powerful coloring capabilites.In the most simple use, you just have to call colout word to highlight what you want to spot in a text stream. This is
particularly useful when examining logs.
Color every occurence of the word "fail" in bold red, in the boot log:
-tail /var/log/boot.log | colout fail
Color every occurence of the word "fail" in bold red, in the boot log:
+tail /var/log/boot.log | colout fail

Using regular expressions, you can highlight anything you want in a text stream.
-Color every line containing the word "fail" in bold red, in the boot log:
-tail /var/log/boot.log | colout "^.*fail.*$" red bold
Color every line containing the word "fail" in bold red, in the boot log:
+tail /var/log/boot.log | colout "^.*fail.*$" red bold

Color in blue the user name of the ps output that have been greped:
-ps aux | grep firefox | colout "^\w+\s" blue
Color in blue the user name of the ps output that have been greped:
ps aux | grep firefox | colout "^\w+\s" blue

Using groups in the regular expressions, you can highlight several matchs in different colors.
Highlight the different parts of the permissions of files in your home directories, that are rwx for user and group,
-but r-x for others:
-ls -l ~ | colout "^(d*)-*(rwx)(rwx)(r-x)" blue,red,yellow,green
r-x for others:
+ls -l ~ | colout "^(d*)-*(rwx)(rwx)(r-x)" blue,red,yellow,green

Using colormaps, you can change the colors for each lines, this is particularly useful for reading logs that have long
lines that are wrapped.
-tail /var/log/kern.log | colout "^.*$" rainbow
tail /var/log/kern.log | colout "^.*$" rainbow

If you want more colors, you can highlight each line of your log with a random one among the 256 ANSI colors:
-tail /var/log/dmesg | colout "^.*$" Random
If you want more colors, you can highlight each line of your log with a random one among the 256 ANSI colors:
+tail /var/log/dmesg | colout "^.*$" Random

You can even fill your screen with esoteric disco characters (not that useful, but fun):
-cat /dev/urandom | colout "." Random
You can color numbers according to their value on a linear scale:
+cmake .. && make 2>&1 | colout --scale 0,100 "\[(.*)%\]" scale

You can even fill your screen with esoteric disco characters (not that useful, but fun):
+cat /dev/urandom | colout "." Random

You can use colout as a basic proxy to the pygments library, if you want to highlight a source code.
-For example, let say you want to have a quick look at a source file, without being bothered by comments and empty lines:
-tail colout.py | grep -v "#" | grep -v "^\s*$" | colout -s Python monokai
For example, let say you want to have a quick look at a source file, without being bothered by comments and empty lines:
+tail colout.py | grep -v "#" | grep -v "^\s*$" | colout -s Python monokai

But even more interesting, you can highlight the syntax of the matching parts of your text stream, which is useful for spotting code in a log.
-For example, color the code parts in the output of g++ (they come inside single quotes):
-make 2>&1 | colout "'.*'" Cpp vim
For example, color the code parts in the output of g++ (they come inside single quotes):
make 2>&1 | colout "'.*'" Cpp vim

For example, if you often build your software with cmake but find its coloring scheme a bit boring, you can use the
following shortcut:
-make 2>&1 | colout -t cmake
make 2>&1 | colout -t cmake

You can, of course, combine several calls to colout using pipes:
-make 2>&1 | colout -t cmake | colout -t g++
make 2>&1 | colout -t cmake | colout -t g++
