Created
November 13, 2014 21:03
-
-
Save larryhynes/ecf41dbb7c5e9c75588d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# newsbeuter bookmarking plugin for pinboard | |
# shamelessly copied from the newsbeuter bookmarking plugin for del.icio.us written by | |
# (c) 2007 Andreas Krennmair | |
# documentation: https://pinboard.in/api | |
username="" | |
password="" | |
tag="via:newsbeuter" | |
toread="yes" | |
url="$1" | |
title="$2" | |
desc="$3" | |
pinboard_url="https://api.pinboard.in/v1/posts/add?url=${url}&description=${title}&extended=${desc}&tags=${tag}&toread=${toread}" | |
output=`wget --http-user=$username --http-passwd=$password -O - "$pinboard_url" 2> /dev/null` | |
output=`echo $output | sed 's/^.*code="\([^"]*\)".*$/\1/'` | |
if [ "$output" != "done" ] ; then | |
echo "$output" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment