![]() | ![]() | ![]() | ![]() | ![]() |
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 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 who's basic aim is to allow template or style sheet design approach to web sites. It can aid in ensuring 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 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 (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 create a file so that it contains common text. This could be one or more html paragraphs or a html header or footer.
Being in 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 email 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 email address "MyEmailAddress" and gave it the value "dbareis@labyrinth.net.au".
Now you will normally put all of the commands such as those above into a single file, lets get creative and call it "common.ih" (you could call in absolutely anything). Now in any html page that requires one of the above definitions, you would see 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 email address we defined above:
<P>If you have any questions or suggestions for improvements please feel free to <A HREF="mailto:<$MyEmailAddress>">email 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 only included by other source files (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). Its very easy to install and it will be called "rexx.exe" or "regina.exe" (depending on the operating system), 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:
![]() | ![]() | ![]() | ![]() | ![]() |