summaryrefslogtreecommitdiff
path: root/contrib/bookmark-delicious.sh
blob: 5b47b8e8c70299818aa2402f4d9a1602e3cfef8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# newsbeuter bookmarking plugin for del.icio.us
# (c) 2007 Andreas Krennmair
# documentation: http://del.icio.us/help/api/posts

username="your del.icio.us username here"
password="your del.icio.us password here"

url="$1"
title="$2"
desc="$3"

delicious_url="https://api.del.icio.us/v1/posts/add?url=${url}&description=${title}&extended=${desc}"

output=`wget --http-user=$username --http-passwd=$password -O - "$delicious_url" 2> /dev/null`

output=`echo $output | sed 's/^.*code="\([^"]*\)".*$/\1/'`

if [ "$output" != "done" ] ; then
  echo "$output"
fi