X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcreate_qsl.pl;h=38fccc5a959e3c4af3ed6f8c979f7aa061670bb4;hb=dd73f6f34ce7f3e142e480dfb7153611d87f509b;hp=b3e514de244989bb9ae366cc3d5bea8f581da72e;hpb=25270ac4d9d486c2749515c8b8f32e223d4f38b7;p=spider.git diff --git a/perl/create_qsl.pl b/perl/create_qsl.pl index b3e514de..38fccc5a 100755 --- a/perl/create_qsl.pl +++ b/perl/create_qsl.pl @@ -1,10 +1,10 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # # Implement a 'GO' database list # # Copyright (c) 2003 Dirk Koopman G1TLH # -# $Id$ +# # # search local then perl directories @@ -22,7 +22,7 @@ BEGIN { use strict; use IO::File; -use DXVars; +use SysVar; use DXUtil; use Spot; use QSL; @@ -32,15 +32,14 @@ use vars qw($end $lastyear $lastday $lasttime); $end = 0; $SIG{TERM} = $SIG{INT} = sub { $end++ }; -my $qslfn = "qsl"; +my $qslfn = "dxqsl"; $main::systime = time; -unlink "$root/data/qsl.v1"; - +QSL::remove_files(); QSL::init(1) or die "cannot open QSL file"; -my $base = "$root/data/spots"; +my $base = localdata("spots"); opendir YEAR, $base or die "$base $!"; foreach my $year (sort readdir YEAR) { @@ -56,6 +55,7 @@ foreach my $year (sort readdir YEAR) { my $f = new IO::File $fn or die "$fn ($!)"; print "doing: $fn\n"; while (<$f>) { + last if $end; if (/(QSL|VIA)/i) { my ($freq, $call, $t, $comment, $by, @rest) = split /\^/; my $q = QSL::get($call) || new QSL $call; @@ -64,7 +64,9 @@ foreach my $year (sort readdir YEAR) { } } $f->close; + last if $end; } + last if $end; } QSL::finish();