#!/usr/local/bin/perl
# Title: SpaceTrack
# Author: T. R. Wyant
# Date: 07-Mar-2005
# Remarks:
# This Perl script is just a really simple encapsulation
# of the Astro::SpaceTrack shell subroutine. Note that the
# command line arguments are passed, so you can do things
# like
# $ perl SpaceTrack 'set username me password secret'
# followed by whatever commands you like at the SpaceTrack
# prompt.
use strict;
our $VERSION = '0.015';
use Astro::SpaceTrack qw{shell};
my %opt = (
filter => 0,
);
GetOptions (\%opt, qw{filter}) or die <<eod;
SpaceTrack - Retrieve orbital elements from the Space Track database.
usage: SpaceTrack [option] [command ...]
with the only legal option being
-filter
to supress all output to stdout except orbital data.
eod
my $st = Astro::SpaceTrack->new (filter => $opt{filter});
$st->shell (@ARGV);
__END__
=head1 NAME
SpaceTrack - Perl application to fetch satellite orbit data.
=head1 SYNOPSIS
This application provides a command-line interface to the
Astro::SpaceTrack module, based on the Astro::SpaceTrack::shell
subroutine.
This gives you interactive access to all Astro::SpaceTrack methods,
plus pseudo output redirection (with tilde expansion) if you want your
output to go to a file.
Commands can be passed in on the command line. After all command-line
commands have been processed, you get an interactive prompt unless one
of the command-line commands was 'exit'. Beginning with 0.014, commands
can also be piped in, or redirected in from a file.
The one and only option is -filter, which sets the 'filter' attribute
of the Astro::SpaceTrack object. This prevents informational output
(such as the banner and 'OK' messages) to stdout. The idea is that
with -filter asserted, you can pipe the output to another program,
and only have orbital elements written to the pipe.
Please see L<Astro::SpaceTrack> for the details.
=head1 MODIFICATIONS
(no version) T. R. Wyant
initial release.
0.013 25-Nov-2005 T. R. Wyant
Added version.
Added POD.
0.014 28-Jan-2006 T. R. Wyant
Added and documented -filter.
0.015 20-Feb-2006 T. R. Wyant
Removed redundant front matter.
=head1 ACKNOWLEDGMENTS
The author wishes to thank Dr. T. S. Kelso of
(whose names are unfortunately unknown to me) for their co-operation,
assistance and encouragement in the development of the Astro::SpaceTrack
module.
=head1 AUTHOR
Thomas R. Wyant, III (F<wyant at cpan dot org>).
=head1 COPYRIGHT
Copyright 2005, 2006 by Thomas R. Wyant, III
(F<wyant at cpan dot org>). All rights reserved.
This script is free software; you can use it, redistribute it
and/or modify it under the same terms as Perl itself.
The data obtained by this script is subject to the Space
This software is provided without any warranty of any kind, express or
implied. The author will not be liable for any damages of any sort
relating in any way to this software.
=cut