Skip to content

wwfxuk/colourise

Repository files navigation

Colourise Terminal Output

CI Workflow Badge Rez Workflow Badge

Colourise stdin using a specific bash script parser.

image

colourise [--shotgun-log|--katana|--ping]
Options Description
--shotgun-log Colourise using parser for Shotgun logs.
--katana Colourise using parser for Katana stderr.
--ping Colourise using parser for ping.
--hiero Colourise using parser for Hiero (hiero.core.log).

Examples

Colourise continuously a Shotgun log file:

tail -F ~/.shotgun/logs/tk-desktop.log | colourise --shotgun-log

Colourise continuously a Katana process, combining stdout and stderr before piping into to colourise:

katana |& colourise --katana
# For Mac's Terminal: katana 2>&1 | colourise --katana

Colourise continuously a ping process, useful when gaming monitoring server latency.

Added in 0.4.0

ping www.google.com | colourise --ping

Installation

Requires bash to be installed.

  1. Download the colourise file
  2. Make it executable e.g. chmod a+x colourise
  3. Start using it! e.g. on Linux katana |& /full/path/to/colourise --katana

Top tip: add the the folder where you downloaded colourise script to the PATH environment variable. Or just copy colourise to an existing folder on PATH e.g. /usr/local/bin

rez package

You can also install this a a rez package

  1. Download or git clone this repository
  2. From the extracted repository root, run rez build --install
  3. Start using the colourise package e.g. on Mac OSX katana 2>&1 | rez env colourise -- colourise --katana

Bonus script: colour-test

Use colour-test to check your current Terminal's 4-8 bit colour/styles capabilities. Install in the same way as colourise.

If no arguments are given, all tests will be output.

colour-test

Usage: colour-test [-1] [-2] [-3]

Options Description
-1, --retro Test old-school, retro 4-bit colours and styles.
-2, --combo Test basic combinations of 8-bit colour.
-3, --pretty Test palette style combinations of 8-bit colour.