Johnny's Software Saloon

Weblog where I discuss things that really interest me. Things like Java software development, Ruby, Ruby on Rails, Macintosh software, Cocoa, Eclipse IDE, OOP, content management, XML technologies, CSS and XSLT document styling, artificial intelligence, standard document formats, and cool non-computing technologies.

My Photo
Name:
Location: Germantown, Maryland, United States

I like writing software, listening to music (mostly country and rock but a little of everything), walking around outside, reading (when I have the time), relaxing in front of my TV watching my TiVo, playing with my cat, and riding around in my hybrid gas/electric car.

Thursday, February 02, 2006

Using mdfind2+XSLT to display Spotlight search results in NetNewsWire

Toxic Software's excellent Mac programmer has created a nice tool for doing a search using Spotlight - and getting the results in a nice repurposable XML format.


Then, to make it accessible from NetNewsWire, a friendly-yet-powerful RSS/Atom feed reader I own and like a lot, he wrote an XSLT script to convert search results from his XML format to standard Atom format.


Then, he provided a shell script that invokes the search and pipes it through the XSLT transformer using a standard XSLT transformer.


Toxic Software (Blog):
this little gem. mdfind2 is a replacement for Apple%u2019s mdfind command line tool. This version adds one feature that mdfind doesn%u2019t have, you can specify the --xml switch on the command-line to output the results (including full attribute values) in XML


This is great stuff. I honestly find it refreshing to see that the programs-as-components and filter-pipelines ideas that Unix promulgated in the 1970s and 1980s has not died or reached a plateau. It is still growing and becoming more powerful on platforms like Linux and now the Apple Macintosh.


Whereas in the 1980s, people would have been perfectly content with a text-based user interface for something like this, in 2006 bolting the search output to a GUI display is no problem.


Pipelines are one of my favorite architectural design patterns. Combined with layering, they are powerful tools for solving complex problems with solutions built out of simple components.


0 Comments:

Post a Comment

<< Home

Related pages & news