From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1FEpL5-0003Rh-9o for garchives@archives.gentoo.org; Thu, 02 Mar 2006 15:03:35 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id k22F24a4007896; Thu, 2 Mar 2006 15:02:04 GMT Received: from gabriel.sub.uni-goettingen.de (gabriel.sub.uni-goettingen.de [134.76.163.126]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id k22Eu5xa001611 for ; Thu, 2 Mar 2006 14:56:05 GMT Received: by gabriel.sub.uni-goettingen.de (Postfix, from userid 8) id CE90BB9EF3; Thu, 2 Mar 2006 15:56:02 +0100 (CET) Received: from sub00421 (unknown [134.76.161.221]) by gabriel.sub.uni-goettingen.de (Postfix) with ESMTP id CEC6DB9EEF for ; Thu, 2 Mar 2006 15:56:01 +0100 (CET) Date: Thu, 2 Mar 2006 15:56:01 +0100 From: Hans-Werner Hilse To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] [OT] Terminal formatting and colors escape sequences Message-Id: <20060302155601.dd1bee7c.hilse@web.de> In-Reply-To: <200603021449.51145.bo.andresen@gmail.com> References: <200603021449.51145.bo.andresen@gmail.com> X-Mailer: Sylpheed version 2.2.0 (GTK+ 2.8.12; i586-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Details: No, hits=0.0 required=5.0 tests=none autolearn=ham version=2.64 X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on gabriel.sub.uni-goettingen.de X-Archives-Salt: 6e222ba1-d9a6-4947-801a-92ed61e98e14 X-Archives-Hash: c33fc4bcc9cf816f54fab2208d4f92ad Hi, On Thu, 2 Mar 2006 14:49:49 +0100 Bo Andresen 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