From: minima Date: Fri, 9 Jan 2004 15:04:06 +0000 (+0000) Subject: add sh/fdx command. X-Git-Tag: R_1_51B~45 X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=290cd395e4bac4a92dfc3c40a2a3fd7de93110eb add sh/fdx command. --- diff --git a/Changes b/Changes index b307562c..30bc4653 100644 --- 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. diff --git a/cmd/Aliases b/cmd/Aliases index 1f7218f3..2b78d5d4 100644 --- a/cmd/Aliases +++ b/cmd/Aliases @@ -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', diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index d565dfbd..c20c4279 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -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 no of days (default is 31), starting from a (default: today). diff --git a/cmd/show/dx.pl b/cmd/show/dx.pl index f9d03f62..57271e8f 100644 --- a/cmd/show/dx.pl +++ b/cmd/show/dx.pl @@ -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); diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 76bfa931..aa6f743d 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -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);