#!/bin/rc # Parse RSS feeds from Google Reader bundles into BULGE blog posts. # If a post with a matching already exists, no new post will # be created for that . Accordingly, the gr script may run # slowly for sites with a large number of existing posts. Tags will # be created from each . rfork en switch($1){ case architecture feed='http://pipes.yahoo.com/pipes/pipe.run?_id=6e361b590b57934fb1e7c4e29339d619&_render=rss' site=read.stanleylieber.com tags=(architecture) case comics feed='http://pipes.yahoo.com/pipes/pipe.run?_id=6bc617a6b20aafd526affafc9a28a5d5&_render=rss' site=read.stanleylieber.com tags=(comics) case friends feed='https://www.google.com/reader/bundle/user%2F08193524211692385241%2Fbundle%2Ffriends' site=read.stanleylieber.com tags=(friends) case tech feed='http://pipes.yahoo.com/pipes/pipe.run?_id=6dd49be6e34a6871db9bcfc74d4b36b1&_render=rss' site=read.stanleylieber.com tags=(tech) case * echo usage: `{basename $0} '[ ... ]' >[1=2] exit usage } file=/tmp/gr.$1 werc=/usr/sl/www/werc if(test -f /boot/factotum) cmd=hget if not cmd='curl -s' fn f{ du -a $* | sed 's/^.* //g' } fn get_feed{ $"cmd $feed >$file.work { echo ' ,s/\"/\"/g ,s/\"/\"/g ,s/\&/\&/g ,s/\&/\&/g ,s/\'/\''/g ,s/\,/,/g ,s/\-/-/g ,s/\./\./g ,s/\//\//g ,s/\:/:/g ,s/\;/;/g ,s/\<//g ,s/\>/>/g ,s/\_/_/g ,s/\|/\|/g ,/
/d /