[SimBot-commits] CVS: simbot/tools create_wx_station_db.pl,1.5,1.6
Status: Abandoned
Brought to you by:
kstange
|
From: Pete P. <fou...@us...> - 2005-06-21 19:34:07
|
Update of /cvsroot/simbot/simbot/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17851/tools Modified Files: create_wx_station_db.pl Log Message: Remove unwanted spaces in the weather station names, and correct spelling on a comment. Index: create_wx_station_db.pl =================================================================== RCS file: /cvsroot/simbot/simbot/tools/create_wx_station_db.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- create_wx_station_db.pl 14 May 2005 00:28:26 -0000 1.5 +++ create_wx_station_db.pl 21 Jun 2005 19:33:58 -0000 1.6 @@ -87,6 +87,9 @@ if($response->is_error) { ($cur_line, $content) = split(/\n/, $content, 2); my ($station, undef, undef, $name, $state, $country, undef, $lat_dms, $long_dms, undef, undef, $rbsn) = split(/;/, $cur_line); + $name =~ s/\s+$//; + $name =~ s/^\s+//; + my ($long_deg); my ($lat_deg, $minutes, $seconds, $dir) = $lat_dms =~ m/(\d+)-(\d+)(?:-(\d+))?([NS])/; @@ -123,7 +126,7 @@ if($response->is_error) { my $line_count = 0; print "Done!\nReading it in"; - # Create a temprary table as a list of candidates for deletion + # Create a temporary table as a list of candidates for deletion $dbh->do(<<EOT); CREATE TEMPORARY TABLE delrows AS SELECT id FROM stations; CREATE UNIQUE INDEX delstationid ON delrows (id); |