Post to del.icio.us from Safari

Based on a combination of Safari, Applescript, Pukka, and Quicksilver, several mac power-users have found acceptable solutions for posting to del.icio.us from Safari. However, I have a slightly different workflow for del.icio.us than Splee, so I customized it a bit. I have a few requirements for an acceptable del.icio.us workflow:

  • Immediate access to tag entry with autocomplete.
  • Immediately successive chance to fill in a description. I have found that forcing myself to type descriptions of every bookmark has assisted dramatically in finding relevant links quickly in the future.

With the workflow described below, I can hit CMD-D in Safari, immediately start typing my tags (assisted by autocomplete), tab to the description, type my blurb, and hit CMD-enter to post. Smooth as silk for my needs.

First, create the following script ("Pukka Post to Delicious.scpt" for me) in a location that Quicksilver will index (I use a directory named "Scripts" in my user's "Documents" directory): set account to "myaccount"

tell application "Safari" set myURL to URL of document 1 set myTitle to do JavaScript "document.title" in document 1 set myReferrer to do JavaScript "document.referrer" in document 1 set mySelection to do JavaScript "window.getSelection() + ''" in document 1 end tell

tell application "Pukka" activate

tell application "System Events"
    tell process "Pukka"
        keystroke "n" using {command down}
        delay 0.1
        tell application "Pukka" to activate
    end tell
end tell

end tell

tell application "Pukka" reset set post url to myURL set post title to myTitle if (length of mySelection is not 0) and (length of myReferrer is not 0) then set post description to mySelection & " (linked via " & myReferrer & ")" else if (length of mySelection is not 0) then set post description to mySelection end if set selected account to account end tell

tell application "Pukka" activate

tell application "System Events"
    tell process "Pukka"
        tell application "Pukka" to activate
        keystroke tab
        keystroke tab
    end tell
end tell

end tell

Second, create a trigger in quicksilver that simplies calls this script directly, set the trigger to CMD-D, and set the scope to Safari.

Third, have Pukka running all the time, and strongly consider registering it.

This setup is the first one I've found that rivals the standard del.icio.us Firefox extension for convenience and features. I preserved the logic from Splee's script that fills in the selected text (with referrer info) if you have actually selected text, but lets you fill in your own description if you have not selected text.

Comments

Services Delicious is a

Services Delicious is a client for the REST-based web service of del.icio.us. It allows you to select, add and delete your bookmarks from any PHP script. You do not need to worry about the XML that is sent or how to build the REST urls.

70-680 - 70-685 - 83-640

wigs

It is told that in medieval England, full lace wigsthere was a tradition to pile small buns in front of the marriage couple. full lace wigsThe pile was stacked high enough so that the bride and groom could barely see one another. If the bride and groom managed to share a kiss over the stack, lace wigsit was supposed to symbolize a lifetime of prosperity. However, during the reign of King Charles II, a French chef paid a visit to London and he observed the cake piling ritual. The chef found this ritual inconvenient and he decided that he would use short lengths of broom sticks to separate the layers.wedding invitations The cakes had to be prepared in advance and due to the lack or refrigeration, they had to be frosted in lard to stop them from drying out. Before the wedding ceremony, the lard was scraped from the cake, however, cheap wedding dressesin later years to improve the taste of the lard, sugar was added and the lard was left on the cake as a form of decorative icing. These cakes must have resembled the more familiar wedding cakes which we are used to seeing today.

tiffany bracelets

Golden, colorful, glittering, dazzling, good-looking, beautiful, beautiful.tiffany bracelets Been seeing my jewelry, go back to 100%

Sure, I'm always glad for

Sure, I'm always glad for someone to quote me. A link back to the original article with the quote is nice.

replica handbags

asdasd

Thanks!

Great article!Thanks!It's worthy to read carefully.

rweurwu

Submitted by adam on Fri, 2006-11-24 01:24.

Thanks! I’ve made the correction.

a d a m

small modification..

using the latest version of pukka (1.6.7), when you use the script, your account isn't automatically selected. luckily, there is a keyboard shortcut to select your del.icio.us account in pukka, so you can add, in the last set of a statements, the starred line below, and everything works.

awesome script you have here!
--
tell application "System Events"
tell process "Pukka"
tell application "Pukka" to activate
** keystroke "]" using command down**
keystroke tab
keystroke tab
end tell
end tell
end tell
--

DeliciousSafari lets you easily post to del.icio.us from Safari

I've written a plug-in for Safari that will do this. You can check it out at http://delicioussafari.com.

Cool

Cool, I will check it out.

a d a m

Syntax error

When I try to complile, I get a syntax error:

"Expected expression but found unknown token."

Any suggestino

Did you paste it directly

Did you paste it directly into Script Editor? I've had problems before when I forgot and pasted into another editor and saved that way.

Typo

It's "Splee" ;) Glad you found my script useful, and I like your additions.

Oops...

Thanks! I've made the correction.

a d a m

Post new comment

The content of this field is kept private and will not be shown publicly.