GeoDB::Export::System.3pm

Langue: en

Version: 2008-11-19 (fedora - 05/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

System - run system commands on each cache or on a file

DESCRIPTION

START HELP

There are two ways to use the system export mechanism:

Run a system command for cache:
   > geoqo -s 'cache:name=cool cache' -e 'system:cmd=echo %{ident} %{desc}'
 
 

That command runs echo for each cache in the set, replacing %{ident} and %{desc} with the fields from those caches.

Useful things to do for this would be to open firefox (a web browser) on each cache page:

   > geoqo -s 'cache:name=cool cache' -e 'system:cmd=firefox %{url}'
 
 
Run a system command
You can also run a command on a file generated by an export module. As an example, the following command will call gpsbabel to convert a gpx file to a tomtom compatible file:
   > geoqo -s 'cache:name=cool cache' -e 'system:cmd=gpsbabel -i gpx -f %{file:gpx} -o tomtom -F mycaches.ov2'
 
 

END HELP

Options:

The following options can be passed to the system exporter:

cmd=COMMAND
COMMAND is what gets run. If it contains a %{file:TYPE} string in it, that will be replaced with a file name of that type and it'll get run just once. If it doesn't, it'll get run once per cache in the set being processed and each %{token} specifier will get replaced by that item from the cache.
sleep=NUM
Between each command executed in the per-cache mode, geoqo will sleep for NUM seconds before running the next. It defaults to 1, and can be set to 0 to just fire them off as fast as possible.

AUTHOR

Wes Hardaker (AKA Yamar) <hardaker ATAT users.sourceforge.net>