| Overview | Downloads | Quick Start Guide | Installation Guide | API Docs | SourceForge Project |
Installation may be as easy as unpacking the latest release to a local directory, cd'ing to the bin directory, and running the 'mgfind' script. Make sure you have a J2SE 1.4 compatible JVM. For using the Google and Amazon plugins, you'll need to register for a developer's key. For the Mozilla plugin, you can download mozilla plugin files.
See the install guide for more detailed instructions.
The main script to run is mgfind. You must specify a plugin
class using the -plugin option. The config/client.properties file
allows use to specify default paramters for convenience, and comes with
some examples of appropriate values to use. Arguments to the mgfind script
are specified using the format: -x y. Arguments that are
specific to the plugin are specified using the format: --x y.
More information can be obtained by using the -help or
--help argument.
From the command-line, run mgfind, using the
following arguments:
| -plugin |
The plugin class or registered name (see client.properties).
The following plugins come with the distribution:
google, amazon, or mozilla.
You can specify as many plugins as you wish, separated by colons (:).
In this case, you may need to specify arguments to the plugins using their
fully qualified name, e.g. |
| -format |
The format template to use for the results.
For example, specifying html will use the
$MOONGLOW_HOME/templates/html.vm template, etc.
Other good values are text, and csv.
To customize your own template, simply create a file in
the templates directory, e.g. bob.vm, and
use -format bob. See the
template writing guide
for more information.
|
| -exec |
Execute a process on each result item. Important: in UNIX,
you'll need to escape '$', e.g. -exec "echo \$item.title".
The best way to do this is to create a script to do what you'd like
and then call it from the -exec argument, e.g. on UNIX:
-exec "/bin/sh myscript.sh",
or on Windows: -exec "cmd /c myscript.bat".
The exec argument is formatted as a velocity context, giving you access
to the details of the item currently being processed, so you can do something
like this: |
| -exec:before, -exec:after |
Same as -exec, except executed before and after the items are
individually processed. The $items variable is available
in the Velocity context, representing all items. Also
$count is the number of items.
|
| -formatter | The class of the results formatter. Default is Velocity, so you'll probably not have a need to set this unless you wish to use a custom formatter. |
-? or -help |
Display usage message |
Each plugin will require certain parameters to be set. Specifying
the --help option will display the plugin's usage, for example:
mgfind -plugin google --help
If you use the same plugin every time, open the file config/client.properties,
where you can specify a default value by setting the console.plugin property.
In that file you can also specify default parameters for each plugin, for example:
amazon.keyword=forklifts
(for Windows:) mgfind ... > output.html
start iexplore output.html