# HG changeset patch # User paulo@thepaulopc # Date 1289376353 28800 # Node ID 3551de5fef13af5cd95cb53a5414c09020d06067 # Parent 5a0c2ee709f806f42c1b7da7d37368308ae4c5f6 update FEEDS; parallelize feed processing diff -r 5a0c2ee709f8 -r 3551de5fef13 myrss/FEEDS --- a/myrss/FEEDS Wed Sep 29 22:04:46 2010 -0700 +++ b/myrss/FEEDS Wed Nov 10 00:05:53 2010 -0800 @@ -19,9 +19,12 @@ http://feeds.gawker.com/jalopnik/full http://feeds.gawker.com/gawker/full http://www.xkcd.com/rss.xml +http://thebigcaption.com/rss http://feeds.kottke.org/main http://feeds.boingboing.net/boingboing/iBag http://feeds.feedburner.com/codinghorror +http://syndication.thedailywtf.com/TheDailyWtf http://www.rottentomatoes.com/syndication/rss/in_theaters.xml http://sandiego.craigslist.org/search/cta?query=scion+xb&catAbb=cto&srchType=T&minAsk=&maxAsk=&format=rss http://sandiego.craigslist.org/search/cta?query=scion+xb&catAbb=cta&srchType=T&minAsk=&maxAsk=&format=rss +http://sandiego.craigslist.org/search/?areaID=8&subAreaID=&query=unicycle&catAbb=sss&format=rss diff -r 5a0c2ee709f8 -r 3551de5fef13 myrss/myrss_update.sh --- a/myrss/myrss_update.sh Wed Sep 29 22:04:46 2010 -0700 +++ b/myrss/myrss_update.sh Wed Nov 10 00:05:53 2010 -0800 @@ -1,6 +1,22 @@ #!/bin/sh TIMESTAMP=$(date '+%FT%T%:z') +TIMEOUT=60 + +i=0 +for URL in $(grep -v '^#' FEEDS) +do + FN=$((i++)).feedtmp + wget -q -T ${TIMEOUT} -U '' -O - ${URL} | xsltproc step1.xsl - | xsltproc step2.xsl - > ${FN} & +done + +wait + +BODY='' +for j in $(seq 0 ${i}) +do + BODY=${BODY}$(cat ${j}.feedtmp) +done echo '' echo '' @@ -11,10 +27,9 @@ echo '' echo "

${TIMESTAMP}

" -for URL in $(grep -v '^#' FEEDS) -do - wget -q -U '' -O - ${URL} | xsltproc step1.xsl - | xsltproc step2.xsl - -done +echo ${BODY} echo '' echo '' + +rm *.feedtmp