Automatically Post Safari Tabs to Del.icio.us With “topost” Tag

I wrote a short AppleScript yesterday to allow you to automatically add the current tab in Safari to your bookmarks in Del.icio.us with a specified tag or tags. The default tag is “toPost.” Add the script into Quicksilver as a trigger and you’ve got an über convenient post later (or never) script.

Here is the script (or download it here):

-- To change the tags, edit text inside quotes below
-- Use spaces to seperate multiple tags (ex: "tagOne tagTwo")
set tags to "toPost"

-- build delicious URL for current tab in frontmost window of Safari
tell application "Safari"
    set u to (name of current tab of front window) & ¬
        "&url=" & (URL of current tab of front window) & ¬
        "&tags=" & tags
end tell

-- Add URL to Delicious
tell application "Safari"
    do JavaScript "javascript:void(open('https://api.del.icio.us/v1/posts/add?description=" & u & "','delicious','toolbar=no,width=150,height=100'));" in document 1
    delay 0.5
    close current tab of front window

end tell

This is basically a simple modification of the script written by Andrew Faden which does pretty much the same except from NetNewsWire instead of Safari. Be sure to check out his original script and also the much improved version submitted by Larry from http://scriptingforlawyers.com/.

An Even Better Open in Firefox

Yesterday I blogged about the nifty little Open in Firefox script that I made. As it turns out, there is an even better way to this, using some fancy Quicksilver magic.

By using Proxy Objects in Quicksilver, you can gain access to the Current Web Page object. After making sure that you have activated the Open URL With... action in the Quicksilver preferences you are free to specify Firefox (or another browser).

Current Web Page → Open URL With... → Firefox

Once you have this working, you can set it up as a custom trigger. I set mine to the F1 key. Even better, this trigger is much more extendable than the script. You might not necessarily always want to open a URL in Firefox. Say you want to open a page in Opera. Just create another trigger, but leave out the item in the third pane.

Current Web Page → Open URL With... → "Leave this blank"

Now when you use that trigger, activate it with a hotkey (I used F2) and type in the first few letters of the browser (or program) you want the URL to open in.

Essential software for Mac OS X

I’m well aware that there are hundreds of lists of essential software for OS X floating around out there. I thought I’d link to this list in particular, because I actually use much of the software listed on it.

I can’t stress enough how great both Quicksilver and TextMate are. They are simply irreplaceable. More importantly, I’m aware of no other software for Windows or Linux that come close to the functionality and ease of use as these two applications.



appointive
appointive
appointive
appointive