add feed to portal, fix for fnord
This commit is contained in:
parent
64c87c3300
commit
3e5df356ea
Binary file not shown.
After Width: | Height: | Size: 158 KiB |
18
portal.cgi
18
portal.cgi
|
@ -1,5 +1,11 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
case "$HTTP_USER_AGENT" in
|
||||||
|
*MIDP*)
|
||||||
|
TINY=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
weather () {
|
weather () {
|
||||||
curl -s 'http://rss.wunderground.com/auto/rss_full/NM/Los_Alamos.xml?units=metric' | \
|
curl -s 'http://rss.wunderground.com/auto/rss_full/NM/Los_Alamos.xml?units=metric' | \
|
||||||
awk -F ' [-:] ' '
|
awk -F ' [-:] ' '
|
||||||
|
@ -21,9 +27,7 @@ weather () {
|
||||||
section () {
|
section () {
|
||||||
echo "<h2><a href=\"$2\">$1</a></h2>"
|
echo "<h2><a href=\"$2\">$1</a></h2>"
|
||||||
echo "<ul>"
|
echo "<ul>"
|
||||||
if [ -n "$HTTP_X_WAP_PROFILE" ]; then
|
[ "$TINY" ] && pfx="http://news.google.com/gwt/x?u="
|
||||||
pfx="http://news.google.com/gwt/x?u="
|
|
||||||
fi
|
|
||||||
curl -s "$3" | \
|
curl -s "$3" | \
|
||||||
awk -F '>' -v RS='<' -v m=${4:-5} -v pfx="$pfx" '
|
awk -F '>' -v RS='<' -v m=${4:-5} -v pfx="$pfx" '
|
||||||
(/^item[> ]/) {
|
(/^item[> ]/) {
|
||||||
|
@ -72,14 +76,16 @@ h2 {
|
||||||
<body>
|
<body>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ -z "$HTTP_X_WAP_PROFILE" ]; then
|
[ "$TINY" ] || \
|
||||||
echo '<iframe class="calendar" src="https://www.google.com/calendar/embed?showTitle=0&showDate=0&showPrint=0&showCalendars=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=umtjjc250gp0m5gm8h3dn13hcc%40group.calendar.google.com&color=%236E6E41&src=dartcatcher%40gmail.com&color=%23125A12&src=ameigh%40gmail.com&color=%2329527A&src=laderbydames%40gmail.com&color=%2323164E&src=en.usa%23holiday%40group.v.calendar.google.com&color=%238D6F47&ctz=America%2FDenver"></iframe>'
|
echo '<iframe class="calendar" src="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=umtjjc250gp0m5gm8h3dn13hcc%40group.calendar.google.com&color=%236E6E41&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"></iframe>'
|
||||||
fi
|
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
<form action="http://www.google.com/"><input name="q" size="12"><input type="submit" value="G"></form>
|
<form action="http://www.google.com/"><input name="q" size="12"><input type="submit" value="G"></form>
|
||||||
EOF
|
EOF
|
||||||
weather
|
weather
|
||||||
|
section LA \
|
||||||
|
'http://ladailypost.com/' \
|
||||||
|
'http://ladailypost.com/feed/'
|
||||||
section "CSM" \
|
section "CSM" \
|
||||||
'http://www.csmonitor.com/textedition' \
|
'http://www.csmonitor.com/textedition' \
|
||||||
'http://rss.csmonitor.com/feeds/csm'
|
'http://rss.csmonitor.com/feeds/csm'
|
||||||
|
|
Loading…
Reference in New Issue