#!/bin/bash
# Written by Peter Garceau
# Based on the RDF Feed Display Script by Hellf[i]re v0.1
#
# This script is designed for the Arch Linux News Feed.
#
# This script depends on curl.
# pacman -Sy curl
#
# Usage:
# .conkyrc: ${execi [time] /path/to/script/conky-rss.sh}
#
# Usage Example
# ${execi 300 /home/youruser/scripts/conky-rss.sh}
#RSS Setup
URI=http://www.archlinux.org/feeds/packages/ #URI of RSS Feed
LINES=10 #Number of headlines
#Environment Setup
EXEC="/usr/bin/curl -s" #Path to curl
#Work Start
$EXEC $URI |\
sed -e 's/></>\n</g' |\
sed -n '/<title>/p' |\
sed -e 's/<title>//' |\
sed -e 's/^/ /' |\
head -n $(($LINES + 1)) |\
tail -n $LINES