<?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>ONE AND ONE MAKES TEN &#187; itunes</title>
	<atom:link href="http://blog.joaomoreno.com/tag/itunes/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.joaomoreno.com</link>
	<description></description>
	<lastBuildDate>Fri, 16 Jul 2010 10:16:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>growl4itunes</title>
		<link>http://blog.joaomoreno.com/growl4itunes/</link>
		<comments>http://blog.joaomoreno.com/growl4itunes/#comments</comments>
		<pubDate>Tue, 26 May 2009 07:01:36 +0000</pubDate>
		<dc:creator>João Moreno</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[green apples]]></category>
		<category><![CDATA[growl]]></category>
		<category><![CDATA[itunes]]></category>

		<guid isPermaLink="false">http://blog.joaomoreno.com/?p=320</guid>
		<description><![CDATA[I found that GrowlTunes, the application that notifies Growl whenever iTunes changes status, outputed just too much information; so I did a little script just to output the &#8216;title&#8217;, &#8216;artist&#8217; and &#8216;album&#8217; of the current playing song. growl4itunes You can find this script under the homonimous folder in my Green Apples repository. Or you can [...]]]></description>
			<content:encoded><![CDATA[<p>I found that GrowlTunes, the application that notifies Growl whenever iTunes changes status, outputed just too much information; so I did a little script just to output the &#8216;title&#8217;, &#8216;artist&#8217; and &#8216;album&#8217; of the current playing song.</p>
<p><strong>growl4itunes</strong><br />
You can find this script under the homonimous folder in my <a href="http://github.com/joaomoreno/Green-Apples/tree/master">Green Apples</a> repository. Or you can read it here:</p>
<pre class="brush: python;">#!/usr/bin/env python
from popen2 import popen2
from time import sleep

PERIOD = 5
data = None

while True:
    o, i = popen2(&quot;osascript -e 'tell application \&quot;iTunes\&quot; to if player state is playing then name of current track &amp; \&quot;\n\&quot; &amp; artist of current track &amp; \&quot;\n\&quot; &amp; album of current track'&quot;)
    newdata = o.readlines()
    if data != newdata:
        data = newdata
        try:
            popen2(&quot;growlnotify -m \&quot;&quot; + data[1] + data[2] + &quot;\&quot; -t \&quot;&quot; + data[0] + &quot;\&quot;&quot;)
        except:
            pass

    sleep(PERIOD)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.joaomoreno.com/growl4itunes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
