![]() | ![]() | ![]() | ![]() | ![]() |
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 but will need to have renamed "PPWIZARD.REX" to "PPWIZARD.CMD" for it to work.
Windows 95/98/ME and Unix users will probably need to use:
REGINA PPWIZARD [[+]InputMask] [@Project] [Options[:parms]]
As a simple example to build "tryme.htm" from the source file "tryme.it" one possible format of the command is:
REGINA PPWIZARD tryme.it
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.
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.
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 files such as common header files with your standard definitions.
If all input files end in the extension ".X" then the default processing mode is /rexx, the default situation is /html.
PPWIZARD allows you to put all or some of your file specifications or switches into project (configuration) files with a default file extension of ".ppw" and easily refer to them from the command line.
PPWIZARD uses FindFile() to search for project files. Basically the project facility is a "smarter" version of the /List functionality (and easier to type!). If you need to refer to project files in specific directories then the "/list" switch is required.
PPWIZARD automatically looks for a specific project file (called "ppwizard.ppw"). By default if all input files have the same extension then ppwizard will also try to load an extension based project file, see the /@EXTN switch for more information.
See the /List switch for more details on the file format, but here is a sample configuration file (lets call it "all.ppw"):
;----------------------------------------------------------------------- ;--- This file builds HTML for all "*.IT" files in current directory --- ;----------------------------------------------------------------------- *.IT ;;Only build files matching this mask /DependsOn:DEP\*.DEP ;;Only rebuild files that need it (new or modified) /Output:OUT\*.htm ;;I like files generated into the "out" directory and with the ".htm" extn
To use the "all.ppw" file shown above you could say:
ppwizard @all
As shown above all "*.it" files will be processed if we wished to process a single file but still make use of the project file for the options then you would need to make use of the /DropFiles switch.
As documented for "/list" nothing stops one list or project file from loading others.
All Options begin with '/' unless running under UNIX where '-' is used instead.
Switches 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}" - see below).
Commonly used options:
Validation options:
Less commonly used options:
If you know the ASCII code of a character (in hex) you can encode it, for example "{x20}" represents a space. If a code looks invalid then it is ignored.
The following are codes for some of the more difficult command line characters you are likely to need:
PPWIZARD supports storing configuration information in the following ways:
Note that ppwizard will automatically read in any file named "ppwizard.ppw" (default project file). Also note the section above about "@Project" files.
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.
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! | +---------------------------------------------------------------+
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 '-'!):
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.
![]() | ![]() | ![]() | ![]() | ![]() |