X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fimportkeps.pl;h=11a267b02943ae2051f4862b8d74915bd0329e54;hb=dc397f24d7242cf3ccdb87a3e1467963c58fa2f9;hp=fe3cc1142fb940a643c63345b12a2caefbcd3aff;hpb=45495d980ec748f19509c7668d6b92a06f216ed7;p=spider.git diff --git a/perl/importkeps.pl b/perl/importkeps.pl index fe3cc114..11a267b0 100644 --- a/perl/importkeps.pl +++ b/perl/importkeps.pl @@ -5,7 +5,7 @@ # # Copyright (c) 2004 Dirk Koopman G1TLH # -# $Id$ +# # use strict; @@ -22,7 +22,7 @@ BEGIN { unshift @INC, "$root/local"; } - +my $fromcall = shift || 'G1TLH'; my $inp; { local $/ = undef; @@ -44,12 +44,13 @@ exit(0); sub process { # chop off most of the beginning - return unless $inp =~ s/^.*SB\s+KEPS\s+\@\s+AMSAT\s+\$ORB\d{5}\.\w/SB ALL/s; + return unless $inp =~ s/^.*SB\s+KEPS\s+\@\s+AMSAT\s+\$ORB\d{5}\.\w/SB ALL < $fromcall/s; return unless $inp =~ s/2Line\s+Orbital\s+Elements/2Line Keps/; # open the output file in the data area my $fn = "$root/tmp/keps.txt.$$"; open OUT, ">$fn" or die "$fn $!"; + chmod 0666, $fn; print OUT $inp; close OUT;