<?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>toxicsoftware.com &#187; Links</title>
	<atom:link href="http://toxicsoftware.com/tag/links/feed/" rel="self" type="application/rss+xml" />
	<link>http://toxicsoftware.com</link>
	<description>RANDOMIZE USR 0</description>
	<lastBuildDate>Sun, 01 Aug 2010 17:49:39 +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>SpaceNavigator controlled Lego Mindstorms NXT</title>
		<link>http://toxicsoftware.com/spacenavigatornxt/</link>
		<comments>http://toxicsoftware.com/spacenavigatornxt/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 02:50:04 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Lego]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Mindstorms]]></category>
		<category><![CDATA[NXT]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[SpaceNavigator]]></category>

		<guid isPermaLink="false">http://toxicsoftware.com/spacenavigatornxt/</guid>
		<description><![CDATA[It&#8217;s my second year of coaching a First Lego League team. The experience has been fantastic, I&#8217;m teaching 4th and 5th grade children about robots and computers, and teaching them to build and program their own robots. This year the &#8230; <a href="http://toxicsoftware.com/spacenavigatornxt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s my second year of coaching a <a href="http://www.firstlegoleague.org/">First Lego League</a> team. The experience has been fantastic, I&#8217;m teaching 4th and 5th grade children about robots and computers, and teaching them to build and program their own robots. This year the kids are going to be learning how to use the new <a href="http://www.amazon.com/gp/product/B000E4FDAE?ie=UTF8&amp;tag=toxicsoftware-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000E4FDAE">Lego Mindstorms NXT</a> robot; therefore I happen to have an NXT robot in the house. One of the cool features of the NXT is that it can communicate to a Mac (or even another NXT robot) via Bluetooth. So I thought it might be fun to take the <a href="http://www.amazon.com/gp/product/B000LB41BM?ie=UTF8&amp;tag=toxicsoftware-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000LB41BM">3Dconnexion SpaceNavigator</a> controller device I used in my <a href="/the-intersection-of-cool-and-awesome">previous blog post</a> and use it to control an NXT Robot. Here is the result:</p>

<p><a href="http://s3.amazonaws.com/uploads.toxicsoftware.com/SpaceNavigatorNXT.mp4"><img src="http://toxicsoftware.com/wordpress/uploads/spacenavigatornxtpreview.png" alt="SpaceNavigatorNXTPreview.png" border="0" width="320" height="248" /></a></p>

<p>Although the SpaceNavigator support six degrees of freedom, I&#8217;m only using two (Y axis for forwards/reverse and RZ for turning), that leaves plenty of room for expansion (perhaps hooking up a third motor to another controller axis).</p>

<p>Although the video doesn&#8217;t show it too well, the SpaceNavigator does allow for very fine grained control over the robot (as long as the robot has fresh batteries!). The controller is extremely sensitive and with practice the robot can be controlled quite delicately.</p>

<p>Currently only one axis is dominant at a time (that&#8217;s actually a preference in the SpaceController System Preferences screen) but it is be possible to control robot steering and speed/direction at the same time. I&#8217;ll be trying that out soon.</p>

<p>There doesn&#8217;t seem to be much in the way of Mac OS X APIs for controlling NXT via Bluetooth, so I&#8217;m putting my code onto my <a href="http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_743/Projects/NXTTest/">public subversion server</a> and releasing it (like everything else in my public repository) under the <a href="http://en.wikipedia.org/wiki/Bsd_license">BSD License</a>. The code is Leopard only (although all I&#8217;m using are some <a href="http://developer.apple.com/leopard/overview/tools.html">Objective-C 2.0</a> features, such as properties and the new for loop). The code uses Cocoa bindings/KVC and has a rather simple interface:</p>

<pre><code>robot = [[[CNXTRobot alloc] init] autorelease];
((CNXTMotor *)[robot.ports objectForKey:@"B"]).power = (int)(theMotor1 * 100.0);
((CNXTMotor *)[robot.ports objectForKey:@"C"]).power = (int)(theMotor2 * 100.0);
</code></pre>

<p>The sample NXT project relies on my <a href="http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_743/Frameworks/ToxicWarped/">ToxicWarped</a> framework. ToxicWarped was originally created for my <a href="/">Geode</a> project and is designed to help write simple but flexible Object Oriented protocol stacks.</p>

<p>The NXT code is barely a day old, so it is very rough and ready but I&#8217;ll be tinkering with the NXT and SpaceNavigator code over the next few weeks (in my spare time) but if anyone has a use for the code and would like to contribute back that would be fantastic.</p>

<p>Update: Couldn&#8217;t stand awful <a href="http://www.youtube.com/watch?v=H4zct49Dv6Y">Youtube</a> image quality any longer. Videos are now on amazon s3.</p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/spacenavigatornxt/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
<enclosure url="http://s3.amazonaws.com/uploads.toxicsoftware.com/SpaceNavigatorNXT.mp4" length="2233920" type="audio/mp4" />
<enclosure url="http://s3.amazonaws.com/uploads.toxicsoftware.com/SpaceNavigatorNXT/SpaceNavigatorNXT.mov" length="296" type="video/quicktime" />
		</item>
		<item>
		<title>Tiilt!</title>
		<link>http://toxicsoftware.com/tiilt/</link>
		<comments>http://toxicsoftware.com/tiilt/#comments</comments>
		<pubDate>Tue, 12 Dec 2006 04:04:42 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://toxicsoftware.com/blog/tiilt/</guid>
		<description><![CDATA[I don&#8217;t own a Wii. But as of today I do own a Wii Remote (and a nunchuk). And I&#8217;ve had a lot of fun using the Wiimote.framework to hack up this app: Tiilt.mp4 This screencast shows a simple Quartz &#8230; <a href="http://toxicsoftware.com/tiilt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t own a Wii. But as of today I do own a Wii Remote (and a nunchuk). And I&#8217;ve had a lot of fun using the <a href="http://sourceforge.net/projects/darwiin-remote/">Wiimote.framework</a> to hack up this app:</p>

<p><a href="http://toxicsoftware.com/wordpress/uploads/Tiilt.mp4">Tiilt.mp4</a></p>

<p>This screencast shows a simple Quartz Composer composition being manipulated by the Wii remote. If there is interest I&#8217;ll put the source online.</p>

<p>Source is now <a href="/tiilt-source-code/">online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/tiilt/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
<enclosure url="http://toxicsoftware.com/wordpress/uploads/Tiilt.mp4" length="2692856" type="video/mp4" />
<enclosure url="http://toxicsoftware.com/wordpress/uploads/Tiilt.mp4" length="2692856" type="video/mp4" />
<enclosure url="http://toxicsoftware.com/wordpress/uploads/Tiilt.mp4" length="2692856" type="video/mp4" />
<enclosure url="http://toxicsoftware.com/wordpress/uploads/Tiilt.mp4" length="2692856" type="video/mp4" />
		</item>
		<item>
		<title>Child&#8217;s Play Day</title>
		<link>http://toxicsoftware.com/childs-play-day/</link>
		<comments>http://toxicsoftware.com/childs-play-day/#comments</comments>
		<pubDate>Wed, 06 Dec 2006 14:49:32 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Headline]]></category>
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://toxicsoftware.com/blog/childs-play-day/</guid>
		<description><![CDATA[Mike Zornek, friend, fellow #macsb-er and Mac entrepreneur is organising Child&#8217;s Play Day. Ironcoder is hosting a page with information on the event: http://ironcoder.org/blog/childs-play-day/ (Thanks to Mere Mortal Software for the badge icon)]]></description>
			<content:encoded><![CDATA[<p><a href="http://ironcoder.org/blog/childs-play-day/"><img src="http://toxicsoftware.com/wordpress//uploads//ChildsPlayDayBadge.png" border="0" height="165" width="163" alt="ChildsPlayDayBadge.png" align="left" /></a><a href="http://mikezornek.com/2006/12/06/childs-play-day/">Mike Zornek</a>, friend, fellow #macsb-er and Mac entrepreneur is organising Child&#8217;s Play Day. Ironcoder is hosting a page with information on the event: <a href="http://ironcoder.org/blog/childs-play-day/">http://ironcoder.org/blog/childs-play-day/</a></p>

<p>(Thanks to <a href="http://www.mere-mortal-software.com/">Mere Mortal Software</a> for the badge icon)</p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/childs-play-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lineform 1.1</title>
		<link>http://toxicsoftware.com/lineform-11/</link>
		<comments>http://toxicsoftware.com/lineform-11/#comments</comments>
		<pubDate>Mon, 19 Jun 2006 14:11:41 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[CoreImage]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[PettySVG]]></category>
		<category><![CDATA[Quartz]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://toxicsoftware.com/blog/lineform-11/</guid>
		<description><![CDATA[I wrote PettySVG almost a year ago as a minimal SVG renderer framework for Mac OS X. As such it works relatively well, although bugs still remain and the set of SVG functionality supported is rather low (PettySVG might be &#8230; <a href="http://toxicsoftware.com/lineform-11/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wrote <a href="/pettysvg/">PettySVG</a> almost a year ago as a minimal SVG renderer framework for Mac OS X. As such it works relatively well, although bugs still remain and the set of SVG functionality supported is rather low (PettySVG might be better suited as a <a href="http://www.w3.org/TR/SVGMobile/">SVG Tiny or SVG Basic</a> renderer).</p>

<p>However today I received an e-mail from <a href="http://will.thimbleby.net/">Will Thimbleby</a>, who has just released version 1.1 of his drawing program, <a href="http://www.tribarsw.net/lineform/news.php">Lineform</a>. Lineform 1.1 adds, amongst other new features, SVG importing and exporting. This is fantastic news. I had looked at Lineform back when it was still a 1.0 application and found I couldn&#8217;t use it mainly because it lacked SVG support.</p>

<p>Version 1.1 also adds support for CoreImage filters. This is full fledged CoreImage support inside a mature and robust drawing tool. Lineform isn&#8217;t a <a href="http://www.stone.com/iMaginator/iMaginator.html">toy application</a> that simply lets you apply filters to image files. Lineform is quite possibly a &#8220;killer app&#8221; for CoreImage and with its addition Lineform could well become an <a href="http://www.adobe.com/products/illustrator/">Adobe Illustrator</a> competitor.</p>

<p>What is rewarding to me, is that Will used my PettySVG to help him develop the SVG import/export in Lineform:</p>

<blockquote>It was very helpful in getting an understanding for how NSXML worked and getting started on my own SVG code. [...] In any case you have my thanks for providing the code, it would have taken me much much longer to get to grips with NSXML without it.</blockquote>

<p>I find e-mails (or blog comments) such as this extremely gratifying.</p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/lineform-11/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Quickies</title>
		<link>http://toxicsoftware.com/quickies/</link>
		<comments>http://toxicsoftware.com/quickies/#comments</comments>
		<pubDate>Fri, 16 Jun 2006 00:42:07 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[Kip]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[NodeBox]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Red-Sweater]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[wxWidgets]]></category>

		<guid isPermaLink="false">http://toxicsoftware.com/blog/quickies/</guid>
		<description><![CDATA[Daniel Jalkut of Red-Sweater scores a hat-trick with three very interesting blog posts. Of special interest to me, is his posting about the redesign of his blog using NodeBox. I actually introduced Daniel to NodeBox, little did I know he&#8217;d &#8230; <a href="http://toxicsoftware.com/quickies/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li>Daniel Jalkut of <a href="http://www.red-sweater.com/blog">Red-Sweater</a> scores a hat-trick with three <a href="http://www.red-sweater.com/blog/146/blog-redesign">very</a> <a href="http://www.red-sweater.com/blog/145/another-ui-bites-the-dust">interesting</a> <a href="http://www.red-sweater.com/blog/144/take-the-money-and-run">blog</a> posts. Of special interest to me, is his posting about the <a href="http://www.red-sweater.com/blog/146/blog-redesign">redesign of his blog</a> using <a href="http://nodebox.net/">NodeBox</a>. I actually introduced Daniel to NodeBox, little did I know he&#8217;d do so much with it. Very cool.</li>

<li><a href="http://thekip.com/Site/about%20kip.html">The Kip</a> is a strange tool for archiving, indexing and displaying PDF files. The interface is quite distinctive and a mixture between iPhoto and <a href="http://del.icio.us">del.icio.us</a>. I really like the embedding scanner functionality. See Apple? Not every scanner application has to suck. The Kip is given a yellow card for uploading a bunch of PDFs to my .mac account without asking my permission and unencrypted to boot!</li>

<li><a href="http://toxicsoftware.com/wordpress//uploads//wxHelloWorld.zip">wxHelloWorld</a> is the canonical <a href="http://wxWidgets.org/">wxWidgets</a> &#8220;<a href="http://wxwidgets.org/docs/tutorials/hello.htm">Hello World</a>&#8221; application inside an XCode project. This version is built using the DarwinPorts wxWidgets installation. I had to struggle to work out how to build wxWidgets based applications inside XCode (although in retrospect it is quite simple). Hopefully this little project will save other people from some of the struggle I went through.</li>

<li><a href="http://atomicbird.com/">Tom Harrington</a> has announced <a href="http://ironcoder.org/blog/2006/06/14/sparkle-plus/">Sparkle Plus</a>. This is a fork of Andy Matuschak&rsquo;s <a href="http://andymatuschak.org/pages/sparkle">Sparkle</a> auto-update framework for Cocoa. SparklePlus is hosted on <a href="http://ironcoder.org">ironcoder.org</a> and becomes the first Mac OS X open source project hosted by Ironcoder.</li>

<li>An application I&#8217;ve been working on has finally left QA and has entered beta today. And there was much rejoicing (until the big reports start rolling in of course).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/quickies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Clippings to XBEL</title>
		<link>http://toxicsoftware.com/internet-clippings-to-xbel/</link>
		<comments>http://toxicsoftware.com/internet-clippings-to-xbel/#comments</comments>
		<pubDate>Sat, 03 Jun 2006 16:36:05 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[mdfind2]]></category>
		<category><![CDATA[Spotlight]]></category>
		<category><![CDATA[WebNoteHappy]]></category>
		<category><![CDATA[xbel]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://toxicsoftware.com/internet-clippings-to-xbel/</guid>
		<description><![CDATA[I have thousands of Mac OS X url clippings files on my mac. These little files are reported by the finder as &#8220;Web Internet Location&#8221; files. They&#8217;re sometimes known as &#8220;weblocs&#8221; (due to their file extension) and look like this: &#8230; <a href="http://toxicsoftware.com/internet-clippings-to-xbel/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have thousands of Mac OS X url clippings files on my mac. These little files are reported by the finder as &#8220;Web Internet Location&#8221; files. They&#8217;re sometimes known as &#8220;weblocs&#8221; (due to their file extension) and look like this: <img src="/uploads/Webloc.png" alt="Webloc.png" /></p>

<p>The reason I have so many of these things is that I switch browsers relatively frequently (bouncing between Safari and OmniWeb and occasionally Firefox) and I find weblocs are more permanent and just more convenient than browser bookmarks.</p>

<p>Mostly they&#8217;re &#8220;organised&#8221; into a single folder and I use Spotlight to find the ones I am interested in at that moment. However Spotlight doesn&#8217;t have a default webloc metadata importer, and this is where Toxic Software stands up to fill the gap. My <a href="/blog/spotlight-importer-collection/">Spotlight Importer Collection</a> package includes three importers, one of which as luck would have it is a webloc importer (in fact it also imports a plethora of other internet clipping files: afploc, fileloc, ftploc, inetloc, mailloc, urlloc and webloc).</p>

<p>After installing Toxic URL Importer and waiting for Spotlight to index your volumes each webloc (if you&#8217;re in a rush use mdimport to force Spotlight to index files immediately) you&#8217;ll be able to view a webloc&#8217;s URL directly in the finder: <img src="/uploads/WeblocInfo.png" alt="WeblocInfo.png" /></p>

<p>From Terminal.app you can use mdls to inspect the extra metadata added to the file by Toxic URL Importer:</p>

<pre><code>[schwa@cobweb] Desktop$ mdimport The\ XML\ Bookmark\ Exchange\ Language\ Resource\ Page.webloc 
[schwa@cobweb] Desktop$ mdls The\ XML\ Bookmark\ Exchange\ Language\ Resource\ Page.webloc 
The XML Bookmark Exchange Language Resource Page.webloc -------------
kMDItemContentType                    = "com.toxicsoftware.webloc"
kMDItemContentTypeTree                = (
    "com.toxicsoftware.webloc", 
    "com.toxicsoftware.urlloc", 
    "public.url", 
    "public.data", 
    "public.item"
)
kMDItemDisplayName                    = "The XML Bookmark Exchange Language Resource Page.webloc"
kMDItemID                             = 17168962
kMDItemKind                           = "Web Internet Location"
kMDItemURL                            = "http://pyxml.sourceforge.net/topics/xbel/"
org_spotlightdev_digest_sha1          = "794043e7673e525d654e7b8e4115636408182528"
org_spotlightdev_metadata_mdimporters = ("com.toxicsoftware.url-importer")
org_spotlightdev_metadata_url_host    = "pyxml.sourceforge.net"
org_spotlightdev_metadata_url_scheme  = "http"
org_spotlightdev_metadata_urls        = ("http://pyxml.sourceforge.net/topics/xbel/")
</code></pre>

<p>You can then search for weblocs by host or by scheme or a by any text in the url. Very handy:</p>

<p><img src="/uploads/Spotlight.png" alt="Spotlight.png" /> On the whole using weblocs and Spotlight together is a great solution. But I think I&#8217;ve found a better one. Luis de la Rosa&#8217;s <a href="http://www.happyapps.com/">WebNote Happy</a> is a fantastic application for managing bookmarks. It allows me to manage my bookmarks in a single window (like my folder of weblocs) and integrates really well with <a href="http://del.icio.us/">del.icio.us</a>. As fast as Spotlight searching is, WebNoteHappy beats it hands down with lightning fast searches.</p>

<p>Unfortunately WebNoteHappy doesn&#8217;t yet import or export webloc files (Luis is a very responsive developer and am sure will be making up for this minor deficiency in later releases). But fortunately WebNoteHappy does import <a href="http://pyxml.sourceforge.net/topics/xbel/">XBEL</a> files, which as I&#8217;ve already written about in my post about <a href="/blog/converting-omniweb-bookmarks-to-xbel-for-webnotehappy/">OmniWeb and XBEL</a> is a very handy intermediate file format.</p>

<p>As it turns out I have almost all the tools necessary to get my thousands of weblocs files into WebNoteHappy. I have <a href="/blog/mdfind2-updated/">mdfind2</a>, which like its little cousin <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/mdfind.1.html">mdfind</a> can perform Spotlight searches from the terminal. However mdfind2 can also export an XML file describing the metadata of the found items. All I needed to do was use mdfind2 to find all my webloc files and then transform the XML into XBEL via a custom written XSLT.</p>

<p>Here is the XSLT file &#8220;mdfind2_to_xbel.xsl&#8221;:</p>

<pre><code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;  
&lt;xsl:stylesheet version="1.0"  
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;  

    &lt;xsl:output method="xml" indent="yes" doctype-public="+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML" doctype-system="http://www.python.org/topics/xml/dtds/xbel-1.0.dtd"/&gt;  

    &lt;xsl:strip-space elements="*"/&gt;  

    &lt;xsl:template match="/"&gt;  
        &lt;xbel version="1.0"&gt;  
            &lt;xsl:apply-templates/&gt;  
        &lt;/xbel&gt;  
    &lt;/xsl:template&gt;  
    &lt;xsl:template match="item"&gt;  
        &lt;bookmark&gt;  
            &lt;xsl:attribute name="href"&gt;&lt;xsl:value-of select="attributes/attribute[@key='kMDItemURL']"/&gt;&lt;/xsl:attribute&gt;  
            &lt;xsl:attribute name="id"&gt;_&lt;xsl:value-of select="attributes/attribute[@key='kMDItemID']"/&gt;&lt;/xsl:attribute&gt;           &lt;xsl:attribute name="added"&gt;&lt;xsl:value-of select="attributes/attribute[@key='kMDItemContentCreationDate']"/&gt;&lt;/xsl:attribute&gt;  
            &lt;xsl:attribute name="modified"&gt;&lt;xsl:value-of select="attributes/attribute[@key='kMDItemContentModificationDate']"/&gt;&lt;/xsl:attribute&gt;  
            &lt;xsl:attribute name="visited"&gt;&lt;xsl:value-of select="attributes/attribute[@key='kMDItemLastUsedDate']"/&gt;&lt;/xsl:attribute&gt;  
            &lt;title&gt;&lt;xsl:value-of select="name"/&gt;&lt;/title&gt;  
        &lt;/bookmark&gt;  
    &lt;/xsl:template&gt;  
    &lt;xsl:template match="text()"&gt;&lt;/xsl:template&gt;  

&lt;/xsl:stylesheet&gt;
</code></pre>

<p>And here is the tiny snippet of shell script needed to tie it all together:</p>

<pre><code>mdfind2 --xml "kMDItemContentTypeTree == 'com.toxicsoftware.urlloc'" | \  
xsltproc mdfind2_to_xbel.xsl -  
</code></pre>

<p>And here is the final resulting XBEL file (limited to just a single entry) ready to be imported in WebNoteHappy:</p>

<pre><code>&lt;?xml version="1.0"?&gt;  
&lt;!DOCTYPE xbel PUBLIC "+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML" "http://www.python.org/topics/xml/dtds/xbel-1.0.dtd"&gt;  
&lt;xbel version="1.0"&gt;  
  &lt;bookmark href="http://www.txrollergirls.com/teams.htm" id="_9799996" added="2005-02-17 13:54:05 -0500" modified="2005-02-17 13:54:05 -0500" visited="2005-02-17 13:54:05 -0500"&gt;  
    &lt;title&gt;texas rollergirls TEAMS&lt;/title&gt;  
  &lt;/bookmark&gt;  
&lt;/xbel&gt;  
</code></pre>

<p>After running the script I now have all my weblocs safely imported into WebNoteHappy, with duplicates removed (in fact they were never imported in the first place). I can tag them and add them to del.ici.ous with just a click, and I can now import my current Safari bookmarks into the list and manage <em>all</em> my bookmarks in one place.</p>

<p>Using a little bit of custom coding (my URL Importer, mdfind2 and the XSLT) I was able to use the extensibility of Spotlight and WebNoteHappy to my advantage. A sure sign of how useful a piece of software is how easy it is to be extended by its end users.</p>

<p>Subversion Repository: <a href="http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_729/Projects/Misc/mdfind2_to_xbel">http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_729/Projects/Misc/mdfind2_to_xbel</a></p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/internet-clippings-to-xbel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shaping future Ironcoders</title>
		<link>http://toxicsoftware.com/shaping_future_ironcoders/</link>
		<comments>http://toxicsoftware.com/shaping_future_ironcoders/#comments</comments>
		<pubDate>Wed, 24 May 2006 01:10:30 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Anyone interested in shaping future Ironcoder competitions please visit and contribute to this thread on Ironcoder.org]]></description>
			<content:encoded><![CDATA[<p>Anyone interested in shaping future Ironcoder competitions please visit and contribute to <a href="http://ironcoder.org/blog/2006/05/23/ironcoder-future/">this thread on Ironcoder.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/shaping_future_ironcoders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stone Design ships Videator</title>
		<link>http://toxicsoftware.com/stone_design_ships_videator/</link>
		<comments>http://toxicsoftware.com/stone_design_ships_videator/#comments</comments>
		<pubDate>Wed, 24 May 2006 00:59:13 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Andrew Stone released Videator today. I haven&#8217;t really played with it much, but it is like Imaginator but for video. It is a lot like my Core Video Funhouse and Toxic Media projects. Of course my projects were just that &#8230; <a href="http://toxicsoftware.com/stone_design_ships_videator/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Andrew Stone released <a href="http://www.stone.com/Videator/Videator.html">Videator</a> today. I haven&#8217;t really played with it much, but it is like Imaginator but for video. It is a lot like my <a href="/blog/toxicmedia_sequencegrabber_stable/">Core Video Funhouse and Toxic Media</a> projects. Of course my projects were just that &#8211; projects, Andrew has made a fully fledged product. I&#8217;m actually surprised it took so long for someone to make an app like his, CoreImage and CoreVideo were released with Tiger and that has been shipping since April 05. Well kudos to Andrew for releasing Videator.</p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/stone_design_ships_videator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash weirdness on Mac OS X Intel boxes</title>
		<link>http://toxicsoftware.com/bash_weirdness_on_mac_os_x_intel_boxes1/</link>
		<comments>http://toxicsoftware.com/bash_weirdness_on_mac_os_x_intel_boxes1/#comments</comments>
		<pubDate>Mon, 15 May 2006 20:33:47 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://toxicsoftware.com/blog/bash_weirdness_on_mac_os_x_intel_boxes1/</guid>
		<description><![CDATA[Just a quickie (to prevent my blog from becoming a dinosaur and eventually fossil fuel&#8230;) If you&#8217;re running bash on an Intel Mac you might see some interesting behavior if you inspect the shell&#8217;s variables: [jwight@ratatosk] jwight$ set &#124; grep &#8230; <a href="http://toxicsoftware.com/bash_weirdness_on_mac_os_x_intel_boxes1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just a quickie (to prevent my blog from becoming a dinosaur and eventually fossil fuel&hellip;)</p>

<p>If you&#8217;re running bash on an Intel Mac you might see some interesting behavior if you inspect the shell&#8217;s variables:</p>

<p><pre>[jwight@ratatosk] jwight$ set | grep TYPE
HOSTTYPE=powerpc
MACHTYPE=powerpc-apple-darwin8.0
OSTYPE=darwin8.0</pre></p>

<p>PowerPC? Darwin 8.0? On my Quad G5 I get identical results. Checking the bash binary with the &#8216;strings&#8217; command seems to show these values are hardcoded:</p>

<p><pre>[jwight@ratatosk] jwight$ strings <code>which bash</code> | grep powerpc
powerpc-apple-darwin8.0
powerpc</pre></p>

<p>Looks like the OS version and the processor type is hardcoded into bash.</p>

<p>Oh and for the record this is what &#8216;uname&#8217; reports:</p>

<p><pre>[jwight@ratatosk] jwight$ uname -a
Darwin ratatosk 8.6.1 Darwin Kernel Version 8.6.1: Tue Mar  7 16:55:45 PST 2006; root:xnu-792.9.22.obj~1/RELEASE_I386 i386 i386</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/bash_weirdness_on_mac_os_x_intel_boxes1/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Iron Coder &#8211; Fin!</title>
		<link>http://toxicsoftware.com/iron_coder_fin/</link>
		<comments>http://toxicsoftware.com/iron_coder_fin/#comments</comments>
		<pubDate>Mon, 06 Mar 2006 02:43:32 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[The zeroth Iron Coder contest is now over. We had 10 (possibly 11) entries. So far all of them that we&#8217;ve seen like a lot of fun.]]></description>
			<content:encoded><![CDATA[<p>The zeroth Iron Coder contest is now over. We had 10 (possibly 11) entries. So far all of them that we&#8217;ve seen like a lot of fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/iron_coder_fin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
