03Jun20=======================================================================
1. Make sure that all possible regexes get passed across to the search engine.
+2. Fix out of order logging on sh/log queries spanning more than one month.
+3. Do not read backwards on sh/dx, reading forwards seems a 1/3 quicker.
02Jun20=======================================================================
1. Fix the small whoopsie in sh/dx.
01Jun20=======================================================================
use Julian;
-our $readback = `which tac`;
+our $readback = 1;
+if ($readback) {
+ $readback = `which tac`;
+}
chomp $readback;
-undef $readback; # yet another reason not to use the cloud!
+#undef $readback; # yet another reason not to use the cloud!
use strict;
return "show/$name: ${s}not found";
}
- for (reverse @in) {
+ for (sort {$a <=> $b } @in) {
my @line = split /\^/ ;
push @out, print_item(\@line);
$totalspots = $hfspots = $vhfspots = 0;
$use_db_for_search = 0;
-our $usetac = 1;
-our $readback;
+our $readback = 0;
-if ($usetac) {
+if ($readback) {
$readback = `which tac`;
chomp $readback;
}
return $main::dbh->spot_search($hint, $dayfrom, $dayto, $to-$from, $dxchan);
}
-# $expr =~ s/\$f(\d\d?)/\$ref->[$1]/g; # swap the letter n for the correct field name
+ # $expr =~ s/\$f(\d\d?)/\$ref->[$1]/g; # swap the letter n for the correct field name
# $expr =~ s/\$f(\d)/\$spots[$1]/g; # swap the letter n for the correct field name
my @spots;
my $recs;
- for ($i = $count = 0; $count < $to && $i < $maxdays; ++$i) { # look thru $maxdays worth of files only
+ for ($i = $count = 0; $count < $to && $i < $maxdays; ++$i) { # look thru $maxdays worth of files only
last if $now->cmp($todate) <= 0;
my $fn = $fp->fn($now->sub($i));
if ($readback) {
dbg("Spot::search search using tac fn: $fn $i") if isdbg('search');
$fh = IO::File->new("$readback $fn |");
- } else {
+ }
+ else {
dbg("Spot::search search fn: $fp->{fn} $i") if isdbg('search');
- $fh = $fp->open($now->sub($i)); # get the next file
+ $fh = $fp->open($now->sub($i)); # get the next file
}
if ($fh) {
my $rec = 0;
return ("Spot search error", $@) if $@;
}
}
-
-
- return $readback ? @out : reverse @out;
+ @out = sort {$b->[2] <=> $a->[2]} @out if @out;
+ return @out;
}
# change a freq range->regular expression