Skip to content

Instantly share code, notes, and snippets.

@larryhynes
Created November 13, 2014 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larryhynes/ecf41dbb7c5e9c75588d to your computer and use it in GitHub Desktop.
Save larryhynes/ecf41dbb7c5e9c75588d to your computer and use it in GitHub Desktop.
#!/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