<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UKSTUDIO &#187; Autotest</title>
	<atom:link href="http://ukstudio.jp/tag/autotest/feed/" rel="self" type="application/rss+xml" />
	<link>http://ukstudio.jp</link>
	<description>いわゆる86世代のブログです</description>
	<lastBuildDate>Wed, 11 Jan 2012 05:53:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<div id='fb-root'></div>
					<script type='text/javascript'>
						window.fbAsyncInit = function()
						{
							FB.init({appId: null, status: true, cookie: true, xfbml: true});
						};
						(function()
						{
							var e = document.createElement('script'); e.async = true;
							e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
							document.getElementById('fb-root').appendChild(e);
						}());
					</script>	
						<item>
		<title>autotestの結果をMacのsayコマンドで通知する</title>
		<link>http://ukstudio.jp/2008/06/30/song_for_autotest/</link>
		<comments>http://ukstudio.jp/2008/06/30/song_for_autotest/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 11:58:40 +0000</pubDate>
		<dc:creator>ukstudio</dc:creator>
				<category><![CDATA[article]]></category>
		<category><![CDATA[Autotest]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://uk-studio.net/2008/06/30/song_for_autotest/</guid>
		<description><![CDATA[かなりネタなエントリー。 Macにはsayコマンドと言うものがあって、入力した英単語とかをしゃべらせることができる。詳細はMacの手書き説明書さんが最近エントリー書いているのでそちらを見てくださいな。 Macが歌いだす！？ &#124; Macの手書き説明書 んで、今回はそのsayコマンドを使って、autotestの結果をしゃべらせよう!というネタ企画。実用性はほぼ皆無。 まずは~/.autotestを修正。最下行に以下を追記する。既にgrowlの通知などの設定がある場合はそこにsayコマンドの実行文を追記すればOK。 module Autotest::Growl Autotest.add_hook :ran_command do &#124;at&#124; results = [at.results].flatten.flatten.join("\n") output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+not implemented)?/) if output if $~[2].to_i > 0 `say -v bad faild` else `say -v good success!` end end end end `で括っている2箇所でsayコマンドを実行している。失敗したときはbadな声で、成功したときはgoodな声で結果を通知する。他にも色んな声があるらしいので、そこらへんは好みで。 ls /System/Library/Speech/Voices とすると声の一覧がでるっぽい。]]></description>
			<content:encoded><![CDATA[				<div class='wpfblike' style='height: 40px;'><fb:like href='http://ukstudio.jp/2008/06/30/song_for_autotest/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><p>かなりネタなエントリー。</p>
				<p>Macにはsayコマンドと言うものがあって、入力した英単語とかをしゃべらせることができる。詳細はMacの手書き説明書さんが最近エントリー書いているのでそちらを見てくださいな。</p>
				<p><a href="http://veadardiary.blog29.fc2.com/blog-entry-1645.html">Macが歌いだす！？ | Macの手書き説明書</a></p>
				<p>んで、今回はそのsayコマンドを使って、autotestの結果をしゃべらせよう!というネタ企画。実用性はほぼ皆無。</p>
				<p>まずは~/.autotestを修正。最下行に以下を追記する。既にgrowlの通知などの設定がある場合はそこにsayコマンドの実行文を追記すればOK。</p>
				<pre lang="ruby">
module Autotest::Growl
  Autotest.add_hook :ran_command do |at|
    results = [at.results].flatten.flatten.join("\n")
    output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+not implemented)?/)
    if output
      if $~[2].to_i > 0
        `say -v bad faild`
      else
        `say -v good success!`
      end
    end
  end
end
</pre>
				<p>`で括っている2箇所でsayコマンドを実行している。失敗したときはbadな声で、成功したときはgoodな声で結果を通知する。他にも色んな声があるらしいので、そこらへんは好みで。</p>
				<pre lang="bash">
ls /System/Library/Speech/Voices
</pre>
				<p>とすると声の一覧がでるっぽい。</p>
				<div class='wpfblike' style='height: 40px;'><fb:like href='http://ukstudio.jp/2008/06/30/song_for_autotest/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
			<wfw:commentRss>http://ukstudio.jp/2008/06/30/song_for_autotest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

