X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fwwv.pl;h=fbb7fac32cb10705debe5979c2b513d71e276122;hb=f63d598af3f797b56b8d5e23ec4ff5254192eee9;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/show/wwv.pl b/cmd/show/wwv.pl index e69de29b..fbb7fac3 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 +# +# +# +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);