![]() | ![]() | ![]() | ![]() | ![]() |
PPWIZARD Command Line |
Windows NT/2000 users should be able to start PPWIZARD like this:
PPWIZARD [[+]InputMask] [@Project] [Options[:parms]]
OS/2 users can also use the syntax shown above (make sure PPWIZARD is named "PPWIZARD.CMD").
Windows 95/98/ME and Unix users will probably need to use (and NT/2000 users can use):
REGINA PPWIZARD [[+]InputMask] [@Project] [Options[:parms]]
As a simple example to build "tryme.htm" from the source file "tryme.it" (supplied with ppwizard) one possible format of the command is:
REGINA PPWIZARD tryme.it
You should read up about curley codes as these can be used to take care of difficult characters such as spaces, another example is if you had a filename or mask that begins with a minus sign (this normally indicates the start of a command line switch). Spaces can also be handled by surrounding any item on the command line with a range of "quote" characters. This can be very handy in cases where the normally useful double quotes are causing problems (getting dropped by operating system etc). The quote characters you can use include single, double and backwards quotes as well as the "~!#$%^([" characters. If "(" or "[" is used the matching end quote is ")" or "]", otherwise the starting and ending quote characters are the same, valid examples are 'one parm' and [one parm].
Any item that starts with ';' (such as ";/debug) is commented out and is ignored. This should be helpful when testing combinations of switches.
Note that Regina looks in the directories mentioned in the "REGINA_MACROS" environment variable for REXX scripts if they are not in the current directory (it does not use the "PATH" environment variable). Unless "ppwizard.rex" is located in a path mentioned in "REGINA_MACROS" then a command such as "regina ppwizard tryme.it" will fail unless PPWIZARD is in the current directory. Of course it will also fail if "regina" is not in one of the directories mentioned in the "PATH" environment or in the current directory.
Be careful with spaces, the only spaces that are ignored are extra ones between switches or input masks. PPWIZARD does not do space reduction elsewhere so "/output:*.htm" is not the same as "/output: *.htm" (in the latter you are saying the output filename should start with a space).
Command Line: InputMask |
You may specify more than one input mask and they may appear anywhere on the line (however none are processed until after all switches have been).
Each mask (anything that does not look like a switch/option) can be the name of a single file or may contain the normal wildcard characters for your operating system ("?" & "*" for OS/2 and Windows). See the documentation for your operating system for more details. Note that with a GETFILELIST hook you can enhance the way that the mask is handled. Note that for some operating systems ppwizard gets passed a pre-expanded list of files and never sees the wildcards, if this is not what you want you can always use curley codes to hide the value from the operating system or regina (or use the /Input switch).
If a mask (which may include a path) is preceeded by the "+" character then this indicates that you wish to process all files matching the mask in the indicated (or current) directory and all of it's subdirectories.
To specify the location where ppwizard will place the generated output files (current directory by default!) you need to use the /output switch. You may wish to also use a similar specification for the /DependsOn switch if you use it (if not, why not????).
Each source file may include other (external) files such as common header files containing your standard definitions and macros.
If all input files end in the extension ".X" then the default processing mode is /rexx, the default situation is /html.
Each file has an associated base directory, to override the default value (the masks directory) you can use the /BaseDir switch or imbed the "{ENDBASE}" (upper case) string within the InputMask after one of the slashes (the string marks the end of the base directory). Note that if you do mark the base directory this way the Input mask should specify a full path (or begin with '.' or '..' followed by a slash). An example of specifying the base directory would be "c:\projects\source\main\{ENDBASE}subdir1\*.IT".
There is a special type of "InputMask" which begins with "?\" or ("?/" in Unix) which indicates that you wish PPWIZARD to find a single specific file (no wildcard characters etc), The FindFile() routine is used to locate the file. This type of mask should not begin with "+".
Note that in Unix in you may wish to use the "-Input" switch to specify masks (this delays their expansion, PPWIZARD does it).
By default PPWIZARD wants at least one file to match every mask and at least one file to match over all masks, to alter this you will need to use the /0OK switch.
Command Line: Switches / Options |
All Options begin with '/' or '-' and are executed in the following order:
Normally files or options are separated by spaces, if the file or option needs to contain spaces then you can surround it by double quotes. If you use double quotes the quoted value must not contain double quotes (encode with "{x22}").
Available switches are:
LONG COMMAND LINES / CONFIGURATION FILES |
PPWIZARD has no restrictions on the length of a command line although your operating system is likely to (about 126 characters in WIN95/98/ME).
PPWIZARD supports storing configuration information in the following ways:
Note that ppwizard will automatically read in any file named "ppwizard.ppw" (default project file).
RETURN CODES |
The /ErrorFile and /ConsoleFile can help you capture any text output by ppwizard which can be particulary useful if you don't work from the command line.
EXAMPLE |
This example has the following attributes:
+-[ MAKEIT.CMD ]------------------------------------------------+ | @echo off | | md OUT >nul 2>&1 | | md OUT\DEPEND >nul 2>&1 | | ppwizard %1.IT /Output:OUT\*.html /DependsOn:OUT\DEPEND\*.DEP | | if errorlevel 1 echo ERROR: Command failed! | +---------------------------------------------------------------+
Example - Redirection |
Ppwizard (or any other program) can at times generate quite a lot of output. When /Debug is used you will definitely wish to "redirect" the output into a file, the following is an example which would work in virtually all operating systems (including linux bash shell - change switch characters to '-'!):
[regina] ppwizard index.it /Output:OUT\*.htm /Debug > OUT\output.TXT 2>&1
If the redirection example does not work you will need to read the documentation for the operating system you are using to determine the correct method. If this failed on Windows NT or 2000 (one of the 1,234,657 bugs!) then you will need to specify the regina interpreter first ("regina ppwizard" etc).
![]() | ![]() | ![]() | ![]() | ![]() |