PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: Converting From SSI To PPWIZARD[Next]: Project Files

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.

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.

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.

Command Line: Switches / Options

All Options begin with '/' or '-' and are executed in the following order:

  1. If the optional environment variable "PPWIZARD_OPTIONS" exists these are processed first.

  2. If the optional ppwizard project file "ppwizard.ppw" exists then this is processed via the /List switch. You can override any switches specified in the environment variable above if you need to. PPWIZARD first looks in the current directory and then in the same location as the ppwizard runtime if required.

  3. Any options specified on the command line. You can override any switches specified in the environment variables or project files above if you need to.

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:

  1. /#Include
  2. /$Trace
  3. /**/
  4. /@Extn
  5. /Beep
  6. /CGI
  7. /Color
  8. /ConsoleFile
  9. /CopyRight
  10. /CrLf
  11. /Debug
  12. /DebugChars
  13. /DebugCols
  14. /DebugTime
  15. /Define
  16. /DeleteOnError
  17. /DependsOn
  18. /DependsOnComplete
  19. /DependsOnWarnings
  20. /DropFiles
  21. /ErrorFile
  22. /Exclude
  23. /Exec
  24. /FileNames
  25. /FilterInput
  26. /FilterOutput
  27. /GetEnv
  28. /HideCmd
  29. /Hook
  30. /Html
  31. /HtmlGenerator
  32. /Inc2Cache
  33. /IncludePath
  34. /Info
  35. /List
  36. /Making
  37. /OnERROR
  38. /OnOK
  39. /Option
  40. /Other
  41. /Output
  42. /Pack
  43. /RedirMethod
  44. /RegSyntax
  45. /Rexx
  46. /Sleep
  47. /SpellAddWord
  48. /SpellCheck
  49. /SpellShowAll
  50. /Template
  51. /UNC
  52. /Validate
  53. /WarningsRc
  54. /XSlash

LONG COMMAND LINES / CONFIGURATION FILES

PPWIZARD supports storing configuration information in the following ways:

  1. Environment Variables
    Using the /GetEnv switch you can easily retrieve previously stored command line options (possibly set up in "config.sys" or windows registry).

  2. In List File
    Using the /List switch you can easily retrieve command line options from a configuration file. A major advantage of a "list" file is that you do not have to handle characters such as '>' as you would have to if it came from the command line.

    Note that ppwizard will automatically read in any file named "ppwizard.ppw" (default project file). Also note the section above about "@Project" files.

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:

  1. Make file functionality without the hassle.

  2. All source files have an extension of ".IT" (headers use ".IH").

  3. All output to have the extension ".html" and go into the "OUT" directory.
    +-[ 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).


[Top][Contents][Search][Prev]: Converting From SSI To PPWIZARD[Next]: Project Files

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Friday June 01 2001 at 5:58pm