3 # Implement a 'GO' database list
5 # Copyright (c) 2003 Dirk Koopman G1TLH
10 # search local then perl directories
14 # root of directory tree for this system
16 $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
18 unshift @INC, "$root/perl"; # this IS the right way round!
19 unshift @INC, "$root/local";
30 use vars qw($end $lastyear $lastday $lasttime);
33 $SIG{TERM} = $SIG{INT} = sub { $end++ };
37 $main::systime = time;
40 QSL::init(1) or die "cannot open QSL file";
42 my $base = localdata("spots");
44 opendir YEAR, $base or die "$base $!";
45 foreach my $year (sort readdir YEAR) {
46 next if $year =~ /^\./;
48 my $baseyear = "$base/$year";
49 opendir DAY, $baseyear or die "$baseyear $!";
50 foreach my $day (sort readdir DAY) {
51 next unless $day =~ /(\d+)\.dat$/;
54 my $fn = "$baseyear/$day";
55 my $f = new IO::File $fn or die "$fn ($!)";
60 my ($freq, $call, $t, $comment, $by, @rest) = split /\^/;
61 my $q = QSL::get($call) || new QSL $call;
62 $q->update($comment, $t, $by);