|Top Previous Next|
A call of tetra_cl has the following form:
In the first case a call has the form:
tetra_cl -p PROJECT -m MANAGEMENT [-a]
and in the second case:
tetra_cl -p PROJECT -s SOURCE [-t TARGET] [-b BACKUP] [-c CONFIGURE] [-x EXTRA] [-a] [-r]
Parameter are specified by single letters preceded by a dash '-' and sometimes followed by a space and some text. Expressions in brackets are optional.
If a path contains spaces, it has to be quoted.
The parameter -p must be followed by the address of the TextTransformer project, by which the files of the source directory shall be transformed.
The parameter -m is followed by the address of the transformation manager project, which specifies the source and target files.
If an -m paramerter is provided, -s, -t and -r are ignored.
The parameter -s must be followed by a specification of the files, which shall be transformed.
In the simples case this a specification is an address of a single file, like "C:\dir\source.txt". To transform all "txt" files of a directory, you can use a mask like: "C:\dir\*.txt". If there is no directory specified in the mask, all files of the actually directory will be transformed; e.g.: "ab?.*" will chose all files of the actually directory beginning with "ab" followed by a single character and an arbitrary extension, e.g. "ab1.txt", "ab2.txt" and "ab_.bat"
The specification of a target is optional. If there is no, all source files will be overwritten by their transformed versions. You can specify a fully qualified file name or a name without directory. In the latter case, the transformed file will be written into the source directory. If there is specified a target directory without a file name, all transformed source files will be written into the target directory using their original names.
A backup directory is necessary, if at least one source file will be overwritten by a transformation. If no file will be overwritten, no backups are made.
tetra_cl -p exchange.ttp -s feuerbach.txt -b C:\Backup
"feuerbach.txt" will be overwritten by its transformed version. A backup of "feuerbach.txt" will be copied into "C:\Backup" before the transformation starts.
tetra_cl -p exchange.ttp -s feuerbach.txt -t bachfeuer.txt
The transformed version of "feuerbach.txt" will be written into "bachfeuer.txt" in the same actual directory.
tetra_cl -p exchange.ttp -s *.* -t ..\newdir
The transformed files will be written into the subdirectory "..\newdir". If this directory doesn't exist, it will be created automatically.
If there are several source files but only one target file, all results will be written into the single target file. This must be different from all source files.
Following on "-c", you can submit parameters as an identifier or string to the project, which are needed there before the start of any of the transformations. The parameter is read with the function ConfigParam there. A single config parameter is put for all files.
Following on "-x", you can submit parameters as an identifier or string to the project, which are needed there before the start of a certain transformation. The parameter is read with the function ExtraParam there. An extra parameter can be put per file.
If the optional parameter "-a" is written, you will be asked before each transformation:
transform: source to target ? (yes,no,all,cancel)
You have to answer by pressing the according first letter:
y transform this file
n don't transform this file
a transform all files
c cancel all transformations
By the optional parameter "-r" you can force a recursive search for source files in all subdirectories.
This page belongs to the TextTransformer Documentation
|Home Content German|