home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
makehtml.zip
/
MakeHTML.doc
< prev
next >
Wrap
Text File
|
1996-09-16
|
8KB
|
188 lines
MakeHTML.CMD - Sept 16, 1996
============
By Paul M Blais, 2231 Pinehurst Ave, St Paul, MN
55116 Email pblais@visi.com
This is the first release of this script.
Summary:
MakeHTML is a REXX utility script that will help you generate HTML pages for
each directory of your FTP site. If you don't need file upload functions,
then this will replace the default pages generated by IBM's HTTPD. It relies
on Subject EA's to create HTML pages with a table of sub dirs and a table of
files, It' s name, description, size, and date are included in columns
within the table. Simple hardcoded variables in the beginning of the script
can be set up to provide more customized features. Running the script
generates all HTML pages without the need for any other operator intervention.
An unlimited number of files and subdirs are supported.
Requirements:
Requires a root directory dedicated for your files. The root directory may
contain any number of sub dirs and they in turn may contain additional
subdirs without limit. In order to have a file / directory descriptions
displayed you must maunally add the .subject EA to each file and directory.
MakeHTML makes use of the FileREXX.DLL, by Jeff Glatt (not included, but
available on most OS/2 FTP sites). You can't get off the ground without this
REXX extension. Jeff Glatt supplies this REXX extension free of royalty
requirements.
REXX must also be installed on the workstation running the application.
Tested under OS/2 Warp and OS/2 " Merlin" beta. Works great with IIBM Web
servers but genrated HTMl should work on any Web server. Subject EA support
requires an OS/ FAT or HPFS formated drive.
License:
You are free to use and distrubute this .CMD file so long as you include this
doc file. It may not be sold or charged for in any way what so ever. You
may send comments, suggestions, or praise to the author at the above address.
I in no way what so ever will be held accountable for any damage or disasters
that may arrise from the use of this script. Use at your own risk.
Installation:
Once FILEREXX is installed no other installation procedures are required.
Proceed to the setup section.
Generated HTML Page contents:
A generated HTML file has the following structure:
1. Page Title : text for the title bar
2. Page Header : page header and directory description (subject EA)
3. README notes : any text (in HTML format) pulled from a file called README
located in the directory to be genrated. Place a README file in any dir and
sub dir where you want. Nothing is added if there is no README file located
in the subdir.
4. Table of subdirectories : a 2 column table listing the directory name (
with a link) and a description (40 characters or less). The directory name
may be preceeded with an icon (user defined). If there are no subdirs then
no table is generated.
5. Table of Files : a 4 column table with File name (foldfed to upper case),
a description of the file (from the subject EA), the file size displayed in
bytes, KB, or MB. The file date in mm-dd-yyyy format. The file name may
also have a user defined icon / bullet (user defined). If there are no files,
then no table is generated. If there are no file AND no subdirectories,
then an Under Contruction page is generated. Header, README, and footer are
gnerated with an under construction message.
6. Page Footer : a page footer with an icon (user defined) and link to the
web home page and a second icon to the main page of the directory tree.
below that is the date the scricpt was run.
Some modifications can be made to the script to permit even more
customization as you may require. The source code is heavily commented to
assist you.
Subject EA's
if you store a subject EA with each file and directory you can use this as a
method to keep track of what files are what in a more descriptive fashion.
Since the EA moves with the file, you can copy files within the tree or
delete them as required. when a file or directory is processed that has no
description a text lable of "- no desc -" is placed in the description column.
IBM says there is a limit to the subject EA of 40 charcaters. I've made them
longer without problems, but the stated limit is 40 charcaters. To add
subject EA's you can use the settings notebook from the drives folder or a
more efficient method is to use FM/2 by Mark Kimes to select and press ctrl-s
to popup a window to display the subject ea and make changes.
Special subject EA Options :
If the first charcater in the subject EA is an asterix "*" the file or
directory is not included in the generated HTML. This is like a hide
function. The file will of course still be accessible from a user web
browser, but they will ahve to explicity enter the name to access it.
Consider this feature the ultimate in low level security. if the "*" is
placed on a directory then none of the the files in thsat directory or the
subdirs in that directory will be processed. Files and directories appear in
alpha order by name.
If a directory has a pound sign "#" as the first character in the subject ea
then that subdirectory will have a special HTML page without date or file
size included in the files table. The files are also sorted in reverse order
by file name. The directory description will have the remaining charcaters
used to form the directory description. You could add or modify the code to
have other options added.
README
README files are inserted into the generated HTML eaxactly as they exist.
You can add anything in an HTML format that you care to. If you want nice
paragraphs make sure to use a <P> HTML tokem. README files are inserted
under the header before the list of subdirectories.
Setup:
MakeHTML does require some initial setup for a customized look and feel the
following are the minimal setup requirements followed by the optional
requirements. Once completed just execute MakeHTML from an OS/2 command
prompt.
Edit MakeHTML.CMD for several customized features. This is done by using an
editor to edit MakeHTML.cmd. All defined variables are located near the top
of the .cmd file and have comment notes summarizing what each one is.
The following are the varibales that can be modified:
RootDir = 'F:\DOWNLOAD'
Root of the library (UPDATE THIS). YOU MUST CHANGE THIS OR nothing
will work! Note this must include a drive letter an NO trailing slash.
MyHTML = 'INDEX.HTML'
Default HTML file name. Note: no trailing or leading slash.
BodyParm = 'BACKGROUND="/down.gif"'
If you want a background or other BODY HTML parm code it here. Note
the quotes. I use double quotes for the HTML and single quotes for the REXX
script. be careful editing this stuff.
HomePage = '/welcome.html'
Your Web Site Home Page for the Home Icon in the footer.
HomeSite = 'Paul Blais Downloads'
The name of your Web site download library for the HTML Title it will
have the subject appended for any subdirs.
HomeButton = '<A HREF="'||HomePage||'"><IMG SRC="/ADMIN/SKYHOME.GIF"
ALIGN="BOTTOM" ALT=" ">HOME PAGE</A>'
Home Button for the footer. Note that HomePage is used to define this.
BackButton = '<IMG SRC="/ICONS/BACK.GIF" ALIGN="BOTTOM" ALT=" ">'
Icon to retrun to previous library
MainButton = '<A HREF="'||RootPage||'"><IMG SRC="/ICONS/DIR.GIF" ALIGN="
BOTTOM" ALT=" ">' /* Icon for related libraries */
Icon to return to root library
RelatedIcon = '<IMG SRC="/ADMIN/YELDOT.GIF" WIDTH=14 HEIGHT=14 ALIGN="
ABSMIDDLE" ALT=" ">'
Icon for sub directories. This is just a smal bullet type icon. Code
height and width on an intercaed GIF file for best results.
FileIcon = '<IMG SRC="/ICONS/DITDOT.GIF" WIDTH=14 HEIGHT=13 ALIGN="ABSMIDDLE"
ALT=" ">'
Icon for member files. This is just a smal bullet type icon. Code
height and width on an intercaed GIF file for best results.