X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fwwv.pl;h=988b760a6446fcfa0161efc0a0b13710ca6a729e;hb=f47bc72134852f42fe03ab6afe91a9ba1b0ff705;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/show/wwv.pl b/cmd/show/wwv.pl index e69de29b..988b760a 100644 --- a/cmd/show/wwv.pl +++ b/cmd/show/wwv.pl @@ -0,0 +1,37 @@ +# +# print out the wwv stats +# +# Copyright (c) 1998 - Dirk Koopman G1TLH +# +# $Id$ +# +my $self = shift; + +my $cmdline = shift; +my @f = split /\s+/, $cmdline; +my $f; +my @out; +my ($from, $to); + +$from = 0; +while ($f = shift @f) { # next field + # print "f: $f list: ", join(',', @list), "\n"; + if (!$from && !$to) { + ($from, $to) = $f =~ /^(\d+)-(\d+)$/o; # is it a from -> to count? + next if $from && $to > $from; + } + if (!$to) { + ($to) = $f =~ /^(\d+)$/o; # is it a to count? + next if $to; + } +} + +$from = 1 unless $from; +$to = 5 unless $to; + +push @out, $self->msg('wwv3'); +my @in = Geomag::search($from, $to, $main::systime); +for (@in) { + push @out, Geomag::print_item($_); +} +return (1, @out);