#! /bin/sh case "$HTTP_USER_AGENT" in *MIDP*) TINY=1 NOCAL=1 ;; *Mobile*) NOCAL=1 ;; esac weather () { curl -s 'http://rss.wunderground.com/auto/rss_full/NM/Los_Alamos.xml?units=metric' | \ awk -F ' [-:] ' ' (/Current Conditions/) { print "

" $2 "

"; } (c == 2) { print "

" $0 "

"; exit; } (/CDATA/) { c++; }' } section () { echo "

$1

" echo "" } cat < Houyhnhnm EOF if ! [ "$NOCAL" ]; then printf '\n' \ 'https://www.google.com/calendar/embed?title=Calendar&showTitle=0&showDate=0&showPrint=0&showTz=0&mode=AGENDA&height=350&wkst=1&bgcolor=%23FFFFFF&src=2cdrf19kah6jkonhom8evck38c%40group.calendar.google.com&color=%23333333&src=s531giqfiotabht4qrn59tjf9g%40group.calendar.google.com&color=%231B887A&src=dartcatcher%40gmail.com&color=%23125A12&src=laderbydames%40gmail.com&color=%2323164E&src=uulosalamos.org_gu7e0s8dsh1tn8iktt468tk95k%40group.calendar.google.com&color=%232F6309&src=en.usa%23holiday%40group.v.calendar.google.com&color=%238D6F47&ctz=America%2FDenver' fi if [ "$TINY" ]; then echo '
' echo '
' fi weather section LA \ 'http://ladailypost.com/' \ 'http://www.ladailypost.com/rss.xml' section "Ars Technica" \ 'http://m.arstechnica.com/' \ 'http://feeds.arstechnica.com/arstechnica/index?format=xml' section NPR \ 'http://thin.npr.org/t.php?tid=1001' \ 'http://www.npr.org/rss/rss.php?id=1001' section CSM \ 'http://www.csmonitor.com/textedition' \ 'http://rss.csmonitor.com/feeds/csm' section AJE \ 'http://m.aljazeera.net' \ 'http://www.aljazeera.com/Services/Rss/?PostingId=2007731105943979989' cat < EOF