Skip to content

Instantly share code, notes, and snippets.

@mattn
Created June 25, 2009 16:50
Show Gist options
  • Save mattn/135979 to your computer and use it in GitHub Desktop.
Save mattn/135979 to your computer and use it in GitHub Desktop.
#!/bin/sh
USER=mattn
LAST=0
while true; do
CURRENT=`curl -s http://rpc.reader.livedoor.com/notify?user=$USER | sed 's/^|\([0-9]\+\)|.*/\1/'`
if [ $LAST -lt $CURRENT ]; then
notify-send "livedoor Reader Notifier" "$CURRENT 件の未読記事があります。"
fi
LAST=$CURRENT
sleep 180
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment