Re: [gentoo-user] [OT] Terminal formatting and colors escape sequences

2006-03-02 Thread Bo Andresen
Just in case somebody wonders what I'm talking about here is an example (^[ is 
an escape character):

 
^[[32;01m*^[[0m Running emerge --sync ...
^[[A^[[73G  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
 ^[[32;01m*^[[0m Running update-eix ...
^[[A^[[73G  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m


^[[32;01m = green
^[[0m = black
^[[73G = right justify
^[[34;01m = blue
^[[A = ?

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] [OT] Terminal formatting and colors escape sequences

2006-03-02 Thread Jason Stubbs
On Thursday 02 March 2006 22:49, Bo Andresen wrote:
 My problem is that I am unable to locate a reference that defines 
 the escape sequences.

Google for xterm escape sequences yields many results. s/xterm/ansi/
for even more.

--
Jason Stubbs

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] [OT] Terminal formatting and colors escape sequences

2006-03-02 Thread Hans-Werner Hilse
Hi,

On Thu, 2 Mar 2006 14:49:49 +0100 Bo Andresen [EMAIL PROTECTED]
wrote:

 I wish to be able to run a program (eix-sync/diff-eix) in cron that
 prints colors (with use of --force-color) and then send that colored
 output as a mail. In order to get colors in a mail a have to use
 html. If there exist a program that is capable of converting escape
 sequences used for formatting and coloring an xterm to html I would
 love to know about it. 

I'd say, the Perl module HTML::FromANSI should do what you want
(available from cpan). It brings a script, ansi2html, that provides
access from the command line. Note that you might have to play with the
TERM environment variable.

-hwh
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] [OT] Terminal formatting and colors escape sequences

2006-03-02 Thread Bo Andresen
On Thursday 02 March 2006 15:56, Hans-Werner Hilse wrote:
 I'd say, the Perl module HTML::FromANSI should do what you want
 (available from cpan). It brings a script, ansi2html, that provides
 access from the command line. Note that you might have to play with the
 TERM environment variable.

Sounds interesting. Unfortunately I don't know Perl but I think I'll have a 
look at it anyway... Thanks.

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] [OT] Terminal formatting and colors escape sequences

2006-03-02 Thread Bo Andresen
Does anyone know of I way in which to force emerge to show colors when piping 
the output to a file? I really could use a tip.

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list