2009-09-04 15:10:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# RSS Feed Display Script by Hellf[i]re v0.1
|
|
|
|
#
|
|
|
|
# This script is designed for most any RSS Feed. As some feeds may
|
|
|
|
# not be
|
|
|
|
# completely compliant, it may need a bit of tweaking
|
|
|
|
#
|
|
|
|
# This script depends on curl.
|
|
|
|
# Gentoo: emerge -av net-misc/curl
|
|
|
|
# Debian: apt-get install curl
|
|
|
|
# Homepage: http://curl.haxx.se/
|
|
|
|
#
|
|
|
|
# Usage:
|
|
|
|
# .conkyrc: ${execi [time] /path/to/script/conky-rss.sh}
|
|
|
|
#
|
2009-11-06 17:21:21 +00:00
|
|
|
# Applications needed:
|
|
|
|
# bash, cat, grep, sed, curl
|
|
|
|
#
|
2009-09-04 15:10:24 +00:00
|
|
|
# Usage Example
|
|
|
|
# ${execi 300 /home/youruser/scripts/conky-rss.sh}
|
|
|
|
|
|
|
|
#RSS Setup
|
|
|
|
URI=http://sourceforge.net/export/rss2_keepsake.php?group_id=145591 #URI of RSS Feed
|
|
|
|
FEEDFILE="/tmp/kicad-svn-`date +%y%m%d-%H%M%S`.rss"
|
|
|
|
URLFILE="/tmp/kicad-svn-`date +%y%m%d-%H%M%S`.url"
|
|
|
|
|
2009-11-06 17:21:21 +00:00
|
|
|
# Get feed and save
|
2009-09-04 15:10:24 +00:00
|
|
|
EXEC="/usr/bin/curl -s" #Path to curl
|
|
|
|
`$EXEC $URI &> $FEEDFILE`
|
|
|
|
|
2009-11-06 17:21:21 +00:00
|
|
|
# Get commit description
|
|
|
|
cat $FEEDFILE | \
|
|
|
|
grep title | \
|
|
|
|
sed -e 's/[ \t]*//' | \
|
|
|
|
sed -e '/activity/d' | \
|
|
|
|
sed -e '/artifact/d' | \
|
|
|
|
sed -e 's/<title>//' | \
|
|
|
|
sed -e 's/<\!\[CDATA\[//' | \
|
|
|
|
sed -e 's/\]\]>//' | \
|
|
|
|
sed -e 's/<\/title>//'
|
2009-09-04 15:10:24 +00:00
|
|
|
|
2009-11-06 17:21:21 +00:00
|
|
|
# Space between descriptions and messages
|
2009-09-04 15:10:24 +00:00
|
|
|
echo ""
|
|
|
|
|
2009-11-06 17:21:21 +00:00
|
|
|
# Get viewvc urls only
|
|
|
|
cat $FEEDFILE | \
|
|
|
|
grep link | \
|
|
|
|
sed -e '/tracker/d' | \
|
|
|
|
sed -e '/export/d' | \
|
|
|
|
sed -e 's/[ \t]*//' | \
|
|
|
|
sed -e 's/<link>//' | \
|
|
|
|
sed -e 's/<\/link>//' &> $URLFILE
|
2009-09-04 15:10:24 +00:00
|
|
|
|
2009-11-06 17:21:21 +00:00
|
|
|
# Get commit messages from urls
|
|
|
|
exec < $URLFILE
|
|
|
|
while read LINE
|
|
|
|
do
|
|
|
|
curl -s "$LINE" | \
|
|
|
|
grep vc_log | \
|
2010-01-09 17:54:39 +00:00
|
|
|
sed -e 's/<td><pre class=\"vc_log\">//' | \
|
|
|
|
sed -e 's/<\/pre><\/td>//' | \
|
|
|
|
sed -e '/<style/d'
|
2009-11-06 17:21:21 +00:00
|
|
|
done
|
2009-09-04 15:10:24 +00:00
|
|
|
|
2009-11-06 17:21:21 +00:00
|
|
|
rm /tmp/kicad-svn-*
|