add sh/fdx command.
authorminima <minima>
Fri, 9 Jan 2004 15:04:06 +0000 (15:04 +0000)
committerminima <minima>
Fri, 9 Jan 2004 15:04:06 +0000 (15:04 +0000)
Changes
cmd/Aliases
cmd/Commands_en.hlp
cmd/show/dx.pl
perl/DXCommandmode.pm

diff --git a/Changes b/Changes
index b307562c8ca5bed33c30beb8b78a6b247e705f3f..30bc46536f4813f305cc65ae7cc83ac30d01594c 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,8 @@
+09Jan04=======================================================================
+1. removed PC90 which was breaking various filtering things.
+2. added realtime spot formats to sh/dx (at least in basic form), this is
+activated by using either of the keywords 'real' of 'rt' on the command
+line. Also added sh/fdx as an alias.
 01Jan04=======================================================================
 1. move position of USDB init to get rid of an obscure bug pointed out by
 Charlie K1XX.
index 1f7218f3e392a9b70b746e6f6152a650986594cb..2b78d5d48f4900149c0834fc1e05452aaa6d8cfb 100644 (file)
@@ -123,6 +123,10 @@ package CmdAlias;
          '^sho?w?/dx/(\d+)-(\d+)', 'show/dx $1-$2', 'show/dx',
          '^sho?w?/dx/(\d+)', 'show/dx $1', 'show/dx',
          '^sho?w?/dx/d(\d+)', 'show/dx from $1', 'show/dx',
+         '^sho?w?/fdx/(\d+)-(\d+)', 'show/dx real $1-$2', 'show/fdx',
+         '^sho?w?/fdx/(\d+)', 'show/dx real $1', 'show/fdx',
+         '^sho?w?/fdx/d(\d+)', 'show/dx real from $1', 'show/fdx',
+         '^sho?w?/fdx', 'show/dx real', 'show/fdx',
          '^sho?w?/newc/n', 'show/newconfiguration node', 'show/newconfiguration',
          '^sho?w?/tnc', 'who', 'who',
       '^sho?w?/up', 'show/cluster', 'show/cluster',
index d565dfbd24216beef23678d967476d3a45af6e92..c20c42795c83b450b9b18d1de80f776dfd5d399a 100644 (file)
@@ -1907,7 +1907,13 @@ any order to the basic SHOW/DX command, they are:-
                   
                    You can also use this with the 'by' keyword so 
                    eg by W dxcc  
-   
+ real or rt        Format the output the same as for real time spots. The
+                   formats are deliberately different (so you can tell
+                   one sort from the other). This is useful for some 
+                   logging programs that can't cope with normal sh/dx 
+                   output. An alias of SHOW/FDX is available.
+       
  e.g. 
    
    SH/DX 9m0
@@ -1938,6 +1944,16 @@ This can be done with the SHOW/DX command like this:-
    SH/DX dxcc g
    SH/DX dxcc w on 20m iota
 
+This is an alias for: SH/DX dxcc
+
+=== 0^SHOW/FDX^Show the DX data in realtime format.
+Normally SHOW/DX outputs spot data in a different format to the
+realtime data. This is a deliberate policy (so you can tell the 
+difference between the two). Some logging programs cannot handle
+this so SHOW/FDX outputs historical data in real time format.
+
+This is an alias for: SHOW/DX real
+
 === 0^SHOW/DXSTATS [days] [date]^Show the DX Statistics
 Show the total DX spots for the last <days> no of days (default is 31), 
 starting from a <date> (default: today).
index f9d03f623dc0956676e068216691330e5bf03db7..57271e8f874a192713ee5e1ac5a1c731d3b50be2 100644 (file)
@@ -20,6 +20,7 @@ my $info;
 my $expr;
 my $hint;
 my $dxcc;
+my $real;
 my $fromdxcc;
 my ($doqsl, $doiota, $doqra);
 
@@ -37,6 +38,10 @@ while ($f = shift @list) {           # next field
                $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+)?$|) {
@@ -239,7 +244,11 @@ my @res = Spot::search($expr, $fromday, $today, $from, $to, $hint);
 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);
index 76bfa9314926046d12ed18a00a3221746f497b82..aa6f743d39d3657546cee962364193c26b4ac044 100644 (file)
@@ -824,24 +824,10 @@ sub chat
        $self->local_send('C', $buf);
 }
 
-# send a dx spot
-sub dx_spot
+sub format_dx_spot
 {
        my $self = shift;
-       my $line = shift;
-       my $isolate = shift;
-       my ($filter, $hops);
 
-       return unless $self->{dx};
-       
-       if ($self->{spotsfilter}) {
-               ($filter, $hops) = $self->{spotsfilter}->it(@_ );
-               return unless $filter;
-       }
-
-
-       dbg('spot: "' . join('","', @_) . '"') if isdbg('dxspot');
-       
        my $t = ztime($_[2]);
        my $loc;
        my $clth = $self->{consort} eq 'local' ? 29 : 30;
@@ -865,8 +851,27 @@ sub dx_spot
                $comment = substr($comment, 0,  $self->{consort} eq 'local' ? 26 : 27) . ' ' . $_[12] if $_[12]; 
        }
 
-       my $buf = sprintf "DX de %-7.7s%11.1f  %-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment;
+       return sprintf "DX de %-7.7s%11.1f  %-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment;
+}
+
+# send a dx spot
+sub dx_spot
+{
+       my $self = shift;
+       my $line = shift;
+       my $isolate = shift;
+       my ($filter, $hops);
+
+       return unless $self->{dx};
+       
+       if ($self->{spotsfilter}) {
+               ($filter, $hops) = $self->{spotsfilter}->it(@_ );
+               return unless $filter;
+       }
+
+       dbg('spot: "' . join('","', @_) . '"') if isdbg('dxspot');
        
+       my $buf = $self->format_dx_spot(@_);
        $buf .= "\a\a" if $self->{beep};
        $buf =~ s/\%5E/^/g;
        $self->local_send('X', $buf);