home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ppwi2284.zip
/
README.TXT
< prev
next >
Wrap
Text File
|
2003-03-02
|
8KB
|
196 lines
╔═══════════════════════════════════════════════════╗
║ Dennis Bareis ║
║ dbareis@labyrinth.net.au ║
║ ║
║ http://www.labyrinth.net.au/~dbareis/ppwizard.htm ║
╚═══════════════════════════════════════════════════╝
PPWIZARD is a powerful but simple to use free preprocessor that can
greatly simplify the creation of HTML.
At its simplest you can create definitions such as:
#define MyEmailAddress dbareis@labyrinth.net.au
#define HttpAnExternalSite http://www.laybrinth.net.au
These are defined once (normally in a separate file called a header
file) and then referred to throughout your pages. If you need to change
the address its a simple change to one location and then a rebuild.
PPWIZARD can be told to automatically only rebuild those files that need
to be (it tracks what input files make each output file).
Example of using one of the definitions defined above:
My email address is <$MyEmailAddress>, please ...
PPWIZARD is powerful (more details below) but just being able to use the
"#define" command to create simple definitions as show above and including
the header files in your pages with "#include" would be more than enough
justification for its use and many people won't use the more advanced
features (at least not initially). I am more than happy to help anyone
who can provide a detailed description of any problem and what they have
tried to do to resolve it.
PPWIZARD can import data from databases. It can be extended through a
simple (but very powerful) processing language called rexx. The following
is an example of me creating a reasonably complex macro and using it
twice to include some images (the height and width of these are determined
by the macro - it would generally be in a separate header):
****************************************************************************
***************************** START EXAMPLE ********************************
****************************************************************************
;--- Photo macro will either use passed size or work out correct size for you ---
#define Photo \
;--- Where is file on local file system? ---------------------- \
#evaluate+ LocalFileName ^"..\graphics\{$Image}"^ \
\
;--- The output depends on this image ------------------------- \
#DependsOn INPUT "<$LocalFileName>" \
\
;--- Start a new table row ------------------------------------ \
<TR> \
\
;--- If user did not pass the size then work it out ----------- \
#if "{$Size=''}" <> "" \
#define+ TmpSize {$Size} ;;User told us size \
#elseif \
#evaluate+ TmpSize ^GetImageHeightWidth("<$LocalFileName>")^ \
#endif \
\
;--- Generate some code --------------------------------------- \
<TD ALIGN=CENTER> \
<IMG SRC="graphics/clear1x1.gif" WIDTH=1 HEIGHT=1 VSPACE=20> \
{$Title}<BR><BR> \
<IMG SRC="graphics/{$Image}" BORDER=0 <$TmpSize> ALT="{$Title}"> \
<IMG SRC="graphics/clear1x1.gif" WIDTH=1 HEIGHT=1 VSPACE=20> \
</TR>
;--- Start the table --------------------------------------------------------
<BR><CENTER><TABLE COLS=1 BORDER=10 CELLSPACING=10>
<TR>
<TH ALIGN=CENTER>Pictures
</TR>
;--- Use the macro to generate photo cells -------------------------------
<$Photo Image="dbareis.jpg" Title="Me hard at work">
<$Photo Image="kpaw_ff.jpg" Title="Kangaroo Paws along Front Fence">
;--- Complete table ---------------------------------------------------------
</TABLE></CENTER>
****************************************************************************
***************************** END EXAMPLE ********************************
****************************************************************************
To execute PPWIZARD under operating systems other than OS/2 you need to
use the free "regina" rexx interpreter.
Documentation
~~~~~~~~~~~~~
PPWIZARD has extensive documentation which used to be bundled with
it, however my users have suggested that I split it out to reduce the
download time. Please go to the PPWIZARD homepage (address below) to
get the documentation in either HTML or INF format.
To INSTALL
~~~~~~~~~~
To install I recommend that you simply create a directory and unzip the
contents of the zip file into this directory.
You would normally also wish to add the name of the new directory to
the path.
OS/2 users should rename "ppwizard.rex" to "ppwizard.cmd", with this
command (you may have to delete any previous version of ppwizard.rex):
ren ppwizard.rex ppwizard.cmd
Note that ppwizard is enhanced quite frequently so you may wish to
check my site out for a new version!
Test INSTALL
~~~~~~~~~~~~
To test the install on OS/2, execute the command:
ppwizard.cmd tryme.it
To test the install on other operating systems (PPWIZARD executes
under REGINA), execute the command:
(1) rexx ppwizard.rex tryme.it OR
(2) regina ppwizard.rex tryme.it
This should create "tryme.htm", view it in your browser if you wish. The
command we used left everything as default which is why the output has
the extension ".htm", you can change this to ".html" or tell ppwizard
to place the output into a specific directory if you wish.
There are many ppwizard options that allow you to customise its operation
for your needs, for example leading and trailing spaces are removed by
default (for faster download). There are situations where you do not
wish to occur, you can turn the space removal and all other ppwizard
magic on and off as required.
PPWIZARD HOME PAGE
~~~~~~~~~~~~~~~~~~
PPWIZARD has its own page which contains some more examples of what you
can do:
"http://www.labyrinth.net.au/~dbareis/ppwizard.htm".
If you find this program useful please consider linking to the above
page, you can use the supplied "madewppw.jpg" (120x35) image for this
purpose if you wish.
Note that there are many PPWIZARD add-ons available from the PPWIZARD
download page, these cover link and documention generation as well as
thumnail and MP3 related stuff.
ONLINE DOCO
~~~~~~~~~~~
The current version of ppwizard's documentation is kept online at:
http://www.labyrinth.net.au/~dbareis/ppwizard/ppwizard.htm
The change history is at:
http://www.labyrinth.net.au/~dbareis/ppwizard/changehistory.htm
A simple or beginners guide is available at:
http://www.labyrinth.net.au/~dbareis/ppwizard/begin_g.htm
The "beginners" guide shows you all the basic information you need
to get started.
DISTRIBUTION
~~~~~~~~~~~~
This archive may be freely distributed (but not sold) in full.
Files must not be removed from the distibuted zip files and the zip file
comments must not be removed.
The contents of the archive are (C)opyright Dennis Bareis 1997-2000.
All rights reserved.