<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mark's Blog</title>
	<atom:link href="http://markpith.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://markpith.wordpress.com</link>
	<description>Mark's Blog</description>
	<lastBuildDate>Tue, 14 Jul 2009 13:50:33 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='markpith.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/917706e930334ac177b35cac8dc59d6f?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Mark's Blog</title>
		<link>http://markpith.wordpress.com</link>
	</image>
			<item>
		<title>Tour de France ringtone.</title>
		<link>http://markpith.wordpress.com/2009/07/14/tour-de-france-ringtone/</link>
		<comments>http://markpith.wordpress.com/2009/07/14/tour-de-france-ringtone/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:49:31 +0000</pubDate>
		<dc:creator>markpith</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ringtone]]></category>
		<category><![CDATA[tdf]]></category>
		<category><![CDATA[tour de france]]></category>

		<guid isPermaLink="false">http://markpith.wordpress.com/?p=24</guid>
		<description><![CDATA[In the spirit of the Tour de France, I have created a special ringtone!  Available as MP3 download.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=24&subd=markpith&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img src="http://markpith.files.wordpress.com/2009/07/mp3.png?w=128&#038;h=128" alt="mp3 logo" title="mp3 logo" width="128" height="128" class="alignleft size-full wp-image-25" />In the spirit of the Tour de France, I have created a special ringtone! <a href="http://troep.pith.us/TDF-jingle.mp3"> Available as MP3 download.</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/markpith.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/markpith.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/markpith.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/markpith.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/markpith.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/markpith.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/markpith.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/markpith.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/markpith.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/markpith.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=24&subd=markpith&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://markpith.wordpress.com/2009/07/14/tour-de-france-ringtone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://troep.pith.us/TDF-jingle.mp3" length="36597" type="audio/mpeg" />
	
		<media:content url="http://0.gravatar.com/avatar/23d31b12d8ecf5d7541f0f062e34033c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">markpith</media:title>
		</media:content>

		<media:content url="http://markpith.files.wordpress.com/2009/07/mp3.png" medium="image">
			<media:title type="html">mp3 logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Screenshot in VMware Fusion</title>
		<link>http://markpith.wordpress.com/2008/06/18/screenshot-in-vmware-fusion/</link>
		<comments>http://markpith.wordpress.com/2008/06/18/screenshot-in-vmware-fusion/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 09:42:06 +0000</pubDate>
		<dc:creator>markpith</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[fusion]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macbook]]></category>
		<category><![CDATA[randyrants]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[Sharpkeys]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://markpith.wordpress.com/?p=19</guid>
		<description><![CDATA[Sadly the business world is a Windows world, which means I  need Windows on my MacBook Pro to earn some money.. I&#8217;ve been using VMware Fusion for a while. Unfortunately the standard key mapping for &#8220;Print Screen&#8221; is F13, which is not included on my MBP keyboard. The solution I found was to key [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=19&subd=markpith&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sadly the business world is a Windows world, which means I  need Windows on my MacBook Pro to earn some money.. I&#8217;ve been using VMware Fusion for a while. Unfortunately the standard key mapping for &#8220;Print Screen&#8221; is F13, which is not included on my MBP keyboard. The solution I found was to key map a different function key myself using the free application <a href="http://www.randyrants.com/sharpkeys/">SharpKeys</a>.</p>
<p>I&#8217;ve chosen the F8 button (you need to hold the fn key as well), below is a screenshot of the correct setting. After writing the setting in the registry and rebooting Windows, my F8 key is screenshot-ing away! You can also make screenshots of the most front window by using alt-F8.</p>
<p><a href="http://markpith.files.wordpress.com/2008/06/screenshot.png"><img src="http://markpith.files.wordpress.com/2008/06/screenshot.png?w=300&#038;h=242" alt="" width="300" height="242" class="alignleft size-medium wp-image-20" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/markpith.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/markpith.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/markpith.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/markpith.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/markpith.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/markpith.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/markpith.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/markpith.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/markpith.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/markpith.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/markpith.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/markpith.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=19&subd=markpith&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://markpith.wordpress.com/2008/06/18/screenshot-in-vmware-fusion/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23d31b12d8ecf5d7541f0f062e34033c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">markpith</media:title>
		</media:content>

		<media:content url="http://markpith.files.wordpress.com/2008/06/screenshot.png?w=300" medium="image" />
	</item>
		<item>
		<title>Polar running-data in Excel</title>
		<link>http://markpith.wordpress.com/2008/02/15/polar-running-data-in-excel/</link>
		<comments>http://markpith.wordpress.com/2008/02/15/polar-running-data-in-excel/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 00:04:40 +0000</pubDate>
		<dc:creator>markpith</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[polar]]></category>
		<category><![CDATA[RS200sd]]></category>
		<category><![CDATA[sl2hrm]]></category>

		<guid isPermaLink="false">http://markpith.wordpress.com/?p=18</guid>
		<description><![CDATA[
I&#8217;ve been using the Polar RS200sd running computer for about 2,5 years now. Only recently I started using polarpersonaltrainer.com as I couldn&#8217;t upload the data before (thank you Crossover for Mac!). Unfortunately I didn&#8217;t like the web-interface; it didn&#8217;t show me all the info and I couldn&#8217;t export it to Excel files. Luckily I found [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=18&subd=markpith&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img src='http://markpith.files.wordpress.com/2008/02/polar.jpg' alt='polar.jpg' /><br />
I&#8217;ve been using the Polar RS200sd running computer for about 2,5 years now. Only recently I started using polarpersonaltrainer.com as I couldn&#8217;t upload the data before (thank you Crossover for Mac!). Unfortunately I didn&#8217;t like the web-interface; it didn&#8217;t show me all the info and I couldn&#8217;t export it to Excel files. Luckily I found a <a href="http://sl2hrm.tripod.com/">program</a> that converts the Polar SonicLink audio in CSV files, which Excel or any other spreadsheet application can easily read. Instead of manually copying all the data fields into a schedule I created a template which does this for you!</p>
<p><span id="more-18"></span></p>
<p>Step 1.<br />
Convert the SonicLink audio to a CVS file using <a href="http://sl2hrm.tripod.com/">SL2HRM</a>. <em>Be sure SL2HRM uses the same decimal sign as your spreadsheet application.<br />
</em>Step 2.<br />
Open the CVS file in your spreadsheet application, select all cells and copy.<br />
Step 3.<br />
Open the template and paste the copied data into the &#8220;Input sheet&#8221;, overwriting all previous data.<br />
Step 4.<br />
You will see all the relevant data nicely organized on the overview sheet and you can easily copy this information into the calendar sheet.</p>
<p>The template can be used for any year, just be sure you set it to the correct start date.<br />
This version doesn&#8217;t have any automatically generated graphs, but I&#8217;ll probably add these later.<br />
<a href="http://troep.pith.us/Template.xls">Template.xls</a><br />
<a href="http://sl2hrm.tripod.com/">Download SL2HRM</a></p>
<p>Please note: SL2HRM is a windows application, but works well in Crossover for Mac and will probably work in other WINE variants such as DarWINE for PPC macs.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/markpith.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/markpith.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/markpith.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/markpith.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/markpith.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/markpith.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/markpith.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/markpith.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/markpith.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/markpith.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/markpith.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/markpith.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=18&subd=markpith&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://markpith.wordpress.com/2008/02/15/polar-running-data-in-excel/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23d31b12d8ecf5d7541f0f062e34033c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">markpith</media:title>
		</media:content>

		<media:content url="http://markpith.files.wordpress.com/2008/02/polar.jpg" medium="image">
			<media:title type="html">polar.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Save torrent attachments</title>
		<link>http://markpith.wordpress.com/2007/10/14/save-torrent-attachments/</link>
		<comments>http://markpith.wordpress.com/2007/10/14/save-torrent-attachments/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 22:34:39 +0000</pubDate>
		<dc:creator>markpith</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[mail.app]]></category>
		<category><![CDATA[torrent]]></category>

		<guid isPermaLink="false">http://markpith.wordpress.com/2007/10/14/save-torrent-attachments/</guid>
		<description><![CDATA[
For a while we&#8217;ve been using our fileserver as a torrent box. It runs Azureus 2.4.0 headless: without the über slow java GUI. To control it we use the very simple and elegant Azureus widget. This is also the reason it runs 2.4.0; it&#8217;s the only version working nicely with the widget. 
This is great [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=14&subd=markpith&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href='http://markpith.wordpress.com/2007/10/14/save-torrent-attachments/mailapp/' rel='attachment wp-att-15' title='Mail.app'><img src='http://markpith.files.wordpress.com/2007/10/mail.png' alt='Mail.app' /></a><br />
For a while we&#8217;ve been using our fileserver as a torrent box. It runs Azureus 2.4.0 headless: without the über slow java GUI. To control it we use the very simple and elegant <a href="http://andrewdupont.net/azureus/">Azureus widget</a>. This is also the reason it runs 2.4.0; it&#8217;s the only version working nicely with the widget. </p>
<p>This is great when you&#8217;re at home, but how to add torrents to the download queue when you&#8217;re not? Of course you can open your network and work with a web based interface, but it&#8217;s a security hazard and not everybody knows how dyndns works. This is how I fixed it: send e-mails with .torrent attachments to a dedicated e-mail address. Let Mail.app check this dedicated e-mail address every 5 minutes or so and when it detects a .torrent file, save it to the Azureus dropbox. After the break I&#8217;ll show you the Applescript code and the Mail.app rules.<br />
<span id="more-14"></span></p>
<p>First you&#8217;ll need to create the Applescript for saving the .torrent file:</p>
<p><code>using terms from application "Mail"</p>
<p>on perform mail action with messages theMessages for rule theRule</p>
<p>		tell application "Mail"</p>
<p>			repeat with oneMessage in theMessages</p>
<p>				set {mail attachment:theAttachments} to oneMessage</p>
<p>				repeat with oneAttachment in mail attachments of oneMessage</p>
<p>					save oneAttachment in ("Macintosh HD:Your drop box folder:") &amp; (name of oneAttachment)</p>
<p>					-- please change the location above, otherwise it'll never work.</p>
<p>				end repeat</p>
<p>			end repeat</p>
<p>		end tell</p>
<p>	end perform mail action with messages</p>
<p>end using terms from</code></p>
<p>Now setup the proper rules in Mail.app (click thumbnail):</p>
<p><a href='http://markpith.wordpress.com/2007/10/14/save-torrent-attachments/rules/' rel='attachment wp-att-16' title='rules'><img src='http://markpith.files.wordpress.com/2007/10/rules.thumbnail.png' alt='rules' /></a></p>
<p>For a dedicated e-mail address you can create a <a href="http://mail.google.com">gmail</a> account for free.</p>
<p>Good luck!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/markpith.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/markpith.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/markpith.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/markpith.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/markpith.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/markpith.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/markpith.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/markpith.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/markpith.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/markpith.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/markpith.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/markpith.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=14&subd=markpith&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://markpith.wordpress.com/2007/10/14/save-torrent-attachments/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23d31b12d8ecf5d7541f0f062e34033c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">markpith</media:title>
		</media:content>

		<media:content url="http://markpith.files.wordpress.com/2007/10/mail.png" medium="image">
			<media:title type="html">Mail.app</media:title>
		</media:content>

		<media:content url="http://markpith.files.wordpress.com/2007/10/rules.thumbnail.png" medium="image">
			<media:title type="html">rules</media:title>
		</media:content>
	</item>
		<item>
		<title>Downloads</title>
		<link>http://markpith.wordpress.com/2007/03/29/downloads/</link>
		<comments>http://markpith.wordpress.com/2007/03/29/downloads/#comments</comments>
		<pubDate>Thu, 29 Mar 2007 22:19:43 +0000</pubDate>
		<dc:creator>markpith</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://markpith.wordpress.com/2007/03/29/downloads/</guid>
		<description><![CDATA[You can download the AdiTunes script here. I&#8217;ve also made a PDF of the old plugin page with all the comments which might be helpful if you run into any problems.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=4&subd=markpith&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You can download the AdiTunes script <a href="http://troep.pith.us/aditunes_6_1745_1394.zip">here</a>. I&#8217;ve also made a <a href="http://troep.pith.us/AdiTunes.pdf">PDF</a> of the old plugin page with all the comments which might be helpful if you run into any problems.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/markpith.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/markpith.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/markpith.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/markpith.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/markpith.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/markpith.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/markpith.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/markpith.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/markpith.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/markpith.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/markpith.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/markpith.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=4&subd=markpith&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://markpith.wordpress.com/2007/03/29/downloads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23d31b12d8ecf5d7541f0f062e34033c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">markpith</media:title>
		</media:content>
	</item>
		<item>
		<title>Aditunes &#8211; Make your duck sing!</title>
		<link>http://markpith.wordpress.com/2007/03/10/aditunes-make-your-duck-sing/</link>
		<comments>http://markpith.wordpress.com/2007/03/10/aditunes-make-your-duck-sing/#comments</comments>
		<pubDate>Sat, 10 Mar 2007 21:09:01 +0000</pubDate>
		<dc:creator>markpith</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aditunes]]></category>
		<category><![CDATA[adium]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://markpith.wordpress.com/2007/03/10/aditunes/</guid>
		<description><![CDATA[A while ago I wrote a plugin/script for Adium. It facilitates sharing the current song in iTunes with your chat partner. It is/was quite popular with over 16.000 downloads and an average score of 4.2 out of 5. Unfortunately I didn&#8217;t have the time to support the script anymore, that&#8217;s why &#8220;Adium&#8221; kicked it off [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=3&subd=markpith&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A while ago I wrote a plugin/script for Adium. It facilitates sharing the current song in iTunes with your chat partner. It is/was quite popular with over 16.000 downloads and an average score of 4.2 out of 5. Unfortunately I didn&#8217;t have the time to support the script anymore, that&#8217;s why &#8220;Adium&#8221; kicked it off the extras site. Below is a link where you can still download the script. I&#8217;m hoping someone likes the idea and maybe improve it. All the code is public and open for anyone to alter.<br />
<a href="http://adiumxtras.com/index.php?a=xtras&amp;xtra_id=1394">The plugin page.</a><br />
<a href="http://www.adiumxtras.com/images/pictures/aditunes_6_1745_1394_image_2360.jpg"><img src="http://adiumxtras.com/images/pictures/aditunes_6_1745_1394_thumb_2360.jpg" alt="Screenshot" /></a><br />
PS. Please don&#8217;t ask me for technical support, as I said I don&#8217;t have time for it anymore. There is a read me included with instructions and tips if you run into trouble.<br />
<span id="more-3"></span><br />
<code>(*<br />
"AdiTunes" for Adium in combination with iTunes<br />
written by Mark Pith (mark.pith [at] student.uva.nl)</p>
<p>Inspired by the TrackURL script by jrigby, special thanks to Erik Koldenhof.<br />
I've used a large portion of "Save Album Art to Album Folder" for iTunes, written by Doug Adam (thanks!).<br />
As it is distributed under the GPL, I'm, as far as I understand, obligated to do so as well.<br />
Thanks Wesley Underwood, Adam Betts and Laura Natcher for the Adium Ducky artwork.<br />
The HTML layout is inspired by a template from www.templatesbox.com .<br />
I would like to thank Tony Yazbeck; my beta tester and text corrector!<br />
A very big thanks to all the Adium developers!</p>
<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.</p>
<p>Get a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.</p>
<p>or visit http://www.gnu.org/copyleft/gpl.html<br />
*)<br />
substitute()<br />
-- check if iTunes is running, if so send result, else send message "iTunes not running"<br />
on substitute()<br />
	tell application "System Events"<br />
		set iTunesRunning to (name of processes) contains "iTunes"<br />
	end tell<br />
	if iTunesRunning is true then<br />
		return EndResult()<br />
	else<br />
		return "I'm sorry, iTunes is not running."<br />
	end if<br />
end substitute</p>
<p>--get info from iTunes, Finder, System and Internet, and send message to Substitute<br />
on EndResult()<br />
	tell application "iTunes"<br />
		play<br />
		set TrackTitle to name of current track as string<br />
		set TrackArtist to artist of current track as string<br />
		set TrackAlbum to album of current track as string<br />
		set trackLocation to location of current track<br />
		if exists artworks of current track then<br />
			set trackArtwork to (data of artwork 1) of current track<br />
			set trackArtworkFormat to (format of artwork 1) of current track as string<br />
		else<br />
			set trackArtwork to ""<br />
			set trackArtworkFormat to ""<br />
		end if</p>
<p>	end tell<br />
	set wanip to GetWanIP()<br />
	set User to do shell script "whoami" as string<br />
	set startupdisk to path to startup disk as string<br />
	set AdiTunesfolder to startupdisk &amp; "Library:WebServer:Documents:" &amp; User &amp; ":AdiTunes:" as string<br />
	my MakeImage(trackArtwork, trackArtworkFormat, AdiTunesfolder)<br />
	my MakeResult(TrackTitle, TrackArtist, TrackAlbum, trackLocation, wanip, trackArtworkFormat, AdiTunesfolder, User)<br />
	return "Listen to my iTunes: <A>" &amp; "\"" &amp; TrackTitle &amp; "\"" &amp; " by " &amp; "\"" &amp; TrackArtist &amp; "\"" &amp; "</A>"<br />
end EndResult</p>
<p>-- result subroutine<br />
on MakeResult(Title, Artist, Album, location, wanip, ArtworkFormat, AdiTunesfolder, User)<br />
	-- get local URL of file<br />
	tell application "System Events"<br />
		set localURL to URL of location<br />
	end tell<br />
	-- change local URL to online URL<br />
	set trackURL to searchReplace(localURL, "file://localhost/", "")<br />
	-- analyzise URL and change local URL to online URL<br />
	set trackList to stringToList for trackURL from "/"<br />
	set listCount to count (trackList)<br />
	set onlineURL to ("../AdiTunes/Music/" &amp; item (listCount - 2) of trackList &amp; "/" &amp; item (listCount - 1) of trackList &amp; "/" &amp; item (listCount) of trackList) as string<br />
	set Body to HTMLcode(onlineURL, Title, Artist, Album, ArtworkFormat)<br />
	my WriteFile(Body, AdiTunesfolder)<br />
end MakeResult</p>
<p>-- Create an image (jpg or png) from iTunes' Artwork data, read above for more information.<br />
on MakeImage(Artwork, ArtworkFormat, AdiTunesfolder)<br />
	if ArtworkFormat contains "JPEG" then<br />
		set extension to ".jpeg"<br />
		my saveArtwork(Artwork, extension, AdiTunesfolder)<br />
	else if ArtworkFormat contains "PNG" then<br />
		set extension to ".png"<br />
		my saveArtwork(Artwork, extension, AdiTunesfolder)<br />
	else<br />
		do shell script "cp " &amp; (POSIX path of AdiTunesfolder) &amp; "images/album.png " &amp; (POSIX path of AdiTunesfolder) &amp; "album.png"<br />
	end if<br />
end MakeImage</p>
<p>on saveArtwork(Artwork, extension, AdiTunesfolder)<br />
	-- filename<br />
	set filename to "album" &amp; extension<br />
	set tempname to "temp" &amp; extension<br />
	-- set filepath to target_folder<br />
	set tempFile to (AdiTunesfolder &amp; tempname) as text<br />
	set finalFile to AdiTunesfolder &amp; filename<br />
	-- write temp file<br />
	set the tempFile to open for access file tempFile with write permission<br />
	write Artwork to the tempFile starting at 0<br />
	close access the tempFile<br />
	set Artwork to ""<br />
	-- strip good parts, delete temp file<br />
	do shell script "cd " &amp; quoted form of (POSIX path of AdiTunesfolder) &amp; ";¬<br />
                        tail -c+223 " &amp; quoted form of tempname &amp; "&gt; " &amp; ¬<br />
		quoted form of filename &amp; ";rm " &amp; quoted form of tempname<br />
end saveArtwork</p>
<p>-- getting ipaddress subroutine<br />
on GetWanIP()<br />
	set dyndns to (do shell script "curl -f http://checkip.dyndns.org")<br />
	set firstresult to searchReplace(dyndns, "Current IP Address: ", "")<br />
	set IPaddress to searchReplace(firstresult, "", "")<br />
	return IPaddress<br />
end GetWanIP</p>
<p>-- writing information to HTML subroutine<br />
on WriteFile(Body, AdiTunesfolder)<br />
	set LocalFile to (open for access AdiTunesfolder &amp; "index.html" with write permission)<br />
	set eof of LocalFile to 0<br />
	write Body to LocalFile<br />
	close access LocalFile<br />
end WriteFile</p>
<p>-- searchReplace subroutine<br />
on searchReplace(theText, SearchString, ReplaceString)<br />
	set OldDelims to AppleScript's text item delimiters<br />
	set AppleScript's text item delimiters to SearchString<br />
	set newText to text items of theText<br />
	set AppleScript's text item delimiters to ReplaceString<br />
	set newText to newText as text<br />
	set AppleScript's text item delimiters to OldDelims<br />
	return newText<br />
end searchReplace</p>
<p>-- Analyze URL subroutine<br />
on stringToList for theString from stringDelimiter<br />
	tell AppleScript<br />
		set oT to text item delimiters<br />
		set text item delimiters to stringDelimiter<br />
		set outList to text items of theString<br />
		set text item delimiters to oT<br />
		return outList<br />
	end tell<br />
end stringToList</p>
<p>-- HTML code<br />
on HTMLcode(link, Title, Artist, Album, ArtworkFormat)<br />
	if ArtworkFormat contains "JPEG" then<br />
		set extension to ".jpeg"<br />
	else<br />
		set extension to ".png"<br />
	end if<br />
	set code to<br />
-- HTML code deleted for blogging purpose, please download the complete installer/script to view the HTML code<br />
	return code<br />
end HTMLcode</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/markpith.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/markpith.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/markpith.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/markpith.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/markpith.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/markpith.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/markpith.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/markpith.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/markpith.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/markpith.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/markpith.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/markpith.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=3&subd=markpith&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://markpith.wordpress.com/2007/03/10/aditunes-make-your-duck-sing/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23d31b12d8ecf5d7541f0f062e34033c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">markpith</media:title>
		</media:content>

		<media:content url="http://adiumxtras.com/images/pictures/aditunes_6_1745_1394_thumb_2360.jpg" medium="image">
			<media:title type="html">Screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>mark.pith.us</title>
		<link>http://markpith.wordpress.com/2007/03/10/markpithus/</link>
		<comments>http://markpith.wordpress.com/2007/03/10/markpithus/#comments</comments>
		<pubDate>Sat, 10 Mar 2007 20:34:37 +0000</pubDate>
		<dc:creator>markpith</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Welcome to this blog. This is my public blog which I don&#8217;t use often. Please visit my photoblog at http://mark.pith.us/.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=1&subd=markpith&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Welcome to this blog. This is my public blog which I don&#8217;t use often. Please visit my photoblog at <a href="http://mark.pith.us/">http://mark.pith.us/</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/markpith.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/markpith.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/markpith.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/markpith.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/markpith.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/markpith.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/markpith.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/markpith.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/markpith.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/markpith.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/markpith.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/markpith.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=markpith.wordpress.com&blog=862024&post=1&subd=markpith&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://markpith.wordpress.com/2007/03/10/markpithus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23d31b12d8ecf5d7541f0f062e34033c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">markpith</media:title>
		</media:content>
	</item>
	</channel>
</rss>