= ANSI
* http://rubyworks.github.com/ansi
* http://github.com/rubyworks/ansi
== DESCRIPTION
The ANSI project is a collection of ANSI escape code related libraries
enabling ANSI code based colorization and stylization of output.
It is very nice for beautifying shell output.
This collection is based on a set of scripts spun-off from
Ruby Facets. Include are Code (used to be ANSICode), Logger,
ProgressBar and String. In addition the library includes
Terminal which provides information about the current output
device.
== FEATURES/ISSUES
* ANSI::Code can be used as a mixin or for module functions.
* ANSI::Mixin provides an alternative mixin like +colored+ gem.
* Single extension to String class makes common usage very elegant.
* Very Good coverage of standard ANSI codes.
== RELEASE NOTES
Please see HISTORY file.
== SYNOPSIS
There are a number of modules and classes provided by the ANSI
package. To get a good unserstanding of them it is best to puruse
the QED documents[http://github.com/rubyworks/ansi/tree/master/qed/]
or the API documentation[http://rubyworks.github.com/ansi/rdoc/].
At the heart of all the provided libraries lies the ANSI::Code module
which defines ANSI codes as constants and methods. For exmaple:
require 'ansi/code'
include ANSI::Code
red + "Hello" + blue + "World"
=> "\e[31mHello\e[34mWorld"
Or in block form.
red{ "Hello" } + blue{ "World" }
=> "\e[31mHello\e[0m\e[34mWorld\e[0m"
Rather than include +ANSI::Code+, these mehods can also be called as module
methods. Either as ANSI::Code.red
or just ANSI.red
.
The methods defined by this module are used throughout the rest of
the system.
== HOW TO INSTALL
To install with RubyGems simply open a console and type:
$ sudo gem install ansi
Local installation requires Setup.rb (gem install setup),
then download[http://github.com/rubyworks/ansi/download] the tarball package and type:
$ tar -xvzf ansi-1.0.0.tgz
$ cd ansi-1.0.0
$ sudo setup.rb all
Windows users use 'ruby setup.rb all'.
== LICENSE/COPYRIGHT
Copyright (c) 2004 Thomas Sawyer
This program is ditributed unser the terms of the MIT license.
See LICENSE file for details.