Delicious has a feature I like. When you bookmark something, you have the option of assigning a keyword, similar to the Firefox Smart Keywords feature. For example if I wanted to assign a shortcut for Google, I would bookmark the url http://www.google.com/search?&q=%s, and assign the letter g. In this instance I could go the the location bar, type g peanut and I would be taken to the search results page for that excellent nut.

The advantage the Delicious implementation has over browser bound versions, is that it provides an easy way to synchronize all of your bookmarks, including keywords, across multiple computers by installing the Delicious Bookmarks plugin.

I prefer Safari to Firefox which means I can’t use any of this in my favorite browser. Fortunately there’s Shaun Inman’s Shortwave. Shortwave provides the same URL keyword functionality of Delicious, but does it using a JavaScript bookmarklet. This means it will work on just about any browser, including Safari for the iPhone.

Shortwave stores all of your keywords in a text file on your own webserver, so it will work from any location. However, I wanted a way to import my existing Delicious keywords AND an easy way to add new keywords. Using the Delicious Feeds API I'm able to do this. The process is straightforward. I query my bookmarks looking for a specific tag, then write the results to a text file in the format that Shortwave expects.

First I tagged all of the bookmarks I wanted with shortcut then uploaded the following script to my webserver and set cron to run it automatically once a day to keep it up-to-date with Delicious. For any future keywords I just have to remember to add the extra tag and it will be updated in my shortwave file.

Here is the script: