![]() | ![]() | ![]() | ![]() | ![]() |
This page will attempt to show you, in one spot, all the basic information you will need to know. I will refer to HTML generation here, however almost everything said will also apply to other types of generation (such as REXX code). Some of the things I say may not be 100% correct in that they will be greatly simplified statements.
PPWIZARD is a free tool. Its basic aim is to allow a template or style-sheet design approach to web sites. It can aid in ensuring that the look and feel is the same across all your pages and can automate many common and difficult tasks. This manual was written using PPWIZARD.
One of PPWIZARD's main aims is to ensure that you only need to do (specify) something once, no matter how many places require it. Because of this, testing becomes easier, bugs are found faster, and your site becomes more reliable. As a further aid you can use my free URL checker to check that external links all exist (detect 404's before your users do)!
If you have any problems getting started with PPWIZARD or understanding things, then please email me at (dbareis@labyrinth.net.au). I do not mind questions of any sort as long as some effort at reading and understanding the documentation, etc. has been made! It is also best to supply any sample code that you have been trying, so I can see where you are going wrong.
First of all, there are really only two easy commands that you will need to start with. They are:
PPWIZARD's quotes are similar to HTML's in that both single and double quotes can be used; where they differ is that virtually any convenient character can be used. The following are all valid quoted values:
This command allows you to include one file at any point within another file. The included file can contain commonly used text, consisting of one or more HTML paragraphs, an HTML header or footer, or macros which create text output.
Since the included text exists in only one place, all that is required to make a change is to edit one file and then regenerate the HTML (see below).
This command allows you to define common components such as e-mail and web addresses in one place. Here are some examples:
#define MyEmailAddress dbareis@labyrinth.net.au #define ImgUpdated <IMG SRC="graphics/updated1.gif" HSPACE=10 ALIGN=middle BORDER=0 WIDTH=52 HEIGHT=12 ALT="updated"> #define ImgNew <IMG SRC="graphics/new.gif" HSPACE=10 ALIGN=middle BORDER=0 WIDTH=35 HEIGHT=20 ALT="new"> #define HttpMainJavasoftPage java.sun.com #define HttpJavaFoundationClassesPage <$HttpMainJavasoftPage>/products/jfc/
In the above commands you will notice how we give "names" to common components, for example I called my e-mail address "MyEmailAddress" and gave it the value "dbareis@labyrinth.net.au".
You will normally put all of the commands like those above into a single file; let's get creative and call it "common.ih" (you could call it absolutely anything). Now, in any HTML page that requires one of the above definitions, you would place a statement similar to the following, near the top:
#include "common.ih"
To refer to a previously defined value you preceed the "name" you gave it with "<$" and end it with ">". For example, the following text refers to the e-mail address we defined above:
<P>If you have any questions or suggestions for improvements please feel free to <A HREF="mailto:<$MyEmailAddress>">e-mail me</A>.
You might have previously noticed that I snuck in a #define that also referred to a previously defined value; it was this command:
#define HttpJavaFoundationClassesPage <$HttpMainJavasoftPage>/products/jfc/
The main concept to understand is that what you edit is called source code and what you create from this source (with PPWIZARD) is HTML or output code. You would never edit the generated HTML; you go back to the source, make whatever changes you require, and then regenerate new HTML.
I recommend that your source files use the extension ".it", except for any source files that are common and are only included by other source files (for those, use the extension ".ih"; these types of files are frequently called header files).
If you follow the above naming conventions then you can simply recreate all your HTML with the following command:
rexx ppwizard *.it
Operating systems other than OS/2 require the free "Regina" interpreter (see http://www.labyrinth.net.au/~dbareis/regina.htm). It's very easy to install and it will be called "rexx.exe" or "regina.exe" (depending on the operating system). Thus if the the above command does not work try:
regina ppwizard.rex *.it
OS/2 users should run PPWIZARD directly, that is:
ppwizard.rex *.it
Getting slightly more advanced, you might get sick of rebuilding all your HTML when only a page or two needs to be processed; this command will only regenerate those that require it:
rexx ppwizard.rex *.it /DependsOn:*.dep
Getting even more advanced, I like to keep source files in one directory and generated files elsewhere. The default HTML extension is ".htm"; this example also shows how this can be changed:
rexx ppwizard.rex *.it /DependsOn:out\depend\*.dep /Output:out\*.html
You will want to read up more about macros and macro parameters. You will also want to read up about the following commands and switches:
![]() | ![]() | ![]() | ![]() | ![]() |