#!/bin/rc
#
# Copy me if you can.
# by 20h
#

sec = 0
conf = ''

while(! ~ $#* 0) {
	switch($1) {
		case -s
			sec = $2
			shift
		case -c
			conv = $2
			shift
		case -*
			echo usage: [-s sec] [-c conv] host;
			exit 0
		case *
			host = $1
	}
	shift
}

fn getit {
	if(! ~ $conv '') {
		hget $1 | tcs -f $conv;
	}
	if not {
		hget $1;
	}
	if(! ~ $sec 0) {
		sleep $sec;
		getit $1;
	}
}

getit $host | rssread;
