Command Line

Contents

Maperitive has several command-line options which mostly help in Scripting (TODO). Here is the brief description of the command-line options format:

Maperitive [options] [script 1 file] [script 2 file] ... [script N file]

Options

Specifying custom scripts to run

You can specify one or more of scripts you want to run when Maperitive starts. The scripts will run in the order specified, so for example

Maperitive script1.mscript script2.mscript script3.mscript

will run script1.mscript, then script2.mscript and finally script3.mscript.

Displaying help information

OPTION: -? | -h | -help

DESCRIPTION: Displays the command-line help in Maperitive.

Enabling/disabling the default script

Normally Maperitive starts its work by running the default script (stored in the Scripts/default.mrules file). You can modify this behavior using the following option:

OPTION: -defscr | -defaultscript

VALUE: true or false (if the value is omitted, true will be used).

DESCRIPTION: Specifies whether to run the default script or not. By default, the default script is run if no other scripts are specified. If one or more user scripts are specified, the default script will not be run unless this option is turned on.

EXAMPLES:

Maperitive -defaultscript=false

Starts Maperitive but it does not run the default script.

Maperitive myscript.mscript

Starts Maperitive by running myscript.mscript. In this case the default script will not be run.

Maperitive -defaultscript myscript.mscript

Starts Maperitive by first running the default script and then the myscript.mscript.

Automatically closing Maperitive after scripts have finished

If you want to have a complete automation with your scripts, you probably want Maperitive to close itself after it finishes running the scripts. This is achieved using the following option:

OPTION: -exa | -exitafter

VALUE: true or false (if the value is omitted, true will be used).

DESCRIPTION: Specifies whether Maperitive should exit upon finishing running scripts. By default Maperitive will remain running.

EXAMPLE:

Maperitive -exitafter myscript.mscript

Instructs Maperitive to run the myscript.mscript script and then to close.

Disabling the application update check

On startup Maperitive occasionally checks if there is an updated version of the application by contacting the update server. You can disable this update check using the following option:

OPTION: -upd | -update

VALUE: true or false (if the value is omitted, true will be used).

DESCRIPTION: Specifies whether Maperitive should check if a new version is available when it starts. By default Maperitive will check for new versions.

EXAMPLE:

Maperitive -update=false

Instructs Maperitive to disable checking for new versions.