You can call InterMapper RemoteAccess from a command line, and control a significant number of functions. This can be useful for automating the updating of maps, or for various testing purposes.
InterMapper RemoteAccess currently supports the following command-line arguments:
To import to a specified server, IM Remote is invoked as follows:
java -jar <jar-file> --host <intermapper-server> [--user <username> --pass <password>] --import <import-file>
The example below reads imported data from newdata.tab.
java -jar intermapper_remoteaccess.jar --host big.dartware.com --user admin --pass adminpw --import newdata.tab
The example below reads imported data from stdin.
java -jar intermapper_remoteaccess.jar --host big.dartware.com --user admin --pass adminpw --import -
The stdin form of the --import option allows Unix users to create self-contained executable files that import stuff:
#!/usr/bin/java -jar intermapper_remoteaccess.jar --host big.dartware.com --import -
#import blah blah blah
blah blah blah
blah blah blah
One use for this would be to automate testing of InterMapper Server.
To export from a specified server, IM Remote is invoked as follows:
java -jar <jar-file> --host <intermapper-server> [--user <username> --pass <password>] \ --export "format=<output-type> table=<table-name> fields=<field-list>
The example below writes exported data to stdout.
java -jar intermapper_remoteaccess.jar --host big.dartware.com --user admin --pass adminpw --export "format=tab table=devices fields=*"