<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Will Norris &#187; quicksilver</title>
	<atom:link href="http://willnorris.com/tag/quicksilver/feed" rel="self" type="application/rss+xml" />
	<link>http://willnorris.com</link>
	<description>there&#039;s more to life than this</description>
	<lastBuildDate>Sun, 05 Feb 2012 17:41:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
		<item>
		<title>tr.im python script (for Mac)</title>
		<link>http://willnorris.com/2008/09/trim-python-script-for-mac</link>
		<comments>http://willnorris.com/2008/09/trim-python-script-for-mac#comments</comments>
		<pubDate>Thu, 18 Sep 2008 00:52:26 +0000</pubDate>
		<dc:creator>Will Norris</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[gtd]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[quicksilver]]></category>
		<category><![CDATA[tr.im]]></category>

		<guid isPermaLink="false">http://willnorris.com/?p=305</guid>
		<description><![CDATA[For a while I have been using a simple AppleScript script to convert URLs into shortened URLs. The flow goes something like: Initiate script from Quicksilver Grab URL from the front-most window in Safari Submit URL to URL shortening service (previously xrl.us, but more recently bit.ly) Copy shortened URL to system clipboard (for pasting into [...]]]></description>
			<content:encoded><![CDATA[<p>For a while I have been using a simple AppleScript script to convert URLs into shortened URLs.  The flow goes something like:</p>

<ul>
<li>Initiate script from <a href="http://www.blacktree.com/">Quicksilver</a></li>
<li>Grab URL from the front-most window in Safari</li>
<li>Submit URL to URL shortening service (previously <a href="http://xrl.us/">xrl.us</a>, but more recently <a href="http://bit.ly/">bit.ly</a>)</li>
<li>Copy shortened URL to system clipboard (for pasting into <a href="http://iconfactory.com/software/twitterrific">Twitterific</a>)</li>
<li>Notify of process completion via <a href="http://growl.info/">Growl</a></li>
</ul>

<p>I&#8217;ve tried a number of different workflows including bookmarklets and the like, but this one works best for me (read: I honestly don&#8217;t care what you think of this flow or what you do instead&#8230; this is what I prefer).</p>

<p>Recently I discovered a new URL shortening service, <a href="http://tr.im/">tr.im</a>, and decided to give them a try.  However, unlike most services, tr.im doesn&#8217;t simply return the shortened URL. Instead it returns either an XML or JSON structure that includes the shortened URL along with some other data.  Quickly realizing that AppleScript doesn&#8217;t handle JSON very well, I decided that this would be a good opportunity to start learning Python.  The result was the following Python script:</p>

<p><a href="http://willnorris.com/svn/homedir/packages/tools/local/bin/trimURL">http://willnorris.com/svn/homedir/packages/tools/local/bin/trimURL</a></p>

<p>It follows the same flow as mentioned above, making use of a couple of Python modules (which are required for running this script): <a href="http://pypi.python.org/pypi/simplejson">simplejson</a> and <a href="http://appscript.sourceforge.net/">appscript</a>.  Put this script in a directory that Quicksilver scans (I think the Terminal Quicksilver plugin is also required).  If you want to authenticate to tr.im, add your username and password to your <code>~/.netrc</code> file.  I also set the script&#8217;s file icon to be the <a href="http://willnorris.com/svn/homedir/packages/tools/local/bin/.trim.png">tr.im icon</a>, so it will be displayed in the Growl notification.</p>
]]></content:encoded>
			<wfw:commentRss>http://willnorris.com/2008/09/trim-python-script-for-mac/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lock Screen revisited</title>
		<link>http://willnorris.com/2005/07/lock-screen-revisited</link>
		<comments>http://willnorris.com/2005/07/lock-screen-revisited#comments</comments>
		<pubDate>Thu, 28 Jul 2005 21:30:10 +0000</pubDate>
		<dc:creator>Will Norris</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[quicksilver]]></category>

		<guid isPermaLink="false">http://willnorris.com/2005/07/lock-screen-revisited</guid>
		<description><![CDATA[So just a couple of days ago I talked about locking your screen with Quicksilver. Today I discovered that Quicksilver actually has a lock screen in the &#8220;Extra Scripts&#8221; plugin, but it&#8217;s not visible by default in Tiger (seems to work out of the box on Panther). The problem is with the file types filtering [...]]]></description>
			<content:encoded><![CDATA[<p>So just a couple of days ago I talked about <a href="http://willnorris.com/2005/07/lock-screen">locking your screen with Quicksilver</a>.  Today I discovered that Quicksilver actually has a lock screen in the &#8220;Extra Scripts&#8221; plugin, but it&#8217;s not visible by default in Tiger (seems to work out of the box on Panther).  The problem is with the file types filtering &#8212; it is setup to only look for .script, text files, and applescripts.  LockScreen is a &#8220;unix executable&#8221; and therefore isn&#8217;t included.  To make matters worse there doesn&#8217;t seem to be a way to add this file type to the Types list, so we need to simply have it include all files (not filtering any).</p>

<p>[Update: I discovered my previous solution didn&#8217;t persist between restarts of Quicksilver, so here is a working solution]
It&#8217;s pretty simple&#8230;</p>

<ul>
<li>First make sure you have the &#8220;Extra Scripts&#8221; plugin installed</li>
<li>open your Quicksilver Preferences and go to your catalog.  </li>
<li>Add a new &#8220;File &amp; Folder Scanner&#8221; and point it to <code>~/Library/Application Support/Quicksilver/PlugIns/Extra Scripts.qsplugin/Contents/Resources/ExtraScripts</code></li>
<li>Set &#8220;Include Contents: Folder Contents&#8221; and &#8220;Depth: infinite&#8221;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://willnorris.com/2005/07/lock-screen-revisited/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lock Screen</title>
		<link>http://willnorris.com/2005/07/lock-screen</link>
		<comments>http://willnorris.com/2005/07/lock-screen#comments</comments>
		<pubDate>Mon, 18 Jul 2005 17:07:21 +0000</pubDate>
		<dc:creator>Will Norris</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[growl]]></category>
		<category><![CDATA[locktight]]></category>
		<category><![CDATA[quicksilver]]></category>

		<guid isPermaLink="false">http://willnorris.com/2005/07/lock-screen</guid>
		<description><![CDATA[Yet another application (locktight) that I&#8217;ve replaced with Quicksilver&#8230; After reading the comments in this hint at macosxhints.com, I discovered this little bit of applescript. tell application "ScreenSaverEngine" to activate You&#8217;ll want to add this to a Quicksilver trigger so you can it from the keyboard (I use Cmd-Opt-Shift-L because that was the default in [...]]]></description>
			<content:encoded><![CDATA[<p>Yet another application (<a href="http://mac.pieters.cx/">locktight</a>) that I&#8217;ve replaced with <a href="http://quicksilver.blacktree.com/">Quicksilver</a>&#8230;</p>

<p>After reading the comments in <a href="http://www.macosxhints.com/article.php?story=20050706194219822">this hint</a> at macosxhints.com, I discovered this little bit of applescript.</p>

<pre><code>tell application "ScreenSaverEngine" to activate
</code></pre>

<p>You&#8217;ll want to add this to a Quicksilver trigger so you can it from the keyboard (I use Cmd-Opt-Shift-L because that was the default in locktight and I&#8217;m kinda used to it)</p>
]]></content:encoded>
			<wfw:commentRss>http://willnorris.com/2005/07/lock-screen/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>quicksilver and itunes</title>
		<link>http://willnorris.com/2005/06/quicksilver-and-itunes</link>
		<comments>http://willnorris.com/2005/06/quicksilver-and-itunes#comments</comments>
		<pubDate>Mon, 27 Jun 2005 17:26:01 +0000</pubDate>
		<dc:creator>Will Norris</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[quicksilver]]></category>

		<guid isPermaLink="false">http://willnorris.com/?p=43</guid>
		<description><![CDATA[I&#8217;m generally a big fan of the Unix axiom of applications doing one thing and doing it well, but when each of those applications is running all the time and takes up 20MB of active memory I tend to make an exception and Quicksilver is providing an excellent alternative to several smalls apps I use. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m generally a big fan of the Unix axiom of applications doing one thing and doing it well, but when each of those applications is running all the time and takes up 20MB of active memory I tend to make an exception and <a href="http://quicksilver.blacktree.com">Quicksilver</a> is providing an excellent alternative to several smalls apps I use.</p>

<p>I originally used <a href="http://www.ithinksw.com/products/menutunes/">MenuTunes</a>, and most recently <a href="http://synergy.wincent.com/">Synergy</a> to provide global &#8220;hotkeys&#8221; to do some simple things like play/pause iTunes, skip to next or previous track, and display some information about the current track.  Quicksilver&#8217;s triggers are ideal for this &#8212; it allows you to create keyboard shortcuts to perform any Quicksilver action.  This let me setup keys for play/pause and next/previous track.</p>

<p>Additionally I setup the iTunes Quicksilver plugin to display track notifications and to send those notifications to <a href="http://www.growl.info/">Growl</a>, however the plugin only displays notifications when something happens like the track changes.  I want to be able to display track info at any time so I whipped up this simple Applescript, saved it to my scripts folder, and assigned it to a Quicksilver trigger.  This will display the exact same as the built-in iTunes notification in Quicksilver with the addition of track time, current position, and ratings stars.  It&#8217;s a very simple matter of displaying more or less info for the track.</p>

<p><img src="http://willnorris.com/wordpress-content/uploads/2005/06/itunes-notification.jpeg" alt="iTunes notification" /></p>

<p>[updated 09 Aug 2005 to work when no artwork is present]</p>

<pre><code>tell application "iTunes"
  set currentTrack to current track
  set theArtworks to artworks of currentTrack

  if ((count of theArtworks) &gt; 0) then
    set theArtworkData to data of item 1 of theArtworks
  else
    set theArtworkData to null
  end if

  set theArtist to artist of currentTrack
  set theAlbum to album of currentTrack
  set theTime to time of currentTrack

  -- set the rating stars
  set theStars to ""
  set theRating to rating of currentTrack
  set bStar to Â«data utxt2605Â» as Unicode text
  set wStar to Â«data utxt2606Â» as Unicode text
  repeat 5 times
    if (theRating &gt; 0) then
      set theStars to theStars &amp; bStar
      set theRating to (theRating - 20)
    else
      set theStars to theStars &amp; wStar
    end if
  end repeat

  -- get player position and format to MM:SS
  set positionMinutes to (player position div 60)
  if (positionMinutes &lt; 10) then Â¬
    set positionMinutes to "0" &amp; positionMinutes
  set positionSeconds to (player position mod 60)
  if (positionSeconds &lt; 10) then Â¬
    set positionSeconds to "0" &amp; positionSeconds
  set thePosition to positionMinutes &amp; ":" &amp; positionSeconds
end tell

tell application "GrowlHelperApp"
  if (theArtworkData is not null) then
    notify with name Â¬
      "iTunes Notification" title Â¬
      name of currentTrack description Â¬
      theArtist &amp; return &amp; theAlbum &amp; return &amp; thePosition Â¬
        &amp; " / " &amp; theTime &amp; "     " &amp; theStars application name Â¬
      "Quicksilver" pictImage theArtworkData
  else
    notify with name Â¬
      "iTunes Notification" title Â¬
      name of currentTrack description Â¬
      theArtist &amp; return &amp; theAlbum &amp; return &amp; thePosition Â¬
      &amp; " / " &amp; theTime &amp; "     " &amp; theStars application name Â¬
      "Quicksilver" icon of application "iTunes"
  end if
end tell
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://willnorris.com/2005/06/quicksilver-and-itunes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

