1) Open up Leafpad and paste in this code:
Code: Select all
# 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}
#
# Usage Example
# ${execi 300 /home/youruser/scripts/conky-rss.sh}
#RSS Setup
URI=http://rss.cnn.com/rss/cnn_topstories.rss #URI of RSS Feed
LINES=1 #Number of headlines
#Environment Setup
EXEC="/usr/bin/curl -s" #Path to curl
#Work Start
$EXEC $URI | grep title |\
sed -e :a -e 's/<[^>]*>//g;/</N' |\
sed -e 's/[ \t]*//' |\
sed -e 's/\(.*\)/ \1/' |\
sed -e 's/\.//' |\
sed -e 's/\"//' |\
sed -e 's/\"//' |\
head -n $(($LINES + 2)) |\
tail -n $(($LINES))
2) save as conky-rss_CNN.sh in /home/jb/scripts , then right-click --> Permissions and click Yes to make it executable
3) paste the following at the bottom of conkyrc (colors personal):
Code: Select all
${color white}News:
${color green}${execi 300 /home/jb/scripts/conky-rss_CNN.sh}
4) click Menu --> WM's --> Conky on/off twice to activate new config
NOTES: 1) You can add other feeds by creating additional copies of the script and changing the URL and the name. 2) Not all feeds work for me, especially those ending in xml such as from the BBC--maybe somebody can solve that?