diff db/getremote-today @ 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/getremote-today	Tue Feb 09 13:44:25 2010 +1030
@@ -0,0 +1,24 @@
+#!/bin/sh
+# $Id: getremote-today,v 1.4 2010/01/02 03:01:02 grog Exp $
+# Get today's readings
+# Wunderground
+WEATHERDIR=/home/`whoami`/household/weather
+STATIONS="IVICTORI86 IVICTORI94 IVICTORI102 IVICTORI115 IVICMTHE3 IVICREDA2"
+PATH=$PATH:/home/grog/src/weather/WH-1080:/home/grog/src/weather/WH-1080/db:/usr/local/bin
+DAY=`date +%d`
+MONTH=`date +%m`
+YEAR=`date +%Y`
+for STATION in $STATIONS; do 
+  DESTDIR=$WEATHERDIR/wunderground/$STATION
+  mkdir -p $DESTDIR
+  getwunderday $DAY $MONTH $YEAR $STATION $DESTDIR/$YEAR-$MONTH-$DAY
+done
+# BoM
+# Ballarat airport
+fetch -o - http://www.bom.gov.au/fwo/IDV60801/IDV60801.94852.axf | insertBoM | mysql weather
+# Melbourne airport
+fetch -o - http://www.bom.gov.au/fwo/IDV60801/IDV60801.94866.axf | insertBoM | mysql weather
+# Sheoaks
+fetch -o - http://www.bom.gov.au/fwo/IDV60901/IDV60901.94863.axf | insertBoM | mysql weather
+mysql < /home/grog/src/weather/WH-1080/db/tidy-observations
+/home/grog/src/weather/WH-1080/plots/doplots