]> dxcluster.net Git - spider.git/commitdiff
first cut of localqsl
authorminima <minima>
Fri, 7 Mar 2003 20:40:36 +0000 (20:40 +0000)
committerminima <minima>
Fri, 7 Mar 2003 20:40:36 +0000 (20:40 +0000)
cmd/load/db.pl [new file with mode: 0644]
perl/create_localqsl.pl

diff --git a/cmd/load/db.pl b/cmd/load/db.pl
new file mode 100644 (file)
index 0000000..4ccb4b8
--- /dev/null
@@ -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');
index 2d3fc57e6fa0c7772a78f4bd4019e36f26e3221c..14693d63f21e13c140d8e769cd8e8ea22167bc59 100755 (executable)
@@ -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;
        }
 }