GPSBabel and Geocaching.com

Automating Downloads

Background

When a web server sends data to your web browser, it gives the
browser a hint what to do with that data. It does this by encoding
a file type on each connection. For common web pages, a header of
"text/html" tells the browser that it should format the bytes as an
HTML web page and display it. Additional types can be added; that's
how the browsers know to open your favorite media player when you
click on an animation, for example.

When you select 'download' from the
Geocaching site it will send you the coordinates with a type of
"application/xml-loc". If we teach your browser to associate
GPSBabel with that type, you can download waypoints into your
receiver or favorite map program with no additional steps.

Browser Voodoo

All browsers will be a little different. I'm listing instructions
for Mozilla 1.3 because that's what I have within reach right now,
but all browsers that I've seen have similar steps.

Figure out what you want to do

It sounds silly, but spend a few moments to consider what you
want to do. Do you want to shoot the waypoints to a Garmin on
COM1:? Do you want to send a prinout of them to a printer? Maybe
you want to squirt them directly into your favorite mapping
program. Now build a command line to call GPSBabel to do that. If
you want to do some combination of these, consider a bit of
scripting (batch files or whatever your OS offers) to do the heavy
lifting.

Tell your browser about it

Find the place in your browser where MIME types are associated with
programs. For Mozilla, this is
Edit->Preferences->Navigator->Helper Applications. Select
a New Type. Choose a Mime type of "application/xml-loc" For the
application to use, enter the complete GPSBabel invocation;
probably substituting "%s" where the input file name goes, though
this is technically browser-specific. For example, to upload to a
Magellan on COM1: under Windows, I might enter:

gpsbabel -s -i geo -f %s -o magellan -F com1:

Hammer Time

Now when you visit a Geocaching page with download boxes, you can
check the boxes and click "Download to EasyGPS" and get a new
behaviour. Instead of your browser popping open the "Save As"
dialogue; it should invoke the command you just entered above. THis
works for benchmarks, too.

Epilogue

I am not a browser jock. I don't know how to configure every
browser on the planet. If you need help configuring your browser,
ask in an appropriate forum for whatever browser you use.