Main Page/Research/MSB/Scripts/msb.get.data.pl
From phurvitz
< Main Page | Research | MSB | Scripts
Revision as of 20:39, 11 October 2007 by Phil Hurvitz (talk | contribs) (User:Phil Hurvitz/Projects/In process/MSB/Data processing/data processing scripts/msb.get.data.R moved to User:Phil Hurvitz/Projects/In process/MSB/Data processing/data processing scripts/msb.get.data.pl)
msb.get.data.pl
#! /usr/bin/perl -w # gets the MSB data # URL of the form # http://www.cs.washington.edu/research/projects/ubicomp3/phurvitz/gis.washington.edu/phurvitz/msb/data/pmh07/part_00 # first arg should be the URL if ($#ARGV != 0) { print "Usage: $0 <URL to download>\ne.g., $0 pmh07\n"; exit; } # change to the correct dir if ("$^O" eq "linux" ) { chdir "/d1/phurvitz/public_html/msb/processed_data/processed"; $pwd = `pwd`; } elsif ("$^O" eq "MSWin32") { chdir "/users/phurvitz/htdocs/phurvitz/msb/processed_data"; $pwd = `pwd`; } # download system "wget -np -r -nH -N --accept=png,csv,kml --reject=html,htm,txt \ --http-user=phurvitz --http-passwd=phurvitz \ http://www.cs.washington.edu/research/projects/ubicomp3/phurvitz/gis.washington.edu/phurvitz/msb/data/$ARGV[0]"; #system "wget -np -r -nH -N --accept=png,csv,kml --reject=html,htm,txt \ --http-user=phurvitz --http-passwd=phurvitz \ http://www.cs.washington.edu/research/projects/ubicomp3/phurvitz/gis.washington.edu/phurvitz/msb/data/$ARGV[0]/part_00"; # report print "\nsee http://gis.washington.edu/phurvitz/msb/processed_data/downloaded_data/$ARGV[0]\n";