2 # Show total HF DX Spot Stats per day
4 # Copyright (c) 2001 Dirk Koopman G1TLH
9 my ($self, $line) = @_;
10 my @f = split /\s+/, $line;
12 my $now = Julian::Day->new(time())->sub(31);
16 # generate the spot list
17 for ($i = 0; $i < $days; $i++) {
18 my $fh = $Spot::statp->open($now); # get the next file
21 $fh = $Spot::statp->open($now);
26 next unless $l[0] eq 'TOTALS';
38 push @out, $self->msg('stathf', cldate(time));
39 push @out, sprintf "%6s|%6s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|", qw(Date Total 160m 80m 60m 40m 30m 20m 17m 15m 12m 10m);
40 foreach my $ref (@in) {
42 foreach my $j (4..13) {
43 $tot[$j] += $ref->[$j];
44 $tot[0] += $ref->[$j];
45 $linetot += $ref->[$j];
47 my $date = $ref->[0]->as_string;
49 push @out, join '|', sprintf("%6s|%6d", $date, $linetot), map {$_ ? sprintf("%5d", $_) : ' '} @$ref[4..13], "";
51 push @out, join '|', sprintf("%6s|%6d", 'Total', $tot[0]), map {$_ ? sprintf("%5d", $_) : ' '} @tot[4..13], "";