From d14ada544d63a40560f8cb1d682fd4485b8030c4 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Fri, 23 Dec 2011 01:10:04 -0700 Subject: [PATCH] add portal cgi --- portal.cgi | 89 +++++++++++++++++++++++++++++++++++++++++++++++++ toys/timer.html | 6 +--- 2 files changed, 90 insertions(+), 5 deletions(-) create mode 100755 portal.cgi diff --git a/portal.cgi b/portal.cgi new file mode 100755 index 0000000..3f03edd --- /dev/null +++ b/portal.cgi @@ -0,0 +1,89 @@ +#! /bin/sh + +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 "" + echo "

more...

" +} + +cat < + + + Houyhnhnm + + + +
+EOF +weather +section "Top Stories" \ + 'http://news.google.com/m?pz=1&cf=all&ned=us&hl=en' \ + 'http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&gwt=on&output=rss' +section "World News" \ + 'http://news.google.com/m?pz=1&cf=all&ned=us&hl=en&topic=w' \ + 'http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&topic=w&output=rss' +section "CSM" \ + 'http://www.csmonitor.com/textedition' \ + 'http://rss.csmonitor.com/feeds/csm' +section NPR \ + 'http://thin.npr.org/t.php?tid=1001' \ + 'http://www.npr.org/rss/rss.php?id=1001' +section "Ars Technica" \ + 'http://m.arstechnica.com/' \ + 'http://feeds.arstechnica.com/arstechnica/index?format=xml' +cat < + +EOF diff --git a/toys/timer.html b/toys/timer.html index 710adbe..b521cc9 100644 --- a/toys/timer.html +++ b/toys/timer.html @@ -1,7 +1,7 @@ - + Presentation Timer @@ -17,10 +17,6 @@ }