7 my ($self, $line) = @_;
8 my @list = split /\s+/, $line; # split the line up
14 my ($fromday, $today);
23 while ($f = shift @list) { # next field
24 # print "f: $f list: ", join(',', @list), "\n";
26 ($from, $to) = $f =~ /^(\d+)-(\d+)$/o; # is it a from -> to count?
27 next if $from && $to > $from;
30 ($to) = $f =~ /^(\d+)$/o if !$to; # is it a to count?
33 if (lc $f eq 'on' && $list[0]) { # is it freq range?
35 my @r = split '/', $list[0];
36 # print "r0: $r[0] r1: $r[1]\n";
37 my @fr = Bands::get_freq($r[0], $r[1]);
38 if (@fr) { # yup, get rid of extranous param
39 # print "freq: ", join(',', @fr), "\n";
41 push @freq, @fr; # add these to the list
45 if (lc $f eq 'day' && $list[0]) {
47 ($fromday, $today) = split '-', shift(@list);
50 if (lc $f eq 'info' && $list[0]) {
55 if ((lc $f eq 'spotter' || lc $f eq 'by') && $list[0]) {
56 # print "got spotter\n";
57 $spotter = uc shift @list;
69 # first deal with the prefix
71 $pre .= '*' unless $pre =~ /[\*\?\[]/o;
72 $pre = shellregex($pre);
73 $expr = "\$f1 =~ m{$pre}o";
75 $expr = "1"; # match anything
78 # now deal with any frequencies specified
80 $expr .= ($expr) ? " && (" : "(";
82 for ($i = 0; $i < @freq; $i += 2) {
83 $expr .= "(\$f0 >= $freq[$i] && \$f0 <= $freq[$i+1]) ||";
92 $expr .= " && " if $expr;
93 $info =~ s{(.)}{"\Q$1"}ge;
94 $expr .= "\$f3 =~ m{$info}io";
99 $expr .= " && " if $expr;
100 $spotter = shellregex($spotter);
101 $expr .= "\$f4 =~ m{$spotter}o";
106 $expr .= " && " if $expr;
107 $expr .= "\$f3 =~ m{(QSL|VIA)}io";
110 #print "expr: $expr from: $from to: $to fromday: $fromday today: $today\n";
113 my @res = Spot::search($expr, $fromday, $today, $from, $to);
116 foreach $ref (@res) {
118 push @out, Spot::formatl(@dx);