October 2005 Archives
October 05, 2005
Camino + Apple Script + Cocoalicious = Caminolicious
Disclaimer: I don’t think most of my friends are really going to understand this, but I’m putting this out there anyway…for google.
I recently discovered del.icio.us, which is a great bookmarking tool. While playing around with that, I found some of the various toys that go along with it. The coolest one being Cocoalicious.
So, what’s the quickest way to add links to either del.icio.us or Cocoalicious? Well, there are bookmarklet’s: add to del.icio.us, add to Cocoalicious. Very nice, except I don’t like showing the “bookmark bar” in my browser window (it just feels cleaner without it there). Besides, why should I have to click a mouse button? I want to do this straight from the keyboard. Making matters more complicated, my default browser is Camino.
My solution: write an applescript! Unfortunately, Camino’s applescript support is not very hot. Fortunately, I am…and after much fooling around I present:
tell application "Camino" set myURL to «class curl» of window 1 set myTitle to name of window 1 end tell
tell application "Cocoalicious"
make new post with properties {description:myTitle, url:myURL, tag string:"caminolicious"}
end tell
This script takes the webpage of front most window (or tab) from Camino, and inserts that page as a new post in Cocoalicious.
I saved this script in my ~/Library/Scripts folder, added it to my Quicksilver catalogue, and a gave it a trigger “⌥↑⌘D”. Now it’s as easy as touching the keyboard, and I’ve added a new bookmark.