From 3e35c88834507a81f0086fa83a6e03e260c22d7f Mon Sep 17 00:00:00 2001 From: minima Date: Fri, 7 Mar 2003 20:40:36 +0000 Subject: [PATCH] first cut of localqsl --- cmd/load/db.pl | 8 ++++++++ perl/create_localqsl.pl | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 cmd/load/db.pl 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; } } -- 2.43.0