Saturday, February 16, 2008

gpx2ipod problem solved

One problem is solved on the quest for paperless perfection. I investigated the files that were being corrupted between the .gpx file and the Notes folder of the iPod, and I realized that any cache name containing a colon wasn't being handled properly. It appears to me that the gpx2ipod script was trying to fix the situation by replacing the colon with a slash, which seems like an odd choice, and then when these files went to the ipod, everything in the cache name before the slash was missing, and the body of the note was empty.

Out in the field I only look up caches by GC number, so I edited the script to write only the GC number, not the cache name, as the name of the note.

I replaced

cat - $tmpfile <<<$xmlpretext > "$outpath/$cacheid $name"

with

cat - $tmpfile <<<$xmlpretext > "$outpath/$cacheid"

Works like a charm. There is still the issue that the iPod doesn't like notes that are bigger than 4k. Not much of a problem, though; in my last pocket query of 500 caches, there were 12 files bigger than 4k.

No comments: