annotate db/getremote-today @ 2:9da35e705144

Add includes so that it builds without warnings.
author Daniel O'Connor <darius@dons.net.au>
date Tue, 09 Feb 2010 13:48:52 +1030
parents 9dab44dcb331
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
1 #!/bin/sh
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
2 # $Id: getremote-today,v 1.4 2010/01/02 03:01:02 grog Exp $
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
3 # Get today's readings
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
4 # Wunderground
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
5 WEATHERDIR=/home/`whoami`/household/weather
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
6 STATIONS="IVICTORI86 IVICTORI94 IVICTORI102 IVICTORI115 IVICMTHE3 IVICREDA2"
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
7 PATH=$PATH:/home/grog/src/weather/WH-1080:/home/grog/src/weather/WH-1080/db:/usr/local/bin
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
8 DAY=`date +%d`
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
9 MONTH=`date +%m`
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
10 YEAR=`date +%Y`
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
11 for STATION in $STATIONS; do
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
12 DESTDIR=$WEATHERDIR/wunderground/$STATION
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
13 mkdir -p $DESTDIR
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
14 getwunderday $DAY $MONTH $YEAR $STATION $DESTDIR/$YEAR-$MONTH-$DAY
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
15 done
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
16 # BoM
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
17 # Ballarat airport
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
18 fetch -o - http://www.bom.gov.au/fwo/IDV60801/IDV60801.94852.axf | insertBoM | mysql weather
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
19 # Melbourne airport
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
20 fetch -o - http://www.bom.gov.au/fwo/IDV60801/IDV60801.94866.axf | insertBoM | mysql weather
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
21 # Sheoaks
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
22 fetch -o - http://www.bom.gov.au/fwo/IDV60901/IDV60901.94863.axf | insertBoM | mysql weather
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
23 mysql < /home/grog/src/weather/WH-1080/db/tidy-observations
9dab44dcb331 Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
24 /home/grog/src/weather/WH-1080/plots/doplots