<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Colorizing console Ruby-script output</title>
	<atom:link href="http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/feed/" rel="self" type="application/rss+xml" />
	<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/</link>
	<description>In my blog I'll try to describe about interesting technologies, my discovery in IT and some useful things about programming.</description>
	<lastBuildDate>Tue, 29 Dec 2009 10:34:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Como colorir os textos do console no Windows? &#124; Ruby Brasil</title>
		<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-261697</link>
		<dc:creator>Como colorir os textos do console no Windows? &#124; Ruby Brasil</dc:creator>
		<pubDate>Sun, 14 Mar 2010 10:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-261697</guid>
		<description>[...] Windows. Procurei na internet e encontrei um post no LedNerd (que é tradução de um super-post do kpumuk). No Windows, a coloração do console é possível graças a gem [...]</description>
		<content:encoded><![CDATA[<p>[...] Windows. Procurei na internet e encontrei um post no LedNerd (que é tradução de um super-post do kpumuk). No Windows, a coloração do console é possível graças a gem [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ZARATUSTR</title>
		<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-222293</link>
		<dc:creator>ZARATUSTR</dc:creator>
		<pubDate>Sun, 14 Mar 2010 05:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-222293</guid>
		<description>Я так делаю обычно:

&lt;code lang=&quot;ruby&quot;&gt;
class String

	def red; colorize(self, &quot;\e[1m\e[31m&quot;); end
	def green; colorize(self, &quot;\e[1m\e[32m&quot;); end
	def dark_green; colorize(self, &quot;\e[32m&quot;); end
	def yellow; colorize(self, &quot;\e[1m\e[33m&quot;); end
	def blue; colorize(self, &quot;\e[1m\e[34m&quot;); end
	def dark_blue; colorize(self, &quot;\e[34m&quot;); end
	def pur; colorize(self, &quot;\e[1m\e[35m&quot;); end
	def colorize(text, color_code)  &quot;#{color_code}#{text}\e[0m&quot; end
end	
&lt;/code&gt;

И при использовании

&lt;code lang=&quot;ruby&quot;&gt;
puts &quot;Hello&quot;.red
&lt;/code&gt;

</description>
		<content:encoded><![CDATA[<p>Я так делаю обычно:</p>
<div class="codecolorer-container ruby twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#CC0066; font-weight:bold;">String</span><br />
<br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> red; colorize<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, <span style="color:#996600;">&quot;<span style="color:#000099;">\e</span>[1m<span style="color:#000099;">\e</span>[31m&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> green; colorize<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, <span style="color:#996600;">&quot;<span style="color:#000099;">\e</span>[1m<span style="color:#000099;">\e</span>[32m&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> dark_green; colorize<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, <span style="color:#996600;">&quot;<span style="color:#000099;">\e</span>[32m&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> yellow; colorize<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, <span style="color:#996600;">&quot;<span style="color:#000099;">\e</span>[1m<span style="color:#000099;">\e</span>[33m&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> blue; colorize<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, <span style="color:#996600;">&quot;<span style="color:#000099;">\e</span>[1m<span style="color:#000099;">\e</span>[34m&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> dark_blue; colorize<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, <span style="color:#996600;">&quot;<span style="color:#000099;">\e</span>[34m&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> pur; colorize<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, <span style="color:#996600;">&quot;<span style="color:#000099;">\e</span>[1m<span style="color:#000099;">\e</span>[35m&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> colorize<span style="color:#006600; font-weight:bold;">&#40;</span>text, color_code<span style="color:#006600; font-weight:bold;">&#41;</span> &nbsp;<span style="color:#996600;">&quot;#{color_code}#{text}<span style="color:#000099;">\e</span>[0m&quot;</span> <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></td></tr></tbody></table></div>
<p>И при использовании</p>
<div class="codecolorer-container ruby twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Hello&quot;</span>.<span style="color:#9900CC;">red</span></div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: 繁星满天&#187; Blog Archive &#187; links for 2008-05-06</title>
		<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-200735</link>
		<dc:creator>繁星满天&#187; Blog Archive &#187; links for 2008-05-06</dc:creator>
		<pubDate>Sun, 14 Mar 2010 07:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-200735</guid>
		<description>[...] Colorizing console Ruby-script output &#124; Dmytro Shteflyuk’s Home Colorizing console Ruby-script output (tags: Ruby ansi console code) [...]</description>
		<content:encoded><![CDATA[<p>[...] Colorizing console Ruby-script output | Dmytro Shteflyuk’s Home Colorizing console Ruby-script output (tags: Ruby ansi console code) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pmil</title>
		<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-158275</link>
		<dc:creator>pmil</dc:creator>
		<pubDate>Sun, 14 Mar 2010 23:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-158275</guid>
		<description>I have similar problem but I wanted to see Rails log colors in win console.
A little addition.
1. create file &lt;tt&gt;console.rb&lt;/tt&gt;

[cc lang=&quot;ruby&quot;]
require &#039;rubygems&#039;
require &#039;win32console&#039;
include Win32::Console::ANSI
include Term::ANSIColor

puts bold 
[/cc]

</description>
		<content:encoded><![CDATA[<p>I have similar problem but I wanted to see Rails log colors in win console.<br />
A little addition.<br />
1. create file <tt>console.rb</tt></p>
<div class="codecolorer-container ruby twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span><br />
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'win32console'</span><br />
<span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#6666ff; font-weight:bold;">Win32::Console::ANSI</span><br />
<span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#6666ff; font-weight:bold;">Term::ANSIColor</span><br />
<br />
<span style="color:#CC0066; font-weight:bold;">puts</span> bold</div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Artem Vasiliev</title>
		<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-126341</link>
		<dc:creator>Artem Vasiliev</dc:creator>
		<pubDate>Sun, 14 Mar 2010 18:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-126341</guid>
		<description>Круто, спасибо!

Прикрутил это у себя и к серверной консоли, и к autotest..

Правда, не без помощи такой-то матери - простое добавление в environment.rb для autotest не достаточно, пришлось продублировать в .autotest</description>
		<content:encoded><![CDATA[<p>Круто, спасибо!</p>
<p>Прикрутил это у себя и к серверной консоли, и к autotest..</p>
<p>Правда, не без помощи такой-то матери &#8211; простое добавление в environment.rb для autotest не достаточно, пришлось продублировать в .autotest</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eimantas</title>
		<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-108721</link>
		<dc:creator>Eimantas</dc:creator>
		<pubDate>Sun, 14 Mar 2010 09:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-108721</guid>
		<description>спасибо за статью. я как–бы думал, што у руби может быть свой стиль колоризации, но оказывается это те же саммые анси .)</description>
		<content:encoded><![CDATA[<p>спасибо за статью. я как–бы думал, што у руби может быть свой стиль колоризации, но оказывается это те же саммые анси .)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Oliver</title>
		<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-78020</link>
		<dc:creator>Steven Oliver</dc:creator>
		<pubDate>Sun, 14 Mar 2010 00:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-78020</guid>
		<description>This is a great article. If you continue to write interesting things like this I will have to subscribe to your feed!</description>
		<content:encoded><![CDATA[<p>This is a great article. If you continue to write interesting things like this I will have to subscribe to your feed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kale</title>
		<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-73058</link>
		<dc:creator>Kale</dc:creator>
		<pubDate>Sun, 14 Mar 2010 00:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-73058</guid>
		<description>Thanks for the code, it helped a lot for a console app that I am working on.</description>
		<content:encoded><![CDATA[<p>Thanks for the code, it helped a lot for a console app that I am working on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shatyorkin</title>
		<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-31471</link>
		<dc:creator>Shatyorkin</dc:creator>
		<pubDate>Sun, 14 Mar 2010 11:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-31471</guid>
		<description>Классная штука - я это для тестов приспособил.</description>
		<content:encoded><![CDATA[<p>Классная штука &#8211; я это для тестов приспособил.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shaliko</title>
		<link>http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-30821</link>
		<dc:creator>shaliko</dc:creator>
		<pubDate>Sun, 14 Mar 2010 15:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/#comment-30821</guid>
		<description>Большое спасибо за статью!

Непременно воспользуюсь всем выше перечисленным..</description>
		<content:encoded><![CDATA[<p>Большое спасибо за статью!</p>
<p>Непременно воспользуюсь всем выше перечисленным..</p>
]]></content:encoded>
	</item>
</channel>
</rss>
