#!/bin/sh export PATH="$PATH:/opt/local/bin" # generate RSS files from the URLs named in "scrape.hourly" # ./cheesegrater.pl `cat scrape.hourly` rss_dir=".rss/" # If there is a "pull.hourly" file, also download all of the RSS URLs # listed therein. # if [ -s pull.hourly ]; then for url in `cat pull.hourly` ; do file=`echo $url | sed -e 's@^http://@@' -e 's@[^-_a-zA-Z0-9]@_@g'` file=`echo "$file" | perl -pe \ 's/(_(xml|rss|rss20|200|feed|atom|format|output))+$//'` file="$rss_dir$file.rss" wget -O "$file" -q "$url" done fi # (You don't need this; pay no attention to the man behind the curtain.) (cd /Users/jwz/www; make -s dist-rss ) exit 0