Mercurial > ~darius > hgwebdir.cgi > wh1080
view db/getwunderday @ 7:9a14029b3782
- Wait longer (100msec) for a read, and reduce the number of retries to match.
- Print out if we read OK after more than 1 attempt for diagnostic purposes.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Thu, 11 Feb 2010 12:47:59 +1030 |
parents | 9dab44dcb331 |
children |
line wrap: on
line source
#!/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