projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix help
[spider.git]
/
cmd
/
show
/
dx.pl
diff --git
a/cmd/show/dx.pl
b/cmd/show/dx.pl
index 6d9ad3add54c47abae7c2203a57dc05b52a91d25..bfeabf4c7216479b7052f3e28c068e58ff1f40df 100644
(file)
--- a/
cmd/show/dx.pl
+++ b/
cmd/show/dx.pl
@@
-20,8
+20,9
@@
my $info;
my $expr;
my $hint;
my $dxcc;
my $expr;
my $hint;
my $dxcc;
+my $real;
my $fromdxcc;
my $fromdxcc;
-my ($doqsl, $doiota, $doqra);
+my ($doqsl, $doiota, $doqra
, $dofilter
);
while ($f = shift @list) { # next field
# print "f: $f list: ", join(',', @list), "\n";
while ($f = shift @list) { # next field
# print "f: $f list: ", join(',', @list), "\n";
@@
-37,6
+38,10
@@
while ($f = shift @list) { # next field
$dxcc = 1;
next;
}
$dxcc = 1;
next;
}
+ if (lc $f eq 'rt' || $f =~ /^real/i) {
+ $real = 1;
+ next;
+ }
if (lc $f eq 'on' && $list[0]) { # is it freq range?
# print "yup freq\n";
if ($list[0] =~ m|^(\d+)(?:\.\d+)?[-/](\d+)(?:\.\d+)?$|) {
if (lc $f eq 'on' && $list[0]) { # is it freq range?
# print "yup freq\n";
if ($list[0] =~ m|^(\d+)(?:\.\d+)?[-/](\d+)(?:\.\d+)?$|) {
@@
-74,6
+79,10
@@
while ($f = shift @list) { # next field
}
next;
}
}
next;
}
+ if (lc $f =~ /^filt/) {
+ $dofilter = 1;
+ next;
+ }
if (lc $f eq 'qsl') {
$doqsl = 1;
next;
if (lc $f eq 'qsl') {
$doqsl = 1;
next;
@@
-82,7
+91,7
@@
while ($f = shift @list) { # next field
my ($a, $b);
# $DB::single =1;
my ($a, $b);
# $DB::single =1;
- if ($list[0] && (($a, $b) = $list[0] =~ /(AF|AN|NA|SA|EU|AS|OC)-?(\d?\d\d)/oi)) {
+ if (
@list &&
$list[0] && (($a, $b) = $list[0] =~ /(AF|AN|NA|SA|EU|AS|OC)-?(\d?\d\d)/oi)) {
$a = uc $a;
$doiota = "\\b$a\[\-\ \]\?$b\\b";
shift @list;
$a = uc $a;
$doiota = "\\b$a\[\-\ \]\?$b\\b";
shift @list;
@@
-91,7
+100,7
@@
while ($f = shift @list) { # next field
next;
}
if (lc $f eq 'qra') {
next;
}
if (lc $f eq 'qra') {
- $doqra = uc shift @list if $list[0] =~ /[A-Z][A-Z]\d\d/oi;
+ $doqra = uc shift @list if
@list &&
$list[0] =~ /[A-Z][A-Z]\d\d/oi;
$doqra = '\b([A-Z][A-Z]\d\d|[A-Z][A-Z]\d\d[A-Z][A-Z])\b' unless $doqra;
next;
}
$doqra = '\b([A-Z][A-Z]\d\d|[A-Z][A-Z]\d\d[A-Z][A-Z])\b' unless $doqra;
next;
}
@@
-148,7
+157,9
@@
if (@freq) {
for ($i = 0; $i < @freq; $i += 2) {
$expr .= "(\$f0 >= $freq[$i] && \$f0 <= $freq[$i+1]) ||";
my $r = Spot::ftor($freq[$i], $freq[$i+1]);
for ($i = 0; $i < @freq; $i += 2) {
$expr .= "(\$f0 >= $freq[$i] && \$f0 <= $freq[$i+1]) ||";
my $r = Spot::ftor($freq[$i], $freq[$i+1]);
- $hint .= "m{$r\\.} ||" if $r;
+# $hint .= "m{$r\\.} ||" if $r;
+# $hint .= "m{\d+\.} ||";
+ $hint .= "1 ||";
}
chop $expr; chop $expr;
chop $hint; chop $hint;
}
chop $expr; chop $expr;
chop $hint; chop $hint;
@@
-235,11
+246,15
@@
if ($doqra) {
#print "expr: $expr from: $from to: $to fromday: $fromday today: $today\n";
# now do the search
#print "expr: $expr from: $from to: $to fromday: $fromday today: $today\n";
# now do the search
-my @res = Spot::search($expr, $fromday, $today, $from, $to, $hint);
+my @res = Spot::search($expr, $fromday, $today, $from, $to, $hint
, $dofilter ? $self : undef
);
my $ref;
my @dx;
foreach $ref (@res) {
my $ref;
my @dx;
foreach $ref (@res) {
- push @out, Spot::formatl(@$ref);
+ if ($real) {
+ push @out, $self->format_dx_spot(@$ref);
+ } else {
+ push @out, Spot::formatl(@$ref);
+ }
}
return (1, @out);
}
return (1, @out);