/sw/bin/lynx -dump -width=160 -nolist http://news.bbc.co.uk/text_only.stm
Set this job to run every five minutes or so, and now I've got up-to-the-minute news headlines available just an Exposé command away.However, the dump file is still kinda large, and I'm not so urgently interested in what's happening in Wales as I am in what's happening on my own doorstep, so I created the following script:
#!/bin/bash
TMPFILE=/tmp/bbcheadlines.tmp
WEBSITE=http://news.bbc.co.uk/text_only.stm
CUTOFF="^[^w]*____"
/sw/bin/lynx -dump $WEBSITE >$TMPFILE
for param in $@
do
cat $TMPFILE | sed -n '/^ *'$param'/,/'$CUTOFF'/p' | sed '$d'
echo
done
This script grabs the $WEBSITE and writes it to a file (chosen by $TMPFILE). It then loops through my parameters, using sed to check for sections that begin with the parameter and end with $CUTOFF, writing the results to sysout. Saving this script as headlines.sh to my home directory, I needed only to put the following job into GeekTool:
/Users/myhomedir/headlines.sh SPORT EUROPE POLITICS
And voila! Customised news headlines on my desktop every five minutes. The script will obviously need some customising for your own favourite websites (anyone want to come up with a good one for MacOSXHints?), but I thought I'd just put the idea out there.

