<?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"
	>

<channel>
	<title>Blogtender</title>
	<atom:link href="http://www.blogtender.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blogtender.com</link>
	<description>Shaken, not stirred.</description>
	<pubDate>Thu, 17 Jul 2008 05:41:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Upgrading to WordPress 2.6</title>
		<link>http://www.blogtender.com/2008/07/upgrading-to-wordpress-26/</link>
		<comments>http://www.blogtender.com/2008/07/upgrading-to-wordpress-26/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 05:41:50 +0000</pubDate>
		<dc:creator>Tom Henderson</dc:creator>
		
		<category><![CDATA[Blogtender]]></category>

		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.blogtender.com/?p=91</guid>
		<description><![CDATA[Blogtender was hacked yesterday, resulting in a handfull of posts getting a list of invisible links added to the bottom, I assume in the hope that Google will pick them up. After changing my passwords (probably unnecessarily) I decided to upgrade to WordPress 2.6. The upgrade process is easy enough in theory: just back up [...]]]></description>
			<content:encoded><![CDATA[<p>Blogtender was hacked yesterday, resulting in a handfull of posts getting a list of invisible links added to the bottom, I assume in the hope that Google will pick them up. After changing my passwords (probably unnecessarily) I decided to upgrade to <a href="http://www.wordpress.org">WordPress 2.6</a>. The upgrade process is easy enough in theory: just back up your updated files (themes etc), delete everything, then upload the new files. Add your stuff back on, hit the upgrade.php file, and you&#8217;re done. Unfortunately I forgot to back up the database, a bad move as the upgrade wiped all my categories. Luckily all the posts were unafected, but it took a while to fix.</p>
<p>In case anyone finds themselves in this position, here&#8217;s what I did, bearing in mind that just beacause it worked for me doesn&#8217;t nessesarily mean it won&#8217;t screw your site up even more.</p>
<ul>
<li>Connect to the WordPress database with phpMyAdmin and open up the wp_terms table.</li>
<li>Run the following sql to replace the blank category names with their id number. Without doing this you can&#8217;t easily edit the categories with the WordPress admin interface.<br />
<code>UPDATE `wp_terms` SET `name` = `term_id`;</code>
</li>
<li>Now log in to WordPress and go to Manage &gt; Categories.</li>
<li>Clicking links in the &#8216;Name&#8217; column will open up the Edit Category page. Clicking the number under &#8216;Posts&#8217; will show you all the posts in that category. I was able to figure out the categories based on the posts in each. Luckily I don&#8217;t have too many categories, though I did delete a couple that only had one post.</li>
</ul>
<p>Next time I&#8217;ll be a bit more careful upgrading, and will definately make sure I have a backup of the database. I was lucky I didn&#8217;t get burnt worse than I did!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogtender.com/2008/07/upgrading-to-wordpress-26/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Incredibly Strange Film Festival iCalendars</title>
		<link>http://www.blogtender.com/2008/07/incredibly-strange-film-festival-icalendars/</link>
		<comments>http://www.blogtender.com/2008/07/incredibly-strange-film-festival-icalendars/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 04:57:33 +0000</pubDate>
		<dc:creator>Tom Henderson</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[Movies]]></category>

		<category><![CDATA[New Zealand]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.blogtender.com/2008/07/12/incredibly-strange-film-festival-icalendars/</guid>
		<description><![CDATA[
&#8220;I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.&#8221;Douglas Adams, Last Chance to See
The Incredibly Strange Film Festival is back with the Rebirth of Cruel, starting today in Auckland and on the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm1.static.flickr.com/48/167164567_1a777370a8_d.jpg" alt="Number 42" /></p>
<blockquote><p>&#8220;I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.&#8221;<br /><span class="quoteattrib">Douglas Adams, Last Chance to See</span></p></blockquote>
<p>The <a href="http://www.incrediblystrange.co.nz/festival/intro/">Incredibly Strange Film Festival</a> is back with the Rebirth of Cruel, starting today in Auckland and on the 18th in Wellington. I&#8217;m personally looking forward to Timecrimes as I have a bit of a thing for <a href="http://www.imdb.com/title/tt0390384/">time travel movies</a>.</p>
<p>The timetable is <a href="http://www.incrediblystrange.co.nz/festival/timetable/">online at the official site</a>, but personally I find an iCal file much more useful, so after a bit of playing around here are iCal files for the Auckland and Wellington timetables. The calendars are generated by a php script reading two xml files: venues.xml and movies.xml (which may or may not be valid xml). There&#8217;s a bit more data in the files that I&#8217;m not using yet, but when it&#8217;s finished the info should get picked up by iCal (or Google Calendar) when it refreshes.</p>
<ul>
<li><a href="http://blogtender.com/isff/?city=Auckland">Auckland Timetable</a></li>
<li><a href="http://blogtender.com/isff/?city=Wellington">Wellington Timetable</a></li>
</ul>
<p>To use them, just right click and copy the link, then in iCal go to the Calendar menu, pick Subscribe&#8230; and paste in the link. Please set the refresh rate to something low to avoid killing my server.</p>
<p>Disclaimer: Please don&#8217;t rely solely on these calendars! Check the <a href="http://www.incrediblystrange.co.nz/festival/timetable/">official timetable</a> to confirm screening times. If you spot any errors, please let me know in the comments.</p>
<p><a href="hhttp://www.flickr.com/photos/ztephen/167164567/">Photo</a> by <a href="http://www.flickr.com/photos/ztephen/">kus-kus</a> on <a href="http://www.flickr.com/">flickr</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogtender.com/2008/07/incredibly-strange-film-festival-icalendars/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Last.fm Charts</title>
		<link>http://www.blogtender.com/2008/07/lastfm-charts/</link>
		<comments>http://www.blogtender.com/2008/07/lastfm-charts/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 05:58:14 +0000</pubDate>
		<dc:creator>Tom Henderson</dc:creator>
		
		<category><![CDATA[Blogtender]]></category>

		<category><![CDATA[Internet]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.blogtender.com/2008/07/06/lastfm-charts/</guid>
		<description><![CDATA[
This is a fun little script I wrote up that reads your weekly top albums chart from Last.fm, gets the cover art for each album, then displays the top albums on your blog. Scroll to the bottom of the page to see how it looks. Yes, there are Wordpress plugins that do this already, but [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.blogtender.com/wp-content/uploads/2008/07/albumcovers.png' alt='Album Covers' /></p>
<p>This is a fun little script I wrote up that reads your weekly top albums chart from <a href="http://www.last.fm">Last.fm</a>, gets the cover art for each album, then displays the top albums on your blog. Scroll to the bottom of the page to see how it looks. Yes, there are Wordpress plugins that do this already, but I always think it&#8217;s a bit more fun to try to roll my own. Most of other scripts tend to use your recent tracks feed as well, which doesn&#8217;t work well for me as I tend to listen through albums so my feed only ever shows a couple of albums. The data I&#8217;m using comes from <a href="http://www.audioscrobbler.net/data/webservices/">Audioscrobbler&#8217;s</a> web services, and there a loads more feeds available for those wanting to customize the script.</p>
<p>The script needs to be included manually in your blog template, so should work fine in any blog software running on a server with php 5 or higher. If you are comfortable with php you should find it easy to customize the output to suit your blog design.</p>
<p>To use, <a href="http://www.blogtender.com/wp-content/downloads/2008/07/lastfm.zip">download the script</a>, upload to your server and use <code>include 'path/to/lastfm.php';</code> to add it to your template. Then you&#8217;ll need to create a cache folder somewhere on your server and change it&#8217;s permissions to 766. (The script uses some simple caching to avoid over use of the xml feeds, but it should probably be caching the images as well.) Then edit the top of the lastfm.php file to customize your settings. You&#8217;ll also need a <a href="http://www.blogtender.com/wp-content/themes/blogtender-2/images/blank-cover.png">blank album image</a> to use when something goes wrong.</p>
<p>The script outputs pretty simple html that should be easy enough to style with just css.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogtender.com/2008/07/lastfm-charts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sharing a Canon laser printer between OSX and XP</title>
		<link>http://www.blogtender.com/2008/01/sharing-a-canon-laser-printer-between-osx-and-xp/</link>
		<comments>http://www.blogtender.com/2008/01/sharing-a-canon-laser-printer-between-osx-and-xp/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 02:25:23 +0000</pubDate>
		<dc:creator>Tom Henderson</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.blogtender.com/2008/01/05/sharing-a-canon-laser-printer-between-osx-and-xp/</guid>
		<description><![CDATA[
In case anyone else runs into this problem in the future, here are the steps needed to share a Canon Imageclass 4140 laser printer between OSX and XP. I&#8217;ve only tested this under Leopard, but it should work for Tiger as well.
First, the problem. While the printer works fine attached to the XP machine, print [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.blogtender.com/wp-content/uploads/2008/01/sc-printer-sharing.png' alt='Printer sharing settings' /></p>
<p>In case anyone else runs into this problem in the future, here are the steps needed to share a Canon Imageclass 4140 laser printer between OSX and XP. I&#8217;ve only tested this under Leopard, but it should work for Tiger as well.</p>
<p>First, the problem. While the printer works fine attached to the XP machine, print jobs sent from the Mac disappear into the ether without actually printing. According to the Canon guy I spoke to, chances are this is because the mac is sending Postscript data which the XP driver doesn&#8217;t know how to handle. Conversely the printer also works fine attached to the mac (as long as you use the most recent drivers, currently version 1.6), however the XP machine is unable to connect to the printer. In the Printers and Faxes window you just get an &#8216;Access denied, unable to connect to the printer&#8217; error.</p>
<p>In order to make the two play nice, first we need to edit the smb.conf file on the OSX machine. In terminal, type:</p>
<pre>
sudo pico /etc/smb.conf
</pre>
<p>Scroll down to the [printers] section and add the line:</p>
<pre>
use client driver = yes
</pre>
<p>I also set the &#8216;guest ok&#8217;, and &#8216;printable&#8217; settings to &#8216;yes&#8217; as well.</p>
<p>Save the file, then try to add the printer on the XP machine. This should get you past the access denied error, but you still can&#8217;t print. Finally, change the printer driver on XP to the Apple Laserwriter driver (any of them should work), which lets the XP machine send Postscript data to the mac.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogtender.com/2008/01/sharing-a-canon-laser-printer-between-osx-and-xp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cleaning up double albums in coverflow</title>
		<link>http://www.blogtender.com/2007/10/cleaning-up-double-albums-in-coverflow/</link>
		<comments>http://www.blogtender.com/2007/10/cleaning-up-double-albums-in-coverflow/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 04:12:38 +0000</pubDate>
		<dc:creator>Tom Henderson</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.blogtender.com/2007/10/07/cleaning-up-double-albums-in-coverflow/</guid>
		<description><![CDATA[
Its always annoyed me that double albums showed up as two cds in iTunes. The only reason most double cds are two discs is because there is more content than one cd can hold (ie 74 mins), but as mp3 files this limit doesn&#8217;t exist. Fortunately iTunes is pretty smart, and a little tag editing [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.blogtender.com/wp-content/uploads/2007/09/itunes-24-hours.png' alt='iTunes coverflow' /></p>
<p>Its always annoyed me that double albums showed up as two cds in iTunes. The only reason most double cds are two discs is because there is more content than one cd can hold (ie 74 mins), but as mp3 files this limit doesn&#8217;t exist. Fortunately iTunes is pretty smart, and a little tag editing can put everything together into one &#8216;album&#8217;, both in list view and in coverflow.</p>
<p>All you need to do is make sure the disc number tags are set (ie disc 1 of 2 and disc 2 of 2) to ensure that the tracks stay in order when combined, then simply give both discs the same name. The result is one long album with disc 1&#8217;s tracks followed by disc 2&#8217;s, which lets the album play right through.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogtender.com/2007/10/cleaning-up-double-albums-in-coverflow/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TaskPaper: Simple plain text to-do lists</title>
		<link>http://www.blogtender.com/2007/08/taskpaper-simple-plain-text-to-do-lists/</link>
		<comments>http://www.blogtender.com/2007/08/taskpaper-simple-plain-text-to-do-lists/#comments</comments>
		<pubDate>Sun, 05 Aug 2007 06:19:53 +0000</pubDate>
		<dc:creator>Tom Henderson</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.blogtender.com/2007/08/05/taskpaper-simple-plain-text-to-do-lists/</guid>
		<description><![CDATA[TaskPaper is a clean, text based to-do list manager from the maker of WriteRoom. It&#8217;s still early in development, but is already looking like a really useful tool. Since TaskPaper uses plain text files your lists are not locked in to the software - you can read and edit your tasks anywhere you can edit [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://hogbaysoftware.com/projects/taskpaper">TaskPaper</a> is a clean, text based to-do list manager from the maker of <a href="http://hogbaysoftware.com/projects/writeroom">WriteRoom</a>. It&#8217;s still early in development, but is already looking like a really useful tool. Since TaskPaper uses plain text files your lists are not locked in to the software - you can read and edit your tasks anywhere you can edit text files. I&#8217;ve got mine on on my Treo&#8217;s flash card so I can open and edit the file on the go (This doesn&#8217;t work perfectly - I think the problem has to do with file encodings - but this is still an 0.2 development release).</p>
<p>The file format is simple (and still being developed) and consistes of a few key symbols to indicate tasks and headings.</p>
<pre>
A heading ends with a colon:
A description is just a regular line of text.
- A task starts with '- ' on a new line.
- Here's another task, with a context: @next
- Completed tasks end with @done
</pre>
<p>I started thinking about ways the display could be improved without compromising the key point of difference of plain text files, and came up with this mockup.</p>
<p><strong>Note:</strong> <em>Mockup</em>, the program shown below is <em>based</em> on TaskPaper, but doesn&#8217;t actually exist.</p>
<p><img src='http://www.blogtender.com/wp-content/uploads/2007/08/sc-taskpaper-mockup.png' alt='TaskPaper Screenshot Mockup' /></p>
<p>At the top I&#8217;ve added a standard unified toolbar with search field and a filter bar. I imagine the filter bar automatically picking up on the most common tags used, with the rest under the &#8216;More&#8217; popup. The search field would highlight the search term everywhere in the document.</p>
<p>At the side I expanded on the use of round buttons instead of the usual checkboxes. The + and - buttons appear next to each list heading, and expand and collapse the list. The task dots can be colour coded based on the applied tags - in this example I&#8217;ve highlighted @waiting in orange and @next in green.</p>
<p>I&#8217;ve also started thinking about a way to bring the tasks into iCal, possibly using some of the code I wrote for my <a href="http://www.blogtender.com/2007/05/31/display-an-rss-feed-in-ical/">RSS to iCal script</a>. It should also be fairly easy to write a parser for the format in php which you could run from your desktop. You could then build a web interface and access your lists from anywhere, like an iPhone for example.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogtender.com/2007/08/taskpaper-simple-plain-text-to-do-lists/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Crazy Unit Conversions in Connoisseur</title>
		<link>http://www.blogtender.com/2007/06/crazy-unit-conversions-in-connoisseur/</link>
		<comments>http://www.blogtender.com/2007/06/crazy-unit-conversions-in-connoisseur/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 05:49:58 +0000</pubDate>
		<dc:creator>Tom Henderson</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.blogtender.com/2007/06/30/crazy-unit-conversions-in-connoisseur/</guid>
		<description><![CDATA[
Came across this screenshot while clearing out some files. It&#8217;s from a version of Connoisseur I played around with a while ago. I was wondering if any of the various recipe apps around would make a good cocktail database. I was poking around the preferences and noticed that I could switch the units to metric, [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.blogtender.com/wp-content/uploads/2007/05/sc-crazy-units-thumb.png' alt='Crazy Units' /></p>
<p>Came across this screenshot while clearing out some files. It&#8217;s from a version of <a href="http://www.thelittleappfactory.com/application.php?app=Connoisseur">Connoisseur</a> I played around with a while ago. I was wondering if any of the various recipe apps around would make a good cocktail database. I was poking around the preferences and noticed that I could switch the units to metric, but after I made the change some odd measurements showed up in the built in recipes. After switching back and forth a few times, I ended up with a recipe for 15min Brownies calling for 83 43691/131072mls of Butter. That&#8217;s pretty impressive accuracy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogtender.com/2007/06/crazy-unit-conversions-in-connoisseur/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Display an RSS Feed in iCal</title>
		<link>http://www.blogtender.com/2007/05/display-an-rss-feed-in-ical/</link>
		<comments>http://www.blogtender.com/2007/05/display-an-rss-feed-in-ical/#comments</comments>
		<pubDate>Thu, 31 May 2007 06:52:59 +0000</pubDate>
		<dc:creator>Tom Henderson</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.blogtender.com/2007/05/31/display-an-rss-feed-in-ical/</guid>
		<description><![CDATA[
This is a quick and dirty php script I wrote up to convert an RSS feed into ics format so I could display it in iCal. It uses MagpieRSS to parse the RSS, then creates an event for each item. There is plenty of room for improvement here, but it&#8217;s working - in the screenshot [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.blogtender.com/wp-content/uploads/2007/05/sc-rss-ics.png" /></p>
<p>This is a quick and dirty php script I wrote up to convert an RSS feed into ics format so I could display it in <a href="">iCal</a>. It uses <a href="http://magpierss.sourceforge.net/">MagpieRSS</a> to parse the RSS, then creates an event for each item. There is plenty of room for improvement here, but it&#8217;s working - in the screenshot above I have iCal subscribed to <a href="http://www.blogtender.com/feed/">my feed</a>, <a href="http://daringfireball.net/">Daring Fireball</a>, and <a href="http://blog.flickr.com/">FlickrBlog</a>.</p>
<p>To do:</p>
<ul>
<li>Include the main description of the items in the event description. This is simple enough, but I need a function to format the descriptions so they are compatible with ics.</li>
<li>I&#8217;d like to add a couple of query string options, in particular an option to display events as &#8216;all day&#8217; events, instead of at a time.</li>
<li>The <a href="http://microformats.org/wiki/hcalendar">hCalendar</a> microformat looks pretty interesting, but that&#8217;s another job entirely.</li>
</ul>
<p>To use, <a href="http://www.blogtender.com/wp-content/downloads/2007/05/rss-ics.zip">download the script</a> and upload to your server (or use from your local server). In iCal, select Calendar > Subscribe&#8230;, and enter the path in the format http://path/to/rss-ics.php?url=http://path/to/feed/.</p>
<p>In it&#8217;s current form it&#8217;s not particularly useful, but I have a few ideas already, and if anyone comes up with anything interesting using this I&#8217;d love to hear about it.</p>
<p><strong>Update:</strong> Should now handle feeds that store the date in the dc:date field as well as those using pubDate.</p>
<p><strong>Update:</strong> This works great for <a href="http://www.facebook.com">facebook</a> status feeds.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogtender.com/2007/05/display-an-rss-feed-in-ical/feed/</wfw:commentRss>
		</item>
		<item>
		<title>White Russian, and the return of drunkenbatman</title>
		<link>http://www.blogtender.com/2007/05/white-russian-and-the-return-of-drunkenbatman/</link>
		<comments>http://www.blogtender.com/2007/05/white-russian-and-the-return-of-drunkenbatman/#comments</comments>
		<pubDate>Tue, 22 May 2007 01:37:25 +0000</pubDate>
		<dc:creator>Tom Henderson</dc:creator>
		
		<category><![CDATA[Cocktails]]></category>

		<category><![CDATA[Coffee]]></category>

		<category><![CDATA[Internet]]></category>

		<category><![CDATA[Vodka]]></category>

		<guid isPermaLink="false">http://www.blogtender.com/2007/05/22/white-russian-and-the-return-of-drunkenbatman/</guid>
		<description><![CDATA[
Last week drunkenbatman popped up in my feeds again after almost a year offline. The last few comments on the previous post had led me to suspect the worst, though he is fairly prone to slipping off the radar for extended periods. Drunkenblog is a must-read for any Mac geek, so to celebrate, here&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/kuskus/133015659/"><img src="http://farm1.static.flickr.com/56/133015659_9ac1707c19_d.jpg" alt="White Russian by kus-kus on flickr" /></a></p>
<p>Last week drunkenbatman popped up in my feeds again after almost a year offline. The last few comments on the previous post had led me to suspect the worst, though he is fairly prone to slipping off the radar for extended periods. <a href="http://www.drunkenblog.com/">Drunkenblog</a> is a must-read for any Mac geek, so to celebrate, here&#8217;s a simple but classic drink everyone should know: the <a href="http://www.drunkenblog.com/drunkenblog-archives/000406.html">White Russian</a>.</p>
<ul>
<li>30ml Vodka</li>
<li>15ml Tia Maria</li>
<li>30ml Cream</li>
</ul>
<p>Build up over ice in a short glass and stir well. I prefer to use Tia Maria in a White Russian as it has a slightly smoother, creamier taste than Kahlua, which I find quite harsh.</p>
<p><a href="http://www.flickr.com/photos/kuskus/133015659/">Photo</a> by <a href="http://www.flickr.com/photos/kuskus/">kus-kus</a> on <a href="http://www.flickr.com/">flickr</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogtender.com/2007/05/white-russian-and-the-return-of-drunkenbatman/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fixing a Broken iTunes Library with Applescript</title>
		<link>http://www.blogtender.com/2007/04/fixing-a-broken-itunes-library-with-applescript/</link>
		<comments>http://www.blogtender.com/2007/04/fixing-a-broken-itunes-library-with-applescript/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 12:16:15 +0000</pubDate>
		<dc:creator>Tom Henderson</dc:creator>
		
		<category><![CDATA[Applescript]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://www.blogtender.com/2007/04/18/fixing-a-broken-itunes-library-with-applescript/</guid>
		<description><![CDATA[
Last night I opened iTunes to find that all my genres had disappeared.
One Minute Shaking
After the initial shock wore off it occurred to me that since the genre info was stored in the id3 tags of each file it was unlikely that they were completely gone. Getting info on a couple of tracks confirmed that [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.blogtender.com/wp-content/uploads/2007/04/sc-borked-itunes.png' alt='Borked iTunes Genres' /></p>
<p>Last night I opened iTunes to find that all my genres had disappeared.</p>
<h1><a href="http://www.last.fm/music/Mr+Oizo">One Minute Shaking</a></h1>
<p>After the initial shock wore off it occurred to me that since the genre info was stored in the id3 tags of each file it was unlikely that they were completely gone. Getting info on a couple of tracks confirmed that the data was all still there, and interestingly, once the info window had been opened the genre info appeared for that track. It seems that, somehow, iTunes had simply <em>forgotten</em> the genre of every song in my library.</p>
<h1><a href="http://www.last.fm/music/Audioslave">Bring Em Back Alive</a></h1>
<p>Surely there was an easy way to ask iTunes to simply refresh my library by reading the id3 tags of each file? Apparantly not. <a href="http://manishbansal.wordpress.com/2006/02/10/how-to-rescan-a-folder-in-itunes-and-keep-song-ratings/">A bit of googling suggested</a> that you could do this by selecting all the tracks (Command - A), getting info (Command - I), then pressing OK. <em>You need to make sure that none of the fields were checked before you hit ok, or iTunes will go through and actually edit the tags, making things even worse.</em> This seemed promising, but unfortunately it didn&#8217;t work. After a few minutes of processing, nothing had changed.</p>
<p>Since the data was all there in the music files I knew that I could just ditch my library and start again by re-importing everything, but that would be a last resort. I would loose all my play-counts, playlists, ratings, etc, and probably have to re-sync the whole lot to my ipod.</p>
<p>One thing I noticed while experimenting was that the info window didn&#8217;t even need to be closed for iTunes to update - I could open it, hit &#8216;next track&#8217;, and iTunes would pick up the info from each track as I paged through the songs. That gave me an idea.</p>
<h1><a href="http://www.last.fm/music/The+Black+Keys">10AM Automatic</a></h1>
<p>It&#8217;s a very simple, and slightly silly applescript, but it works. To use it, you need to enable GUI scripting in System Preferences under Universal Access (check &#8216;Enable access for assistive devices&#8217;). Then open Script Editor and enter the following applescript (<a href="http://www.blogtender.com/wp-content/downloads/2007/04/10am-Automatic.zip">or just download it</a>).</p>
<pre>
tell application "System Events"
    tell process "iTunes"
        set frontmost to true
            keystroke "i" using {command down}
            repeat 10000 times
                keystroke "n" using {command down}
            end repeat
    end tell
end tell
</pre>
<p>You could change the repeat line to &#8216;repeat while true&#8217;, but I wanted to be sure that it would actually stop.</p>
<p>Open iTunes, select the first track, switch back to Script Editor, and hit run. Applescript will switch to iTunes, get info on the selected track, then hit the next button 10,000 times. On my machine applescript seems to be too quick for iTunes so it doesn&#8217;t actually go through 10,000 tracks. When it stops, just scroll down and select the first song with a missing genre and start the script again.</p>
<h1><a href="http://www.last.fm/music/Massive+Attack">Future Proof</a></h1>
<p>Obviously this would have been much easier if I&#8217;d had a recent backup, and I&#8217;ll definitely be backing up a bit more frequently now. It would be nice to see a re-build option in iTunes though. The data is all there in the files, iTunes just needs to be told to look for it.</p>
<p><em>Disclaimer:</em> If you try this, back up first. It shouldn&#8217;t cause any problems, but I won&#8217;t be held responsible if something goes wrong&#8230; or if you end up with 10,000 empty playlists.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogtender.com/2007/04/fixing-a-broken-itunes-library-with-applescript/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
