]> git.street.me.uk Git - andy/viking.git/blame - viking-remote
Fixing another implicit declaration.
[andy/viking.git] / viking-remote
CommitLineData
50a14534
EB
1#!/usr/bin/perl
2
3#
4# geo://wpname:cmnt@34.15,-118.15/topo=/somedir,aerial=/someotherdir
5#
6
7die "Usage: viking-remote uri\n" if ( $#ARGV < 0 );
8
9if ( $ARGV[0] eq "debug" ) {
10 $DEBUG = 1;
11 shift @ARGV;
12} else {
13 $DEBUG = 0;
14}
15
16($ARGV[0] =~ m<(geo:)?/*([^/]*)(/(.*))?>) or die "Bad URI";
17$loc = $2;
18$extras = $4;
19
20if ( $loc =~ /^(GC[0-9A-Z]+)$/ ) {
21 $gc = $loc;
22 $loc=`gcfetchtxt http://www.geocaching.com/seek/cache_details.aspx?wp=$loc|head -2|tail +2`;
23}
24
25# have a lot of fun...
26