simbot-commits Mailing List for SimBot (Page 11)
Status: Abandoned
Brought to you by:
kstange
This list is closed, nobody may subscribe to it.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(88) |
Jun
(11) |
Jul
(64) |
Aug
(74) |
Sep
(1) |
Oct
(4) |
Nov
(12) |
Dec
(4) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(3) |
Oct
(1) |
Nov
(4) |
Dec
|
| 2007 |
Jan
(5) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Pete P. <fou...@us...> - 2005-05-06 23:56:17
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10522/plugins Modified Files: weather.pl Log Message: We now have the latitude and longitude of 289 of the US current observation stations. The other 1488 don't provide it. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -p -r1.66 -r1.67 --- weather.pl 6 May 2005 22:37:47 -0000 1.66 +++ weather.pl 6 May 2005 23:56:05 -0000 1.67 @@ -42,8 +42,6 @@ package SimBot::plugin::weather; use strict; use warnings; -use Data::Dumper; - # The weather, more or less! use Geo::METAR; @@ -95,6 +93,10 @@ use constant FORCE_METAR => 64; # cache here. sub cleanup_wx { $dbh->disconnect; + + # We shouldn't have done anything to the zip codes DB, but just in case + $zip_dbh->rollback; + $zip_dbh->disconnect; } ### messup_wx @@ -268,30 +270,35 @@ sub got_station_list { # but in some cases the number is X.Y . Is that X degrees, Y minutes, # and 0 seconds, or X.Y degrees? # I'll figure it out later... most stations just report NA anyway. -# my ($latitude, $dir) -# = $cur_station->{'latitude'} -# =~ m/([\d\.]+)([NS])/; -# -# if($dir eq 'S') { -# $latitude = $latitude * -1; -# } -# -# my $longitude; -# ($longitude, $dir) -# = $cur_station->{'longitude'} -# =~ m/([\d\.]+)([EW])/; -# -# if($dir eq 'W') { -# $longitude = $longitude * -1; -# } + my ($lat_deg, $lat_min, $lat_sec, $lat_dir); + if(($lat_deg, $lat_min, $lat_sec, $lat_dir) = $cur_station->{'latitude'} + =~ m/(\d+)\.(\d+)(?:\.(\d+))([NS])/) + { + $lat_deg += $lat_min * 0.0166666667; + $lat_deg += $lat_sec * 0.000277777778; + if($lat_dir eq 'S') { + $lat_deg = $lat_deg * -1; + } + } + + my ($long_deg, $long_min, $long_sec, $long_dir); + if(($long_deg, $long_min, $long_sec, $long_dir) = $cur_station->{'longitude'} + =~ m/(\d+)\.(\d+)(?:\.(\d+))?([EW])/) + { + $long_deg += $long_min * 0.0166666667; + $long_deg += $long_sec * 0.000277777778; + if($long_dir eq 'W') { + $long_deg = $long_deg * -1; + } + } $update_station_query->execute( $cur_station->{'station_id'}, $cur_station->{'station_name'}, $cur_station->{'state'}, 'United States', - undef, #$latitude, - undef, #$longitude, + $lat_deg, #$latitude, + $long_deg, #$longitude, $cur_station->{'xml_url'} ); } |
|
From: Pete P. <fou...@us...> - 2005-05-06 22:37:56
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22438/plugins Modified Files: weather.pl Log Message: No more %weather <lat> <long>. Use %weather forecast <zip> instead. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -p -r1.65 -r1.66 --- weather.pl 6 May 2005 22:23:44 -0000 1.65 +++ weather.pl 6 May 2005 22:37:47 -0000 1.66 @@ -986,12 +986,12 @@ sub new_get_wx { } return; } - if(($lat) = $station =~ /(-?[\d\.]+)/) { - my $long = $args[0]; - - &get_forecast($nick, $channel, $lat, $long); - return; - } +# if(($lat) = $station =~ /(-?[\d\.]+)/) { +# my $long = $args[0]; +# +# &get_forecast($nick, $channel, $lat, $long); +# return; +# } if($command =~ /^.metar$/) { $flags |= RAW_METAR; } foreach(@args) { |
|
From: Pete P. <fou...@us...> - 2005-05-06 22:23:53
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18281/plugins Modified Files: weather.pl Log Message: Single alerts now work right. Thank you, NOAA, for kindly inserting newlines where they don't belong. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -p -r1.64 -r1.65 --- weather.pl 6 May 2005 22:04:27 -0000 1.64 +++ weather.pl 6 May 2005 22:23:44 -0000 1.65 @@ -654,7 +654,7 @@ sub got_xml { # If this XML feed is unparsable, METAR /may/ be more useful. # Hey, it sure beats die(). - if (!eval { $cur_obs = XMLin($raw_xml, SuppressEmpty => 1); }) { + if (!eval { $cur_obs = XMLin($raw_xml, SuppressEmpty => 1, NormaliseSpace => 2); }) { &SimBot::debug(3, "weather: XML parse error for $station; falling back to METAR.\n"); &SimBot::debug(4, "weather: XML parser failure: $@"); my $url = @@ -691,7 +691,7 @@ sub got_xml { if(defined $weather && $weather !~ m/^null$/i) { $weather = lc($weather); - $weather =~ s/^\s*//; # sometimes they have a space in front +# $weather =~ s/^\s*//; # sometimes they have a space in front $weather =~ s/haze/hazy/; $weather =~ s/^(rain|snow)$/$1ing/; @@ -782,7 +782,7 @@ sub got_alerts { my $cap_alert; - if (!eval { $cap_alert = XMLin($raw_xml, SuppressEmpty => 1); }) { + if (!eval { $cap_alert = XMLin($raw_xml, SuppressEmpty => 1, NormaliseSpace => 2); }) { &SimBot::debug(3, "weather: XML parse error for alerts\n"); &SimBot::debug(4, "weather: XML parser failure: $@"); @@ -810,7 +810,7 @@ sub got_alerts { if(@alerts) { if($#alerts == 0) { &SimBot::send_message(&SimBot::option('network', 'channel'), - "$nick: $alerts[0] $alerts_link[0];"); + "$nick: $alerts[0] $alerts_link[0]"); } else { # more than one alert, we should do something a bit nicer... &SimBot::send_message(&SimBot::option('network', 'channel'), |
|
From: Pete P. <fou...@us...> - 2005-05-06 22:04:37
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13148/plugins Modified Files: weather.pl Log Message: Weather watches, warnings, and advisories, free with forecast. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -p -r1.63 -r1.64 --- weather.pl 6 May 2005 21:10:28 -0000 1.63 +++ weather.pl 6 May 2005 22:04:27 -0000 1.64 @@ -147,6 +147,8 @@ EOT do_wx => \&do_wx, got_wx => \&got_wx, got_xml => \&got_xml, + get_alerts => \&get_alerts, + got_alerts => \&got_alerts, got_station_name => \&got_station_name, got_station_list => \&got_station_list, shutdown => \&shutdown, @@ -762,13 +764,69 @@ sub got_xml { "$nick: $msg"); } -sub do_forecast { +sub got_alerts { + my ($kernel, $request_packet, $response_packet) + = @_[KERNEL, ARG0, ARG1]; + my ($nick, $lat, $long, $geocode) + = (split(/!/, $request_packet->[1], 4)); + my $response = $response_packet->[0]; + + if ($response->is_error) { + # The server isn't being nice to us. + # Let's just move on to getting the forecast + &SimBot::send_message(&SimBot::option('network', 'channel'), + "$nick: " . &get_forecast($nick, $lat, $long)); + return; + } + my $raw_xml = $response->content; + + my $cap_alert; + + if (!eval { $cap_alert = XMLin($raw_xml, SuppressEmpty => 1); }) { + &SimBot::debug(3, "weather: XML parse error for alerts\n"); + &SimBot::debug(4, "weather: XML parser failure: $@"); + + # Bad XML! Let's just move on to getting the forecast. + &SimBot::send_message(&SimBot::option('network', 'channel'), + "$nick: " . &get_forecast($nick, $lat, $long)); + + return; + } + + my @alerts; + my @alerts_link; + + my $cap_info = $cap_alert->{'cap:info'}; + + for my $i (0 .. $#$cap_info) { + my $cur_geocode = int $cap_info->[$i]->{'cap:area'}->{'cap:geocode'}; + if($cur_geocode == $geocode) { + # We have a warning! + push(@alerts, $cap_info->[$i]->{'cap:event'}); + push(@alerts_link, $cap_info->[$i]->{'cap:web'}); + } + } + + if(@alerts) { + if($#alerts == 0) { + &SimBot::send_message(&SimBot::option('network', 'channel'), + "$nick: $alerts[0] $alerts_link[0];"); + } else { + # more than one alert, we should do something a bit nicer... + &SimBot::send_message(&SimBot::option('network', 'channel'), + "$nick: " . join (', ', @alerts)); + } + } + # OK, we're done with the alerts... now do the forecast + &SimBot::send_message(&SimBot::option('network', 'channel'), + "$nick: " . &get_forecast($nick, $lat, $long)); +} + +sub get_forecast { # Credit/blame to http://golem.ph.utexas.edu/~distler/blog/archives/000500.html # for much of this script - my ($nick, $channel, $lat, $long) = @_; + my ($nick, $lat, $long) = @_; - &SimBot::debug(3, 'weather: Received forecast request from ' . $nick - . " for $lat $long\n"); my $serviceURI = 'http://weather.gov/forecasts/xml'; my $method = 'NDFDgenByDay'; my $endpoint = "$serviceURI/SOAP_server/ndfdXMLserver.php"; @@ -797,7 +855,7 @@ sub do_forecast { ); if ($response->fault) { - &SimBot::send_message($channel, "$nick: Something unexpected happened: " . $response->faultstring); + return 'Something unexpected happened: ' . $response->faultstring; } else { # open(OUT, ">forecast_debug"); # print OUT $response->result; @@ -806,8 +864,7 @@ sub do_forecast { my $forecast; if (!eval { $forecast = XMLin($xml); }) { - &SimBot::send_message($channel, "$nick: The forecast could not be parsed. Blame NOAA."); - return; + return 'The forecast could not be parsed. Blame NOAA.'; } my $params = $forecast->{'data'}->{'parameters'}; @@ -878,7 +935,7 @@ sub do_forecast { } } $msg =~ s/; $//; - &SimBot::send_message($channel, "$nick: $msg"); + return $msg; } } @@ -909,15 +966,17 @@ sub new_get_wx { my ($kernel, $nick, $channel, $command, $station, @args) = @_; my $flags = 0; - my ($lat, $long); + my ($lat, $long, $state, $geocode); if($station =~ /f(ore)?cast/) { if(defined $args[0] && $args[0] =~ /^\d{5}$/) { # zip code my $get_lat_long_query = $zip_dbh->prepare_cached( - 'SELECT latitude, longitude FROM uszips' + 'SELECT latitude, longitude, state, geocode FROM uszips' . ' WHERE zip = ? LIMIT 1'); $get_lat_long_query->execute($args[0]); - if(($lat, $long) = $get_lat_long_query->fetchrow_array) { - &do_forecast($nick, $channel, $lat, $long); + if(($lat, $long, $state, $geocode) = $get_lat_long_query->fetchrow_array) { + #&get_forecast($nick, $channel, $lat, $long); + #&get_alerts($kernel, $nick, $channel, $lat, $long, $state, $geocode); + $kernel->post($session => 'get_alerts', $nick, $lat, $long, $state, $geocode); } else { &SimBot::send_message($channel, "$nick: I do not know where that zip code is."); } @@ -930,7 +989,7 @@ sub new_get_wx { if(($lat) = $station =~ /(-?[\d\.]+)/) { my $long = $args[0]; - &do_forecast($nick, $channel, $lat, $long); + &get_forecast($nick, $channel, $lat, $long); return; } @@ -943,6 +1002,21 @@ sub new_get_wx { $kernel->post($session => 'do_wx', $nick, $station, $flags); } +sub get_alerts { + my ($kernel, $nick, $lat, $long, $state, $geocode) = + @_[KERNEL, ARG0, ARG1, ARG2, ARG3, ARG4 ]; + + &SimBot::debug(3, 'weather: Received forecast request from ' . $nick + . " for $lat $long $geocode, in get_alerts\n"); + + my $url = 'http://weather.gov/alerts/' . lc($state) . '.cap'; + my $request = HTTP::Request->new(GET => $url); + $kernel->post('wxua' => 'request', 'got_alerts', + $request, "$nick!$lat!$long!$geocode"); + + # We're done here - got_alerts will handle requesting the forecast +} + # Register Plugins &SimBot::plugin_register( plugin_id => "weather", |
|
From: Kevin S. <ks...@us...> - 2005-05-06 21:24:05
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4159 Modified Files: .cvsignore Removed Files: dbdump.pl dbrestore.pl Log Message: missed moving info to data/... I also moved dbdump/dbrestore to tools/ Index: .cvsignore =================================================================== RCS file: /cvsroot/simbot/simbot/.cvsignore,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -p -r1.14 -r1.15 --- .cvsignore 6 May 2005 21:10:11 -0000 1.14 +++ .cvsignore 6 May 2005 21:23:53 -0000 1.15 @@ -1,7 +1,5 @@ config.ini -*.pag -*.dir -*.db +rules.db simbot.sh .DS_Store *.stackdump --- dbdump.pl DELETED --- --- dbrestore.pl DELETED --- |
|
From: Kevin S. <ks...@us...> - 2005-05-06 21:24:03
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4159/plugins Modified Files: info.pl Log Message: missed moving info to data/... I also moved dbdump/dbrestore to tools/ Index: info.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/info.pl,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -p -r1.42 -r1.43 --- info.pl 5 May 2005 04:04:07 -0000 1.42 +++ info.pl 6 May 2005 21:23:53 -0000 1.43 @@ -124,7 +124,7 @@ use constant FACT_URL => 32; use constant FACT_LOCKED => 16; sub messup_info { - dbmopen(%info, 'info', 0664); + dbmopen(%info, 'data/info', 0664); } sub cleanup_info { |
|
From: Kevin S. <ks...@us...> - 2005-05-06 21:24:02
|
Update of /cvsroot/simbot/simbot/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4159/tools Added Files: dbdump.pl dbrestore.pl Log Message: missed moving info to data/... I also moved dbdump/dbrestore to tools/ --- NEW FILE: dbdump.pl --- #!/usr/bin/perl -w $file = $ARGV[0]; dbmopen(%db, $file, 0665) || die $!; while(($key, $val) = each %db) { print "$key => $val\n"; } dbmclose(%db); --- NEW FILE: dbrestore.pl --- #!/usr/bin/perl -w $file = $ARGV[0]; $dbname = $file; $dbname =~ s/\..*?$//; open(DBDUMP, $file) || die $!; dbmopen(%db, $dbname, 0665) || die $!; while(<DBDUMP>) { chomp; ($key, $value) = split(" => "); $db{$key} = $value; } dbmclose(%db); close(DBDUMP); |
|
From: Kevin S. <ks...@us...> - 2005-05-06 21:24:01
|
Update of /cvsroot/simbot/simbot/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4159/data Modified Files: .cvsignore Log Message: missed moving info to data/... I also moved dbdump/dbrestore to tools/ Index: .cvsignore =================================================================== RCS file: /cvsroot/simbot/simbot/data/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- .cvsignore 6 May 2005 21:10:25 -0000 1.1 +++ .cvsignore 6 May 2005 21:23:53 -0000 1.2 @@ -1 +1,5 @@ irclog +info +*.pag +*.dir +*.bak \ No newline at end of file |
|
From: Kevin S. <ks...@us...> - 2005-05-06 21:16:03
|
Update of /cvsroot/simbot/simbot/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2515 Modified Files: errors.db Log Message: dos2unix... Index: errors.db =================================================================== RCS file: /cvsroot/simbot/simbot/data/errors.db,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- errors.db 6 May 2005 21:10:26 -0000 1.1 +++ errors.db 6 May 2005 21:15:54 -0000 1.2 @@ -1,29 +1,29 @@ -Segmentation Fault -'$nick' is not recognized as an internal or external command, operable program or batch file. -Bad Command or File Name -Tapping this does nothing. -The properties for this item are not available. -Bus Error -$nick has encountered a problem and needs to close. We are sorry for the inconvenience. -The page cannot be displayed. -Missing Operating System -402 Payment Required -404 Not Found -$nick:42: void value not ignored as it ought to be -Nothing to do. -[an error occurred while processing this directive] -$nick No such nick -#$nick The channel demigods have stolen your voice -Incorrect function. -Windows cannot find '$nick'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search. -Nothing Happens. -Sorry, a system error has occurred. -You need to restart your computer. Hold down the Power button for several seconds or press the Restart button. -Can't send an empty message. -Cannot delete $nick: Access is denied. Make sure the disk is not full or write-protected and the file is not currently in use. -Connection reset by peer -The drive or network connection that the shortcut '$nick.lnk' refers to is unavailable. Make sure that the disk is properly inserted or the network resource is available, and then try again. -The application "unknown" has unexpectedly quit, because an error of type 10 occurred. -You must type a file name. -X connection to localhost:10.0 broken (explicit kill or server shutdown). -Broken pipe +Segmentation Fault +'$nick' is not recognized as an internal or external command, operable program or batch file. +Bad Command or File Name +Tapping this does nothing. +The properties for this item are not available. +Bus Error +$nick has encountered a problem and needs to close. We are sorry for the inconvenience. +The page cannot be displayed. +Missing Operating System +402 Payment Required +404 Not Found +$nick:42: void value not ignored as it ought to be +Nothing to do. +[an error occurred while processing this directive] +$nick No such nick +#$nick The channel demigods have stolen your voice +Incorrect function. +Windows cannot find '$nick'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search. +Nothing Happens. +Sorry, a system error has occurred. +You need to restart your computer. Hold down the Power button for several seconds or press the Restart button. +Can't send an empty message. +Cannot delete $nick: Access is denied. Make sure the disk is not full or write-protected and the file is not currently in use. +Connection reset by peer +The drive or network connection that the shortcut '$nick.lnk' refers to is unavailable. Make sure that the disk is properly inserted or the network resource is available, and then try again. +The application "unknown" has unexpectedly quit, because an error of type 10 occurred. +You must type a file name. +X connection to localhost:10.0 broken (explicit kill or server shutdown). +Broken pipe |
|
From: Kevin S. <ks...@us...> - 2005-05-06 21:11:03
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv541 Modified Files: .cvsignore Removed Files: USzip errors.db Log Message: Move some files to data/ which will be used to store databases from now on. Please move your irclog file to data/ :) Index: .cvsignore =================================================================== RCS file: /cvsroot/simbot/simbot/.cvsignore,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -p -r1.13 -r1.14 --- .cvsignore 6 May 2005 00:14:19 -0000 1.13 +++ .cvsignore 6 May 2005 21:10:11 -0000 1.14 @@ -5,5 +5,4 @@ config.ini simbot.sh .DS_Store *.stackdump -irclog forecast_debug --- USzip DELETED --- --- errors.db DELETED --- |
|
From: Kevin S. <ks...@us...> - 2005-05-06 21:10:54
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv541/plugins Modified Files: error.pl sqlite-logger.pl weather.pl Log Message: Move some files to data/ which will be used to store databases from now on. Please move your irclog file to data/ :) Index: error.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/error.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -p -r1.11 -r1.12 --- error.pl 4 May 2005 19:50:12 -0000 1.11 +++ error.pl 6 May 2005 21:10:26 -0000 1.12 @@ -23,7 +23,7 @@ use warnings; sub random_error { my ($kernel, $nick, $channel) = @_; &SimBot::debug(3, "error: Got error request from " . $nick . ".\n"); - open(FILE, "errors.db"); + open(FILE, "data/errors.db"); my @lines = <FILE>; close(FILE); my $error = &SimBot::pick(@lines); Index: sqlite-logger.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/sqlite-logger.pl,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -p -r1.43 -r1.44 --- sqlite-logger.pl 4 May 2005 19:54:14 -0000 1.43 +++ sqlite-logger.pl 6 May 2005 21:10:27 -0000 1.44 @@ -59,7 +59,7 @@ EOT sub messup_sqlite_logger { $dbh = DBI->connect( - 'dbi:SQLite:dbname=irclog', + 'dbi:SQLite:dbname=data/irclog', '','', # user, pass aren't useful to SQLite { RaiseError => 1, AutoCommit => 0 } ) or die; Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -p -r1.62 -r1.63 --- weather.pl 6 May 2005 00:21:25 -0000 1.62 +++ weather.pl 6 May 2005 21:10:28 -0000 1.63 @@ -106,7 +106,7 @@ sub messup_wx { $dbh = DBI->connect('dbi:SQLite:dbname=caches/weather','','', { RaiseError => 1, AutoCommit => 0 }) or die; - $zip_dbh = DBI->connect('dbi:SQLite:dbname=USzip','','', + $zip_dbh = DBI->connect('dbi:SQLite:dbname=data/USzip','','', { RaiseError => 1, AutoCommit => 0 }) or die; # let's create the table. If this fails, we don't care, as it |
|
From: Kevin S. <ks...@us...> - 2005-05-06 21:10:46
|
Update of /cvsroot/simbot/simbot/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv541/data Added Files: .cvsignore USzip errors.db Log Message: Move some files to data/ which will be used to store databases from now on. Please move your irclog file to data/ :) --- NEW FILE: .cvsignore --- irclog --- NEW FILE: USzip --- SQLite format 3 ]CREATE UNIQUE INDEX uszipszip ON uszips (zip)=UtableuszipsuszipsCREATE TABLE uszips ( zip INTEGER UNIQUE, latitude REAL, longitude REAL, zipclass STRING, poname STRING, state STRING, geocode INTEGER )+? UôèÛÎÁ´¦ Z@2d¢eðõ¡ÀPË»äG=AGUADAPRC( [@2t¶¶àÒ=ÀPÉTu£LAGUADILLAPRE( \@2~WS£ìÀPȲNEFAGUADILLAPRE) ]@2wÛYWÀPÉKµáPAGUADILLAPRE& ^@2,FA,ðúÀP¼lP2ÏMARICAOPR% b@2IçBØÀPÈðÇ}ØsANASCOPRK'c@2GW÷7ÚÀP³VÀÖõEPANGELESPRÍ& d@2s__(RÀP¬°SARECIBOPRM'e@2uE5ËÀP®åÂ.äPARECIBOPRM'f@2mÿ.Hè§ÀP«+6½+PARECIBOPRM' h@2qÝãu ¾ÀP© ÌÀPËý¢üðBOQUERONPRW( o@2ìgÇLÀPÉjPCABO ROJOPRW' p@2cÇOµÀP®yWòÔPENUELASPR¯$ s@2zW ÀP¶´:æCAMUYPR[(w@2Dépq#ÀP·\6PCASTANERPR'|@2 s÷H¡ÀPtBåWÞ RIO GRANDEPR·&\ ï@1ÿ¸fäÀPòärSALINASPR»*] #ò@20I@¼ÀP}ÈAîSAN LORENZOPRÁ+^ %õ@1ýÁr%·JÀPPJZSANTA ISABELPRÅ&_ ý@2«CIÀP]vy!VIEQUESPRÓ'` þ@2ÚUKðÀPÈh¹ý½VILLALBAPRÕ&a ÿ@2§Tm?ÀPxÄiPürYABUCOAPR×$b @2îyÀPs«ÉGCOAMOPRk*c #@22RÎ-²ÀPwÎ[BEöLAS PIEDRASPR$d @2r3ÀÀPy©oLOIZAPR'e @2]³ò s÷ÀPmR"ÃLUQUILLOPR'f@2Rà\̱ÀPRùP¹UøPCULEBRAPRq%g @24Üvû×ÀPy¶ªK JUNCOSPR%h @2BSÚr§½ÀP~`¥ÏGURABOPR*i #@2 [\] ^bcdefhinopsw|}~ !"#$%&'()*+¢,¤-¥.¦/¨0©1ª2«34¯5°6²7´8µ9¶:º;¿<À=Á>Ã?Ê@ËAÌBÍCÎDÏEÐFÑGÓHÕIÖJØKÙLÚMÛNÜOÝPÞQßRàSáTâUãVäWåXæYèZé[ï\ò]õ^ý_þ`ÿabc [...5615 lines suppressed...] [ z --- NEW FILE: errors.db --- Segmentation Fault '$nick' is not recognized as an internal or external command, operable program or batch file. Bad Command or File Name Tapping this does nothing. The properties for this item are not available. Bus Error $nick has encountered a problem and needs to close. We are sorry for the inconvenience. The page cannot be displayed. Missing Operating System 402 Payment Required 404 Not Found $nick:42: void value not ignored as it ought to be Nothing to do. [an error occurred while processing this directive] $nick No such nick #$nick The channel demigods have stolen your voice Incorrect function. Windows cannot find '$nick'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search. Nothing Happens. Sorry, a system error has occurred. You need to restart your computer. Hold down the Power button for several seconds or press the Restart button. Can't send an empty message. Cannot delete $nick: Access is denied. Make sure the disk is not full or write-protected and the file is not currently in use. Connection reset by peer The drive or network connection that the shortcut '$nick.lnk' refers to is unavailable. Make sure that the disk is properly inserted or the network resource is available, and then try again. The application "unknown" has unexpectedly quit, because an error of type 10 occurred. You must type a file name. X connection to localhost:10.0 broken (explicit kill or server shutdown). Broken pipe |
|
From: Pete P. <fou...@us...> - 2005-05-06 19:12:26
|
Update of /cvsroot/simbot/simbot/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3394/tools Modified Files: create_zip_db.pl Log Message: Instead of storing a useless county number, we store the geocode. This will be used to add watches and warnings support to simbot. Index: create_zip_db.pl =================================================================== RCS file: /cvsroot/simbot/simbot/tools/create_zip_db.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- create_zip_db.pl 6 May 2005 02:29:54 -0000 1.2 +++ create_zip_db.pl 6 May 2005 19:11:46 -0000 1.3 @@ -10,7 +10,7 @@ # # USAGE: # Download the ZIP1999 data from -# http://www.census.gov/geo/www/tiger/zip1999.html +# # and put the zipnov99.DBF file in the same directory as this script. # Then, run perl create_zip_db.pl. When the script completes, you should # have a USzip file to put in your simbot directory. @@ -63,19 +63,19 @@ CREATE TABLE uszips ( zipclass STRING, poname STRING, state STRING, - county STRING + geocode INTEGER ); EOT +# we'll create the index when we are done, supposedly it's faster +# that way + my $insert_row_query=$sqlite_dbh->prepare( 'INSERT INTO uszips' - . ' (zip, latitude, longitude, zipclass, poname, state, county)' + . ' (zip, latitude, longitude, zipclass, poname, state, geocode)' . ' VALUES (?, ?, ?, ?, ?, ?, ?)' ); -# we'll create the index when we are done, supposedly it's faster -# that way - # ok, that's done, now open the dbase III database my $dbase_dbf = new CAM::DBF('zipnov99.DBF') or die 'Could not open zipnov99.DBF'; @@ -92,6 +92,7 @@ for my $row (0 .. $last_row) { my $lat = $cur_row->{'LATITUDE'}; my $long = $cur_row->{'LONGITUDE'}; my $state = $cur_row->{'STATE'}; + my $geocode = $state . sprintf('%03d', $cur_row->{'COUNTY'}); if($states{$state}) { $state = $states{$state}; } @@ -101,7 +102,7 @@ for my $row (0 .. $last_row) { $insert_row_query->execute($cur_row->{'ZIP_CODE'}, $lat, $long, $cur_row->{'ZIP_CLASS'}, - $cur_row->{'PONAME'}, $state, $cur_row->{'COUNTY'}); + $cur_row->{'PONAME'}, $state, $geocode); } print "Done!\nCreating indices..."; |
|
From: Pete P. <fou...@us...> - 2005-05-06 19:12:25
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3394 Modified Files: USzip Log Message: Instead of storing a useless county number, we store the geocode. This will be used to add watches and warnings support to simbot. Index: USzip =================================================================== RCS file: /cvsroot/simbot/simbot/USzip,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 Binary files /tmp/cvst1l7W1 and /tmp/cvsWfNKci differ |
|
From: Pete P. <fou...@us...> - 2005-05-06 02:30:15
|
Update of /cvsroot/simbot/simbot/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27403/tools Modified Files: create_zip_db.pl Log Message: Storing the state as a number seems stupid. Let's store abbreviations instead. Index: create_zip_db.pl =================================================================== RCS file: /cvsroot/simbot/simbot/tools/create_zip_db.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- create_zip_db.pl 5 May 2005 23:41:50 -0000 1.1 +++ create_zip_db.pl 6 May 2005 02:29:54 -0000 1.2 @@ -37,6 +37,19 @@ use strict; use CAM::DBF; use DBI; + +my %states = qw( + 01 AL 02 AK 04 AZ 05 AR 06 CA 08 CO 09 CT 10 DE 11 DC + 12 FL 13 GA 15 HI 16 ID 17 IL 18 IN 19 IA 20 KS 21 KY + 22 LA 23 ME 24 MD 25 MA 26 MI 27 MN 28 MS 29 MO 30 MT + 31 NE 32 NV 33 NH 34 NJ 35 NM 36 NY 37 NC 38 ND 39 OH + 40 OK 41 OR 42 PA 44 RI 45 SC 46 SC 47 TN 48 TX 49 UT + 50 VT 51 VA 53 WA 54 WV 55 WI 56 WY + + 60 AS 64 FM 66 GU 68 MH 69 MP 70 PW 72 PR 74 UM 78 VI +); + + # set up the sqlite database my $sqlite_dbh = DBI->connect('dbi:SQLite:dbname=USzip','','', { RaiseError => 1, AutoCommit => 0 }) @@ -78,20 +91,26 @@ for my $row (0 .. $last_row) { my $lat = $cur_row->{'LATITUDE'}; my $long = $cur_row->{'LONGITUDE'}; + my $state = $cur_row->{'STATE'}; + + if($states{$state}) + { $state = $states{$state}; } $lat =~ s/^\s*//; $long =~ s/^\s*//; $insert_row_query->execute($cur_row->{'ZIP_CODE'}, $lat, $long, $cur_row->{'ZIP_CLASS'}, - $cur_row->{'PONAME'}, $cur_row->{'STATE'}, $cur_row->{'COUNTY'}); + $cur_row->{'PONAME'}, $state, $cur_row->{'COUNTY'}); } -print "Done!\nCreating the index..."; -# create the index +print "Done!\nCreating indices..."; $sqlite_dbh->do(<<EOT); CREATE UNIQUE INDEX uszipszip ON uszips (zip); + +CREATE INDEX uszipsstate + ON uszips (state); EOT print " Done!\nCommitting..."; |
|
From: Pete P. <fou...@us...> - 2005-05-06 02:30:03
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27403 Modified Files: USzip Log Message: Storing the state as a number seems stupid. Let's store abbreviations instead. Index: USzip =================================================================== RCS file: /cvsroot/simbot/simbot/USzip,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 Binary files /tmp/cvsKBbnvZ and /tmp/cvscVAKTY differ |
|
From: Pete P. <fou...@us...> - 2005-05-06 00:21:40
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30631/plugins Modified Files: weather.pl Log Message: Removes a "still active" warning. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -p -r1.61 -r1.62 --- weather.pl 6 May 2005 00:16:35 -0000 1.61 +++ weather.pl 6 May 2005 00:21:25 -0000 1.62 @@ -921,6 +921,7 @@ sub new_get_wx { } else { &SimBot::send_message($channel, "$nick: I do not know where that zip code is."); } + $get_lat_long_query->finish; } else { &SimBot::send_message($channel, "$nick: For what US Zip code do you want a forecast?"); } |
|
From: Pete P. <fou...@us...> - 2005-05-06 00:16:45
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29365/plugins Modified Files: weather.pl Log Message: Documentation Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -p -r1.60 -r1.61 --- weather.pl 6 May 2005 00:14:19 -0000 1.60 +++ weather.pl 6 May 2005 00:16:35 -0000 1.61 @@ -945,9 +945,9 @@ sub new_get_wx { # Register Plugins &SimBot::plugin_register( plugin_id => "weather", - plugin_params => "<station ID> [metar|raw]", + plugin_params => "(<station ID> [metar|raw] | forecast <zip>)", plugin_help => -"Gets a weather report for the given station.\nSpecifying %bold%metar%bold% will force the parsing the metar report instead of using the NOAA XML data.\nSpecifying %bold%raw%bold% will show the METAR report in its original form.", +"Gets a weather report for the given station.\nSpecifying %bold%metar%bold% will force the parsing the metar report instead of using the NOAA XML data.\nSpecifying %bold%raw%bold% will show the METAR report in its original form.\nforecast <zip> will get the forecast for that US zip code.", event_plugin_call => \&new_get_wx, event_plugin_load => \&messup_wx, |
|
From: Pete P. <fou...@us...> - 2005-05-06 00:14:28
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28616 Modified Files: .cvsignore Log Message: Stop generating the forecast_debug file, and stop get CVS to stop nagging about it. Index: .cvsignore =================================================================== RCS file: /cvsroot/simbot/simbot/.cvsignore,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -p -r1.12 -r1.13 --- .cvsignore 4 May 2005 14:00:13 -0000 1.12 +++ .cvsignore 6 May 2005 00:14:19 -0000 1.13 @@ -6,3 +6,4 @@ simbot.sh .DS_Store *.stackdump irclog +forecast_debug |
|
From: Pete P. <fou...@us...> - 2005-05-06 00:14:28
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28616/plugins Modified Files: weather.pl Log Message: Stop generating the forecast_debug file, and stop get CVS to stop nagging about it. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -p -r1.59 -r1.60 --- weather.pl 6 May 2005 00:12:31 -0000 1.59 +++ weather.pl 6 May 2005 00:14:19 -0000 1.60 @@ -799,8 +799,8 @@ sub do_forecast { if ($response->fault) { &SimBot::send_message($channel, "$nick: Something unexpected happened: " . $response->faultstring); } else { - open(OUT, ">forecast_debug"); - print OUT $response->result; +# open(OUT, ">forecast_debug"); +# print OUT $response->result; my $xml = $response->result; |
|
From: Pete P. <fou...@us...> - 2005-05-06 00:12:48
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27891/plugins Modified Files: weather.pl Log Message: How many ways can NOAA screw up an XML feed? Let's count... We now ask for all 7 days from NOAA even though we'll only use 5. NOAA seems to clobber the data for the last day or two, so this way we'll usually get 5 days of useful data. When we *don't* get useful data for a day, stop sending hash references to IRC. Nobody likes them. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -p -r1.58 -r1.59 --- weather.pl 6 May 2005 00:01:35 -0000 1.58 +++ weather.pl 6 May 2005 00:12:31 -0000 1.59 @@ -773,7 +773,12 @@ sub do_forecast { my $method = 'NDFDgenByDay'; my $endpoint = "$serviceURI/SOAP_server/ndfdXMLserver.php"; my $soapAction = "$serviceURI/DWMLgen/wsdl/ndfdXML.wsdl#$method"; - my $numDays = 6; + + # how many days should we ask for? Max NOAA lets us is 7. + # Occasionally NOAA seems to give bogus data towards the end of the set + # this seems to happen no matter how many days we ask for, so let's + # ask for all 7 to hopefully get good data for 5 or so. + my $numDays = 7; my $format = '12 hourly'; my @time = localtime; @@ -823,7 +828,7 @@ sub do_forecast { die "unknown period key\n"; } - $numDays = 2; + $numDays = 5; if ($numDays > $#$maxperiodkey + 1) { $numDays = $#$maxperiodkey + 1; } @@ -856,8 +861,23 @@ sub do_forecast { my $msg = ''; for my $i (@$times) { - $msg .= $i . ': ' . $conditions->{$i} . ', ' . $temperatures->{$i} . '°F; '; + my $cur_msg = $i . ': '; + my $got_something = 0; + if($conditions->{$i}) { + $cur_msg .= $conditions->{$i} . ', '; + $got_something = 1; + } + if($temperatures->{$i} && $temperatures->{$i} !~ /^HASH/ ) { + $cur_msg .= $temperatures->{$i} . '°F'; + $got_something = 1; + } + $cur_msg .= '; '; + + if($got_something) { + $msg .= $cur_msg; + } } + $msg =~ s/; $//; &SimBot::send_message($channel, "$nick: $msg"); } } |
|
From: Pete P. <fou...@us...> - 2005-05-06 00:01:47
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25727/plugins Modified Files: weather.pl Log Message: Added %weather forecast <zip> to get the forecast for that zip. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -p -r1.57 -r1.58 --- weather.pl 5 May 2005 03:48:32 -0000 1.57 +++ weather.pl 6 May 2005 00:01:35 -0000 1.58 @@ -65,7 +65,7 @@ use HTTP::Status; use DBI; # for sqlite database # declare globals -use vars qw( $session $dbh ); +use vars qw( $session $dbh $zip_dbh ); # These constants define the phrases simbot will use when responding # to weather requests. @@ -105,6 +105,9 @@ sub messup_wx { # let's create our database $dbh = DBI->connect('dbi:SQLite:dbname=caches/weather','','', { RaiseError => 1, AutoCommit => 0 }) or die; + + $zip_dbh = DBI->connect('dbi:SQLite:dbname=USzip','','', + { RaiseError => 1, AutoCommit => 0 }) or die; # let's create the table. If this fails, we don't care, as it # probably already exists @@ -764,7 +767,8 @@ sub do_forecast { # for much of this script my ($nick, $channel, $lat, $long) = @_; - + &SimBot::debug(3, 'weather: Received forecast request from ' . $nick + . " for $lat $long\n"); my $serviceURI = 'http://weather.gov/forecasts/xml'; my $method = 'NDFDgenByDay'; my $endpoint = "$serviceURI/SOAP_server/ndfdXMLserver.php"; @@ -886,6 +890,22 @@ sub new_get_wx { my $flags = 0; my ($lat, $long); + if($station =~ /f(ore)?cast/) { + if(defined $args[0] && $args[0] =~ /^\d{5}$/) { # zip code + my $get_lat_long_query = $zip_dbh->prepare_cached( + 'SELECT latitude, longitude FROM uszips' + . ' WHERE zip = ? LIMIT 1'); + $get_lat_long_query->execute($args[0]); + if(($lat, $long) = $get_lat_long_query->fetchrow_array) { + &do_forecast($nick, $channel, $lat, $long); + } else { + &SimBot::send_message($channel, "$nick: I do not know where that zip code is."); + } + } else { + &SimBot::send_message($channel, "$nick: For what US Zip code do you want a forecast?"); + } + return; + } if(($lat) = $station =~ /(-?[\d\.]+)/) { my $long = $args[0]; |
|
From: Pete P. <fou...@us...> - 2005-05-06 00:01:44
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25727 Modified Files: ChangeLog Log Message: Added %weather forecast <zip> to get the forecast for that zip. Index: ChangeLog =================================================================== RCS file: /cvsroot/simbot/simbot/ChangeLog,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -p -r1.72 -r1.73 --- ChangeLog 5 May 2005 03:48:31 -0000 1.72 +++ ChangeLog 6 May 2005 00:01:34 -0000 1.73 @@ -1,3 +1,11 @@ +Version 1.0 alpha: (05 May 2005) + * tools/create_zip_db.pl: + - Creates the USzip file, a SQLite DB of US zip codes circa 1999 from + US census data. This file lets us match zip codes to lat/long. + * plugins/weather.pl: + - Slightly better forecast support, you can now use + %weather forecast <zip> to get the forecast for your zip code. + Version 1.0 alpha: (04 May 2005) * plugins/weather.pl: - Forecast support; %weather <lat> <long> will give a forecast or break |
|
From: Pete P. <fou...@us...> - 2005-05-05 23:42:03
|
Update of /cvsroot/simbot/simbot/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21111/tools Added Files: create_zip_db.pl Log Message: Added a USzip sqlite database for anything that wants to use it, and the script that generated it, in case we ever need to. --- NEW FILE: create_zip_db.pl --- #!/usr/bin/perl # SimBot ZIP1999 Data Importer # # DESCRIPTION: # Imports the US Census ZIP code data from 1999 into a sqlite database # for use by the weather plugin, and anything else that wants it. # You should not need to run this, you should have received a USzip file # with simbot. # # USAGE: # Download the ZIP1999 data from # http://www.census.gov/geo/www/tiger/zip1999.html # and put the zipnov99.DBF file in the same directory as this script. # Then, run perl create_zip_db.pl. When the script completes, you should # have a USzip file to put in your simbot directory. # # COPYRIGHT: # Copyright (C) 2005, Pete Pearson # # This program is free software; you can redistribute and/or modify it # under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA use warnings; use strict; use CAM::DBF; use DBI; # set up the sqlite database my $sqlite_dbh = DBI->connect('dbi:SQLite:dbname=USzip','','', { RaiseError => 1, AutoCommit => 0 }) or die 'Could not set up SQLite DB!'; $sqlite_dbh->do(<<EOT); CREATE TABLE uszips ( zip INTEGER UNIQUE, latitude REAL, longitude REAL, zipclass STRING, poname STRING, state STRING, county STRING ); EOT my $insert_row_query=$sqlite_dbh->prepare( 'INSERT INTO uszips' . ' (zip, latitude, longitude, zipclass, poname, state, county)' . ' VALUES (?, ?, ?, ?, ?, ?, ?)' ); # we'll create the index when we are done, supposedly it's faster # that way # ok, that's done, now open the dbase III database my $dbase_dbf = new CAM::DBF('zipnov99.DBF') or die 'Could not open zipnov99.DBF'; my $last_row = $dbase_dbf->nrecords() - 1; print 'Opened the DBF. ' . $dbase_dbf->nrecords() . " rows to read\n"; for my $row (0 .. $last_row) { if($row % 2500 == 0) { print " row $row, " . int (($row/$last_row)*100) . "%\n"; } my $cur_row = $dbase_dbf->fetchrow_hashref($row); my $lat = $cur_row->{'LATITUDE'}; my $long = $cur_row->{'LONGITUDE'}; $lat =~ s/^\s*//; $long =~ s/^\s*//; $insert_row_query->execute($cur_row->{'ZIP_CODE'}, $lat, $long, $cur_row->{'ZIP_CLASS'}, $cur_row->{'PONAME'}, $cur_row->{'STATE'}, $cur_row->{'COUNTY'}); } print "Done!\nCreating the index..."; # create the index $sqlite_dbh->do(<<EOT); CREATE UNIQUE INDEX uszipszip ON uszips (zip); EOT print " Done!\nCommitting..."; $sqlite_dbh->commit; print " Done!\n"; |
|
From: Pete P. <fou...@us...> - 2005-05-05 23:41:59
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21111 Added Files: USzip Log Message: Added a USzip sqlite database for anything that wants to use it, and the script that generated it, in case we ever need to. --- NEW FILE: USzip --- SQLite format 3 ON uszips (zip);QtableuszipsuszipsCREATE TABLE uszips ( zip INTEGER UNIQUE, latitude REAL, longitude REAL, zipclass STRING, poname STRING, state STRING, county STRING )+? Z@2d¢eðõ¡ÀPË»äG=AGUADAH% [@2t¶¶àÒ=ÀPÉTu£LAGUADILLAH% \@2~WS£ìÀPȲNEFAGUADILLAH& ]@2wÛYWÀPÉKµáPAGUADILLAH# ^@2,FA,ðúÀP¼lP2ÏMARICAOH]" b@2IçBØÀPÈðÇ}ØsANASCOH%c@2GW÷7ÚÀP³VÀÖõEPANGELESH ÌÀPËý¢üðBOQUERONH s÷H¡ÀPtBåWÞ RIO GRANDEHw#\ ï@1ÿ¸fäÀPòärSALINASH{(] #ò@20I@¼ÀP}ÈAîSAN LORENZOH s÷ÀPmR"ÃLUQUILLOHY$f@2Rà\̱ÀPRùP¹UøPCULEBRAH1"g @24Üvû×ÀPy¶ªK JUNCOSHM"h @2BSÚr§½ÀP~`¥ÏGURABOH?'i #@2 [\] ^bcdefhinopsw|}~ !"#$%&'()*+¢,¤-¥.¦/¨0©1ª2«34¯5°6²7´8µ9¶:º;¿<À=Á>Ã?Ê@ËAÌBÍCÎDÏEÐFÑGÓHÕIÖJØKÙLÚMÛNÜOÝPÞQßRàSáTâUãVäWåXæYèZé[ï\ò]õ^ý_þ`ÿabc [...5797 lines suppressed...] [ z |