Project

colortag

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby gem for simplified shell text colouring and formatting (using ANSI escape sequences) Please check github for instructions on syntax
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

ColorTag

> A Ruby gem for simplified shell text colouring and formatting (using ANSI escape sequences)

Installation:

  1. Download the most recent colortag-x.x.x.gem file
  2. Change Directory to where the gem file is located
  3. gem install colortag-x.x.x.gem

Set-up:

Just add:

require 'colortag'

include ColorTag

To your desired .rb file

Usage:

This gem allows for the use of a simpler and more intuitive method of implementing ANSI escape sequences to color and format shell text.

Sequences are in the format <xxx:TEXTHERE>, where xxx stands for special format characters. These sequences should come easily to anyone who is familiar with XML-style markup.

Current Sequences:

Decorations

<b:> -> Emboldens text

<u:> -> Underlines text

<r:> -> ANSI reverses text

Colours

<fr:> -> Red font

<fy:> -> Yellow font

<fg:> -> Green font

<fb:> -> Blue font

Example Usage:

cputs "<b:All> we <u:need> is <fr:red>!"

The example above prints:

-> All in bold

-> need underlined

-> red in red