External Command Step

From Okapi Framework
Jump to navigation Jump to search

Overview

This step runs a given external command on a raw document.

Takes: Raw document. Sends: Raw document.

Parameters

Command line — Enter the command-line to use. The command line must use the input and output provided through the variables ${inputPath} and ${outputPath}.

You can use the following variables in the command line (variable names are case-sensitive):

Variable Description Example
${inputPath} The full path of the input document.
${outputPath} The full path of the output document.
${srcLangName} English name of the language part of the source locale identifier. For "de-ch" this returns "German".
${trgLangName} English name of the language part of the target locale identifier. For "ja-jp" this returns "Japanese".
${srcLang} Code of the language part of the source locale identifier. For "de-ch" this returns "de".
${trgLang} Code of the language part of the target locale identifier. For "ja-jp" this returns "ja".
${srcBCP47} (From M37) BCP-47 language tag of the source locale identifier. For "de-CH" this returns "de-CH".
${trgBCP47} (From M37) BCP-47 language tag of the target locale identifier. For "ja-JP" this returns "ja-JP".
${rootDir} The root directory for this project/batch. In Rainbow: the parameters folder.

Example: The following Windows command sorts the input files and create the corresponding output files.

cmd /C "sort ${inputPath} /O ${outputPath}"

Timeout — Enter the number of seconds after which the command must be timeout. Enter -1 for no timeout.

Limitations

None known.