PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
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:
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 '*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
Examples |
The following shows how header comments in files with the extension ".REX" can be turned off:
/OutHeader:~/REX/~
The following shows how header comments in files with the extension ".VBS" can be specified:
/OutHeader:~$VBS$'{x20}===============$'{x20}$'{x20}===============$~
The following shows how a file can be included to produce a custom header (it can perform any required commands):
/OutHeader:~/*/@OutHeader.H/~
The following is an example of what the "OutHeader.H" file could look like:
;--- What is the extension of the output file ------------------------------- #NextId #DefineRexx '' ;---- Get extension (if not unix then make upper case) ------------------- @@Extn = FilePart('EXTN', '<?OutputFile>'); #if ['<?OpSys>' <> 'UNIX'] @@Extn = translate(@@Extn); ;;Make upper case #endif ;---- Want a comment? --- @@Line = copies('+*', 30); select ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% when @@EXTN = "HTM" | @@EXTN = "HTML" then ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% do ;--- HTML --- @@WantCmt = 'Y' @@Start = '<!--<?NewLine>' || @@Line; @@End = @@Line || '<?NewLine>-->'; @@Line = '' end; ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% when @@EXTN = "VBS" then ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% do ;--- VB SCRIPT --- @@WantCmt = 'Y' @@Start = "'" || @@Line; @@End = @@Start; @@Line = "'" end; ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% when @@EXTN = "REX" | '<?ProcessingMode>' = 'REXX' then ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% do ;--- REXX --- @@WantCmt = 'Y' @@Start = '/* ' || @@Line; @@End = ' * ' || @@Line || '*/'; @@Line = ' *' end; ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% otherwise ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@WantCmt = 'N' end #DefineRexx ;--- Exit if we don't want to generate a output header for this EXTN --- #if [@@WantCmt = 'N'] #eof 1 #endif ;--- Generate the output comment --- <??@@Start> <??@@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> <??@@End>