pos2gpx,pos2kml: stdin-update

pull/13/head
Zilog80 2017-03-03 12:49:27 +01:00
rodzic e665577a17
commit f725c79e44
2 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -4,7 +4,12 @@ use warnings;
my $filename = $ARGV[0];
my $fh;
open($fh, $filename) or die "Could not open $filename: $!";
if (defined $filename) {
open($fh, "<", $filename) or die "Could not open $filename: $!";
}
else {
$fh = *STDIN;
}
print "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n";
print "<gpx version=\"1.1\" creator=\"me\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.topografix.com/GPX/1/1\" xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd\">\n";

Wyświetl plik

@ -4,7 +4,12 @@ use warnings;
my $filename = $ARGV[0];
my $fh;
open($fh, $filename) or die "Could not open $filename: $!";
if (defined $filename) {
open($fh, "<", $filename) or die "Could not open $filename: $!";
}
else {
$fh = *STDIN;
}
print "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
print "<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n";