Add to Pinboard

In my previous post I suggested adapting my Python script for use in a Snow Leopard service. I decided to quickly whip this up myself. So here is a (Snow Leopard only!) service that can add URLs to pinboard.in. Unzip the file and copy it to ~/Library/Services then run this little shell script to set up a keychain item for your pinboard account:

#!/bin/sh

HOST=api.pinboard.in
read -p "Username: " USERNAME
read -p "Password: " -s PASSWORD
security add-internet-password -U -r http -s "$HOST" -a "$USERNAME" -w "$PASSWORD"

And the script also uses the BeautifulSoup 3rd party python module to extract the title of the webpage you’re linking to. You’ll need to install beautiful soup:

sudo easy_install beautifulsoup

If you’ve correctly installed the service you can enable/disable it and assign it a keyboard shortcut from the Keyboard preference pane:

Screen shot 2009-12-17 at 10.09.36

When enabled you should be able to see an entry in the application’s service menu:

Screen shot 2009-12-17 at 10.03.06
This entry was posted in Default and tagged . Bookmark the permalink.

Comments are closed.