Scripting Examples for Mulitple Top10 Outputs

From Geoqo
(Difference between revisions)
Jump to: navigation, search
 
Line 9: Line 9:
 
   %search
 
   %search
 
   cache:owner_name==%[Owner]
 
   cache:owner_name==%[Owner]
 
+
 
   %display
 
   %display
 
   top10:groundspeak_container
 
   top10:groundspeak_container
 
+
 
   %display
 
   %display
 
   top10:groundspeak_difficulty
 
   top10:groundspeak_difficulty
 
+
 
   %display
 
   %display
 
   top10:groundspeak_terrain
 
   top10:groundspeak_terrain

Revision as of 00:09, 30 March 2007

brdad wanted to do this:

 I'd like to list the top ten cache placers, and for each of those placers, I'd like to have the stats for their placed caches.

Which can functionally be done with a script called multiple times. (ie, geoqo can't do exactly what he wants in one pass; there's a todo item!)

Create a script in $HOME/.geoqo/scripts/mytop10 that looks like:

 %search
 cache:owner_name==%[Owner]

 %display
 top10:groundspeak_container

 %display
 top10:groundspeak_difficulty

 %display
 top10:groundspeak_terrain

Then you can run the script on multiple people by hand:

 > geoqo -x mytop10:Owner=Spelunk
 Top 10 'groundspeak_container's
  Num    % Value
 ----------------------------------------------------------------------
    8   40 Small
    4   20 Regular
    4   20 Micro
    3   15 Other
    1    5 Not chosen
 Top 10 'groundspeak_difficulty's
  Num    % Value
 ----------------------------------------------------------------------
    7   35 1.5
    5   25 2
    4   20 3
    2   10 1
    1    5 4
    1    5 2.5
 Top 10 'groundspeak_terrain's
  Num    % Value
 ----------------------------------------------------------------------
    8   40 1
    6   30 1.5
    4   20 2
    2   10 2.5
Personal tools