#!/usr/bin/perl -w
# -*- perl -*-

#
# Author: Slaven Rezic
#
# Copyright (C) 2005,2009,2010 Slaven Rezic. All rights reserved.
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# Mail: slaven@rezic.de
# WWW:  http://www.rezic.de/eserte/
#

use strict;
use FindBin;
use lib ("$FindBin::RealBin/..",
	 "$FindBin::RealBin/../lib",
	);
use Getopt::Long;
use GPS::GpsmanData::Any;

sub usage () {
    die "usage: $0 [-symtocmt] [-skipcmt] file"
}

my $symtocmt;
my $skipcmt;
GetOptions(
	   "symtocmt" => \$symtocmt,
	   "skipcmt" => \$skipcmt,
	  )
    or usage;

my $file = shift || usage;
usage if (@ARGV);

my $self = GPS::GpsmanData::Any->load($file);
print $self->as_gpx(symtocmt => $symtocmt, skipcmt => $skipcmt);


__END__
