Ruby-ANSI.SYS

Get Version

0.8.3

What

MS-DOS console (with DEVICE=ANSI.SYS), Linux console, and other terminal emulators usually accept escape sequences which tell the terminal change colors of the text or move the cursor.

Ruby-ANSI.SYS is a Ruby library to render texts with ANSI escape sequences (Wikipedia) as an HTML fragment . It can also be used as a plugin for Hiki.

Download

Have a look at the RubyForge Project Info

Installation

As a Ruby library:

$ ruby setup.rb config
$ ruby setup.rb setup
# ruby setup.rb install

Or:

# gem install ansi-sys

As a Hiki plugin, copy the file lib/ansisys.rb into the misc/plugin directory and configure Hiki to enable the plugin.

Usage

As a Ruby library:

require 'ansisys'
terminal = AnsiSys::Terminal.new
terminal.echo("ansi-escaped-text")
terminal.render #=> HTML fragment

As a Hiki plugin:

{{ansi_screen(attach_file_name)}}

Please also refer the API Document

Contact

Please send your comments and patches to the RubyForge Trackers

License

Please refer License.txt

zunda, 3rd November 2007
Theme extended from Paul Battley