diff db/getwunderday @ 0:9dab44dcb331

Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
author Daniel O'Connor <darius@dons.net.au>
date Tue, 09 Feb 2010 13:44:25 +1030
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/db/getwunderday	Tue Feb 09 13:44:25 2010 +1030
@@ -0,0 +1,16 @@
+#!/bin/sh
+# $Id: getwunderday,v 1.1 2009/12/08 23:32:32 grog Exp $
+#
+# Get CSV data from Wunderground.
+#
+if [ $# -ne 5 ]; then
+ echo Usage:  $0 day month year station dest
+ exit 1
+fi
+DAY=$1
+MONTH=$2
+YEAR=$3
+STATION=$4
+DEST=$5
+fetch -o $DEST http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=$STATION\&month=$MONTH\&day=$DAY\&year=$YEAR\&format=1
+insertwunderground < $DEST $STATION | mysql weather