Found out about this very interesting application (system enhancement?) called ThisService by WaffleSoftware.

Across all operating systems in modern computing there are both command line and GUI programs. While there are some limited ways of getting them to interact it’s usually a big tradeoff:

- Command Line apps (of the Unix lineage) are small and allow you to pipe inputs from one application to another and are typically very easy to write and extend.

- GUI programs are intuitive in the sense that you can see some buttons and click madly at them like a lemur on barbiturates until something happens. They’re discoverable.

What ThisService does is bridge the gap between the two via the Services menu found in OS X applications. You pick your scripting language of choice (AppleScript, Ruby, Perl, Python or PHP) and off you go.  The resources page has around 15 scripts that have been created so far, but this seems like such a fantastic idea that I can really see that number ballooning up.