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:
When enabled you should be able to see an entry in the application’s service menu:

