|
Previous Next . Contents |
About . Documentation . License . Download |
The command mode is selected by starting P18 using the command name ``p18'' (without specifying any input files), or by specifying the commandline option ``-m command''.
The run mode is selected by starting P18 using the command name ``p18run'', by using the command name ``p18'' and specifying at least one input file, or by specifying the commandline option ``-m run''.
The command mode is selected by starting P18 using the command name ``p18scan'', or by specifying the commandline option ``-m scan''.
The command mode is selected by starting P18 using the command name ``p18loc'', or by specifying the commandline option ``-m locate''.
The P18 program accepts the following commandline options:
| -m|--mode mode | |
| Specify the operation mode. If the operation mode is specified using this option, then it has to be the first option to be passed to the program. | |
| -P|--pipe | |
| Operate in pipe mode. In pipe mode, all preprocessor output is sent to the standard output. If multiple input files are specified, the output is the concatenation if all processed files. If pipe mode is selected and no input files are specified, the input is read from the standard input. It is possible to combine the pipe mode with the operation modes run, scan, and locate. | |
| -D|--define name or -D|--define name=value | |
| Define a preprocessor variable or macro named name. If the value is omitted, the variable name is defined to the string "1" (which is interpreted as TRUE if evaluated as a condition). | |
| -c|--config filename | |
| Specify a configuration file. The configuration file is read as the option is processed. It is possible to specify multiple configuration files. If no configuration file is specified, P18 will look for a file named ``p18.conf'' in the current working directory. If present, a reglar file, and readable, that file is read as a configuration file. See section Configuration for a description of the configuration file format. | |
| -f|--source filename | |
| Read and execute a list of P18 commands from the specified file. The file is read as the option is processed. It is possible to specify multiple command files. See section Commands for a description of the P18 command syntax. | |
| -s|--config-status filename | |
| Specify the path to a GNU Autoconf config.status file. The substitution variables defined in the config.status file are defined as P18 variables. The file is read as the option is processed. It is possible to specify multiple config.status files. | |
| -i|--input filename | |
| Specify a single input file. It is possible to specify multiple input files. | |
| -I|--input-path dirname | |
| Specify an input directory.
All files in the specified directory are processed (depending on the
specified operation mode). It is possible to specify multiple input
directories. Note: If P18 is invoked in command mode, all specified input files and input directories are available through the input object named ``ARGS''. See section Configuration for a description of input objects. | |
| -h|--help | |
| Display a short help screen and exit. | |
| -v|--verbose | |
| Verbose operation. | |
| -V|--version | |
| Display the program version and exit. | |
| -q|--quit | |
| Quit after processing the commandline. This option is useful in combination with the -f option, e.g. if you want to run some P18 commands from a file and the exit before entering the command loop. | |
The following options are recognized if P18 is invoked in run mode or in command mode:
| -O|--output-path dirname | |
| Specify an output path. Note that an output path specified through this option never overrides an output path specified for an input object. See section Configuration for a description of input objects. | |
| -l|--language language | |
| Specify the output language. | |
The following options are recognized if P18 is invoked in scan mode:
| -a|--approx | |
| Scan using approximate matching. If this
option is specified, the scan command will look for similar
messages. If a message in one of the input files is similar to a message in
the message database or a message found earlier in the scan process, a
notification message is generated.
You can use the approximate matching feature to find typos or messages that are so similar that they may unified. There is currently no way to specify a `distance threshold' for two messages to be considered similar. P18 derives such a threshold value from the length of each message. | |
| -C|--commands filename | |
| Generate a commands file containing a list of P18 commands for inserting the new messages into the message database. You can execute the commands script using the P18 source command or the P18 -f option. | |
| -x|--execute | |
| Insert all messages found into the current translation database. This is roughly equivalent to writing the commands to a file and then sourceing the contents of that file. | |
| -l|--language language | |
| Specify the language to scan for. It is an error if no language is specified. | |
| -o|--output-file filename | |
| Specify an output filename. This causes the scan results to be written to the specified file instead of the standard output. | |
The following options are recognized if P18 is invoked in locate mode:
| -a|--approx | |
| Locate messages approximate matching. If this
option is specified, all messages similar to the specified message are
reported. Approximate matching is done only for messages specified using
message IDs (-d option).
You can use the approximate matching feature to find typos or messages that are so similar that they may unified. There is currently no way to specify a `distance threshold' for two messages to be considered similar. P18 derives such a threshold value from the length of each message. | |
| -p|--pattern pattern | |
| Specify a reglar expression for locating messages. The locate command will report all messages matching the specified reglar expression. | |
| -d|--id id | |
| Specify a message ID. The locate command will report all occurences of the corresponding messages. This option may be combined with the -a option to look for similar messages. | |
| -l|--language language | |
| Specify the language to look for. If this option is specified, only messages of the specified language are scanned. If this option is omitted, messages of all languages are scanned. | |
| -t|--type type | |
| Specify the type of messages to look for. If this option is specified, only messages of the specified type are scanned. If the option is omitted, messages of all types are scanned. | |
| -o|--output-file filename | |
| Specify an output filename. This causes the scan results to be written to the specified file instead of the standard output. | |
|
Previous Next . Contents |
About . Documentation . License . Download |