PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: /Output[Next]: /Pack
\ -> PPWIZARD Command Line -> Switches -> /OutHeader

Switch /OutHeader:Spec

This is a PPWIZARD command line switch.

For some output extensions or file types PPWIZARD automatically outputs a header at the very start of the file. You can turn this off, on, or tweek the output using this switch. This switch may be used as many times as you wish. The /HtmlGenerator switch cause META tag insertion into HTML (do not confuse the two)...

The first and last characters of the "Spec" defines the delimiter being used to delimit the following values:

  1. ToWhat
    You can specify the following for this value (listed in the order PPWIZARD will search for a match):

    1. FileExtension
      You can apply the rule to a particular extension, for example use "VBS" (no dot!) for VBSCRIPT files.

    2. *ProcessingMode
      You can apply the rule to all extensions covering a particular processing mode, for example use "*REXX" for rexx files.

    3. *
      You can apply the rule to all files that did not match the rules above by specifying "*".

  2. Start of Comment Block
    The line that begins the comments.

  3. Start of Middle Lines
    The characters that begin a line between the start and end lines.

  4. End of Comment Block
    The line that ends the comments.

Note that if the last 3 values (start/middle/end) are empty or missing then the comment is turned off.

If the start value starts with '@' and there is no middle or end then this indicates that a file should be read to create a header. The included header is basically just like any other included file but I recommend that its only task be to take care of the header. If your header file included conditional generation of the header based on the extension of the output file then it could make sense to use a "*" rule. This allows you to have full control over the contents of the header.

Sample of a Generated VBSCRIPT header

The following shows the default VBSCRIPT header (at least for version 02.204):

' Generator   : PPWIZARD version 02.204
'             : FREE tool for Windows, OS/2, DOS and UNIX by Dennis Bareis (dbareis@labyrinth.net.au)
'             : http://dennisbareis.id.au/ppwizard.htm
' Time        : Wednesday, 24 Jul 2002 5:31:04pm
' Input File  : C:\tmp\sample.v
' Output File : C:\tmp\sample.vbs


The following shows how header comments in files with the extension ".REX" can be turned off:


The following shows how header comments in files with the extension ".VBS" can be specified:


The following shows how a file can be included to produce a custom header (it can perform any required commands):


The following is an example of what the "OutHeader.H" file could look like:

;--- What is the extension of the output file -------------------------------
#DefineRexx ''
   ;---- Get extension (if not unix then make upper case) -------------------
   @@Extn = FilePart('EXTN', '<?OutputFile>');
   #if ['<?OpSys>' <> 'UNIX']
       @@Extn = translate(@@Extn);    ;;Make upper case

   ;---- Want a comment? ---
   @@Line = copies('+*', 30);
       when @@EXTN = "HTM" | @@EXTN = "HTML" then
           ;--- HTML ---
           @@WantCmt = 'Y'
           @@Start   = '<!--<?NewLine>' || @@Line;
           @@End     =  @@Line || '<?NewLine>-->';
           @@Line    = ''
       when @@EXTN = "VBS" then
           ;--- VB SCRIPT ---
           @@WantCmt = 'Y'
           @@Start   = "'" || @@Line;
           @@End     =  @@Start;
           @@Line    = "'"
       when @@EXTN = "REX" | '<?ProcessingMode>' = 'REXX' then
           ;--- REXX ---
           @@WantCmt = 'Y'
           @@Start   = '/* ' || @@Line;
           @@End     = ' * ' || @@Line || '*/';
           @@Line    = ' *'
           @@WantCmt = 'N'

;--- Exit if we don't want to generate a output header for this EXTN ---
#if    [@@WantCmt = 'N']
       #eof 1

;--- Generate the output comment ---
<??@@Line> Generator   : PPWIZARD version <?Version> under <?OpSysSpecific>
<??@@Line>             : FREE tool for Windows, OS/2, DOS and UNIX by <?PpwizardAuthor> (<?PpwizardAuthorEmail>)
<??@@Line>             : <?PpwizardHomePage>
<??@@Line> Time        : <?CompileTime>
<??@@Line> Input File  : <?InputFile>
<??@@Line> Output File : <?OutputFile>

email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: /Output[Next]: /Pack

My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Sunday November 05 2017 at 10:00am