]>
Commit | Line | Data |
---|---|---|
50a14534 EB |
1 | #!/usr/bin/perl |
2 | ||
3 | # | |
4 | # geo://wpname:cmnt@34.15,-118.15/topo=/somedir,aerial=/someotherdir | |
5 | # | |
6 | ||
7 | die "Usage: viking-remote uri\n" if ( $#ARGV < 0 ); | |
8 | ||
9 | if ( $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 | ||
20 | if ( $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 |