From: minima Date: Fri, 7 Mar 2003 20:40:36 +0000 (+0000) Subject: first cut of localqsl X-Git-Tag: PRE-1-52~40 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e35c88834507a81f0086fa83a6e03e260c22d7f;p=spider.git first cut of localqsl --- diff --git a/cmd/load/db.pl b/cmd/load/db.pl new file mode 100644 index 00000000..4ccb4b84 --- /dev/null +++ b/cmd/load/db.pl @@ -0,0 +1,8 @@ +# +# Reload the DB list +# +my ($self, $line) = @_; +return (1, $self->msg('e5')) if $self->priv < 9; +DXDb::closeall(); +DXDb::load(); +return (1, 'Ok'); diff --git a/perl/create_localqsl.pl b/perl/create_localqsl.pl index 2d3fc57e..14693d63 100755 --- a/perl/create_localqsl.pl +++ b/perl/create_localqsl.pl @@ -27,6 +27,9 @@ use DXUtil; use Spot; use DXDb; +my $end = 0; +$SIG{TERM} = $SIG{INT} = sub { $end++ }; + my $qslfn = "localqsl"; $main::systime = time; @@ -49,9 +52,10 @@ foreach my $year (sort readdir YEAR) { my $baseyear = "$base/$year"; opendir DAY, $baseyear or die "$baseyear $!"; foreach my $day (sort readdir DAY) { - next if $day =~ /^\./; + next unless $day =~ /dat$/; my $fn = "$baseyear/$day"; my $f = new IO::File $fn or die "$fn ($!)"; + print "doing: $fn\n"; while (<$f>) { if (/(QSL|VIA)/i) { my ($freq, $call, $t, $comment, $by, @rest) = split /\^/; @@ -62,6 +66,7 @@ foreach my $year (sort readdir YEAR) { } } } + $f->close; } }