From bc20f65f859a57785de2bf116d0dab01acd43a6b Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 23 Feb 2013 20:52:49 -0600 Subject: [PATCH] readme --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7694c3c..035cf23 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,25 @@ A curses-like library for node.js. -As of right now, it does not read all terminfo. It was designed for one -terminal's terminfo: **xterm**, but if you understand the differences between -the three popular vt100-based terminals (xterm, screen, rxvt), you should be -able to use it for any terminal. +Blessed was originally written to only support the xterm terminfo, but can +now parse and compile any terminfo to be completely portable accross all +terminals. See the `tput` example below. I want this library to eventually become a high-level library for terminal widgets. ## Example Usage +This will actually parse the xterm terminfo and compile every +string capability to a javascript function: + +``` js +var Tput = require('blessed').Tput + , tput = Tput('xterm'); + +console.log(tput.set_attribute(34) + 'hello' + tput.set_attribute(0)); +``` + ``` js var blessed = require('blessed') , program = blessed();