<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>dekstop weblog : Teaser: Offline Feed Reader for Your iPod</title>
    <link>http://dekstop.de/weblog/2007/05/ipod_offline_feed_reader/</link>
    <description> As recently mentioned I was looking for useful hacks for the iPod Notes feature, and as Google didn&apos;t turn up much of interest I started writing one myself. The obvious first application: an offline feed reader. Turns out it&apos;s remarkably easy to do this. The Notes file format is ...</description>
    <dc:language>en-us</dc:language>
    <dc:rights>Copyright 2007 Martin Dittus</dc:rights>
    <lastBuildDate>Sun, 27 May 2007 22:47:55 GMT</lastBuildDate>
    <generator>MicroLinks 5.6 (dekstop.de)</generator>
    <managingEditor>public&#64;dekstop&#46;de</managingEditor>
    <webMaster>public&#64;dekstop&#46;de</webMaster>

    <item>
      <title>Comment on "Teaser: Offline Feed Reader for Your iPod"</title>
      <link>http://dekstop.de/weblog/2007/05/ipod_offline_feed_reader/#947</link>
      <description><![CDATA[<p>I'm trying to move non-"purchased" songs from iPods to authorized iTunes installations on other machines. Such as when you take your iPod to work and want to transfer the tunes to that machine.</p>

<p>I can do this no prob. But of course I don't want to click and drag or go through the drag of opening terminal to do it every time.</p>

<p>Basically, one part of my quest is to find a reliable way to identify a volume as an iPod. I don't care what kind of iPod, I just want to know that it is one.</p>

<p>I got a hint sent to me about the IOKit  but it's pretty hairy low-level C stuff that is not fun to dig through.<br />
this is the hint i've recieved:<br />
IOServiceMatching("com_apple_driver_iPodNub")<br />
IOServiceMatching("com_apple_driver_iPodSBCNub")</p>

<p>I've also been digging in Apple's Developer docs, and in the part:<br />
Accessing Hardware From Applications: Finding Devices in the IO Registry</p>

<p>I found something of this, and opened the dev tools app IORegistryExplorer</p>

<p>I've found the PID (product id, listed as idProduct in some IO registry plist xml file) and VID (vendor id, listed as idVendor)</p>

<p>Trouble is I haven't the faintest idea at the moment, how to access the IO registry to check this stuff, or what other iPods will have as PID.</p>

<p>If any of that helps you, let me know and help back...<br />
cheers.</p>]]> &lt;p&gt;- <![CDATA[<a href="http://www.goodbyehelicopter.com" rel="nofollow">Goodbye Helicopter</a>]]>&lt;/p&gt;</description>
      <dc:creator>Goodbye Helicopter</dc:creator>
      <guid isPermaLink="true">http://dekstop.de/weblog/2007/05/ipod_offline_feed_reader/#947</guid>
      <pubDate>Sun, 02 Dec 2007 03:24:54 GMT</pubDate>
    </item>
    <item>
      <title>Comment on "Teaser: Offline Feed Reader for Your iPod"</title>
      <link>http://dekstop.de/weblog/2007/05/ipod_offline_feed_reader/#548</link>
      <description><![CDATA[<p>Ace. My nano display is kind of tiny though. Pretty useful with the bigger models probably...</p>]]> &lt;p&gt;- <![CDATA[<a href="http://quotesque.net" rel="nofollow">anil</a>]]>&lt;/p&gt;</description>
      <dc:creator>anil</dc:creator>
      <guid isPermaLink="true">http://dekstop.de/weblog/2007/05/ipod_offline_feed_reader/#548</guid>
      <pubDate>Mon, 28 May 2007 00:01:37 GMT</pubDate>
    </item>
    <item>
      <title>Comment on "Teaser: Offline Feed Reader for Your iPod"</title>
      <link>http://dekstop.de/weblog/2007/05/ipod_offline_feed_reader/#547</link>
      <description><![CDATA[<p>That is awesome!</p>]]> &lt;p&gt;- <![CDATA[<a href="http://julianstahnke.com" rel="nofollow">Julian Stahnke</a>]]>&lt;/p&gt;</description>
      <dc:creator>Julian Stahnke</dc:creator>
      <guid isPermaLink="true">http://dekstop.de/weblog/2007/05/ipod_offline_feed_reader/#547</guid>
      <pubDate>Sun, 27 May 2007 23:58:55 GMT</pubDate>
    </item>


    <item>
      <title>Teaser: Offline Feed Reader for Your iPod</title>
      <link>http://dekstop.de/weblog/2007/05/ipod_offline_feed_reader/</link> 
      <description><![CDATA[<table class="imagetable" border="0" width="500">
<tr>
    <td align="left">
        <a href="http://www.flickr.com/photos/dekstop/516644102/" title="Photo Sharing"><img src="http://farm1.static.flickr.com/224/516644102_571bdac15d_m.jpg" width="240" height="180" alt="feed index" /></a></td>
    <td align="left">
        <a href="http://www.flickr.com/photos/dekstop/516644116/" title="Photo Sharing"><img src="http://farm1.static.flickr.com/211/516644116_02324de582_m.jpg" width="240" height="180" alt="article" /></a></td>
</tr>
</table>

<p>As <a href="http://dekstop.de/weblog/2007/05/ipod_rot13_tag/">recently mentioned</a> I was looking for useful hacks for the iPod Notes feature, and as Google didn't turn up much of interest I started writing one myself. The obvious first application: an offline feed reader.</p>

<p>Turns out it's remarkably easy to do this. The Notes file format is basically text with some HTML markup, and even allows for links between individual documents. I.e., converting a feed into a series of notes and an index is pretty straightforward.</p>

<p>The harder part is the syncing mechanism. My requirements were: syncing has to work on a default OS X installation, it should be able to sync with my 2nd gen nano, and it shouldn't touch any other removable drives or iPods when you plug them in. <tt>launchd</tt> makes it easy to get notified when any new drive gets plugged in. But how do you make sure it's the right one?</p>


<h3>Uniquely Identifying Removable Drives</h3>

<p>It took me a while to figure out a way to uniquely identify the iPod -- there are a number of options with varying trade-offs. In the end I decided on a method that should work for many other removable drives, not just iPods. Took a while to get there though...</p>

<p>The most obvious identifier, the drive name, never seemed like a good option. Drive names aren't unique, and they can change. I don't want to reconfigure my sync software just because I decided to rename my iPod.</p>

<p>Next option: older iPod models had a hidden file <tt>/iPod_Control/Device/SysInfo</tt> that contained an iPod serial number, but since late 2006 that's no longer the case. Instead the iPod serial is now stored inside a hidden plist that you can <a href="http://www.thismuchiknow.co.uk/?p=28">request</a> with a SCSI INQUIRY command -- which involves too much code for my taste, and seems a little brittle. People put a lot of work into reverse-engineering iPod internals, but it's still a game of cat and mouse.</p>

<p>Another option is to determine the pod's hard drive model and serial number, but I haven't found a way to do this with only standard OS X tools. <tt>smartctl -i</tt> can do it, but smartmontools aren't shipped with OS X. I'm suspecting there is a device file with that information somewhere, but couldn't find one. Add a comment when you know more.</p>

<p>Instead I ultimately decided on using Volume <a href="http://en.wikipedia.org/wiki/UUID">UUIDs</a> -- they're sufficiently unique, they identify a specific partition, and they seem work for all kinds of removable drives (unfortunately not for my old MP3 player and memory stick.)</p>

<p>So if you combine this identifier with <tt>launchd</tt> (to get informed of volume changes) and <tt>rsync</tt> (to do the copying) and some Ruby glue you have a pretty decent syncing mechanism. And it's not even iPod-specific -- you could also use it to do auto-backups when you plug in a specific drive, and do other fun stuff with removable devices.</p>


<h3>Current State</h3>

<table class="imagetable" border="0" width="500">
<tr>
    <td align="left">
        <a href="http://www.flickr.com/photos/dekstop/516644096/" title="Photo Sharing"><img src="http://farm1.static.flickr.com/251/516644096_fbd7c70dff_m.jpg" width="240" height="180" alt="main menu" /></a></td>
    <td align="left">
        <a href="http://www.flickr.com/photos/dekstop/516644120/" title="Photo Sharing"><img src="http://farm1.static.flickr.com/193/516644120_4fdfcc162c_m.jpg" width="240" height="180" alt="article" /></a></td>
</tr>
</table>

<p>At the moment this application isn't much more than a collection of Ruby scripts and a launchd plist, not very user-friendly. I'm toying with the thought of creating a simple UI to configure sync options, and a basic plugin mechanism to allow to sync more than just feeds, but haven't yet come up with a method of creating an appealing interface that doesn't involve a lot of work... maybe you have some ideas. I basically want to be able to do it in an afternoon and be done with it. (Although I've written some Objective C and Cocoa code I'm not much of an expert.)</p>

<p>There also is no public SVN for this yet, but I'll create one when I'm sufficiently happy with the state of this.</p>

<p>I'm now testing this offline aggregator on the road -- seems like an excellent way to read news bits during my daily bus routine. (But it's actually not that easy to find sources that still work when you lose links &amp; images...)</p>]]></description>
      <dc:creator>Martin Dittus</dc:creator>
      <category>konsum</category>
      <category>pop culture</category>
      <category>tools</category>
      
      <guid isPermaLink="true">http://dekstop.de/weblog/2007/05/ipod_offline_feed_reader/</guid>
      <pubDate>Sun, 27 May 2007 22:47:55 GMT</pubDate>
    </item>
  </channel>
</rss>

