home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / makehtml.zip / MakeHTML.doc < prev    next >
Text File  |  1996-09-16  |  8KB  |  188 lines

  1. MakeHTML.CMD - Sept 16, 1996
  2. ============
  3. By Paul M Blais, 2231 Pinehurst Ave, St Paul, MN
  4. 55116 Email pblais@visi.com
  5.  
  6. This is the first release of this script.
  7.  
  8. Summary:
  9.  
  10. MakeHTML is a REXX utility script that will help you generate HTML pages for
  11. each directory of your FTP site.  If you don't need file upload functions,
  12. then this will replace the default pages generated by IBM's HTTPD.  It relies
  13. on Subject EA's to create HTML pages with a table of sub dirs and a table of
  14. files,   It' s name, description, size, and date are included in columns
  15. within the table.   Simple hardcoded variables in the beginning of the script
  16. can be set up to provide more customized features.    Running the script
  17. generates all HTML pages without the need for any other operator intervention.
  18. An unlimited number of files and subdirs are supported.
  19.  
  20. Requirements:
  21.  
  22. Requires a root directory dedicated for your files.  The root directory may
  23. contain any number of sub dirs and they in turn may contain additional
  24. subdirs without limit.  In order to have a file / directory descriptions
  25. displayed you must maunally add the .subject EA to each file and directory.
  26.  
  27. MakeHTML makes use of the FileREXX.DLL, by Jeff Glatt (not included, but
  28. available on most OS/2 FTP sites).  You can't get off the ground without this
  29. REXX extension.  Jeff Glatt supplies this REXX extension free of royalty
  30. requirements.
  31.  
  32. REXX must also be installed on the workstation running the application.
  33.  
  34. Tested under OS/2 Warp and OS/2 " Merlin"  beta.   Works great with IIBM Web
  35. servers but genrated HTMl should work on any Web server.  Subject EA support
  36. requires an OS/ FAT or HPFS formated drive.
  37.  
  38. License:
  39.  
  40. You are free to use and distrubute this .CMD file so long as you include this
  41. doc file.  It may not be sold or charged for in any way what so ever.  You
  42. may send comments, suggestions, or praise to the author at the above address.
  43. I in no way what so ever will be held accountable for any damage or disasters
  44. that may arrise from the use of this script.  Use at your own risk.
  45.  
  46. Installation:
  47.  
  48. Once FILEREXX is installed no other installation procedures are required.
  49. Proceed to the setup section.
  50.  
  51. Generated HTML Page contents:
  52.  
  53. A generated HTML file has the following structure:
  54.  
  55. 1. Page Title : text for the title bar
  56.  
  57. 2. Page Header : page header and directory description (subject EA)
  58.  
  59. 3. README notes : any text (in HTML format) pulled from a file called README
  60. located in the directory to be genrated.  Place a README file in any dir and
  61. sub dir where you want.  Nothing is added if there is no README file located
  62. in the subdir.
  63.  
  64. 4. Table of subdirectories : a 2 column table listing the directory name (
  65. with a link) and a description (40 characters or less).  The directory name
  66. may be preceeded with an icon (user defined).  If there are no subdirs then
  67. no table is generated.
  68.  
  69. 5. Table of Files : a 4 column table with File name (foldfed to upper case),
  70. a description of the file (from the subject EA), the file size displayed in
  71. bytes, KB, or MB.  The file date in mm-dd-yyyy format.  The file name may
  72. also have a user defined icon / bullet (user defined).  If there are no files,
  73.  then no table is generated.  If there are no file AND no subdirectories,
  74. then an Under Contruction page is generated.  Header, README, and footer are
  75. gnerated with an under construction message.
  76.  
  77. 6. Page Footer : a page footer with an icon (user defined) and link to the
  78. web home page and a second icon to the main page of the directory tree.
  79. below that is the date the scricpt was run.
  80.  
  81. Some modifications can be made to the script to permit even more
  82. customization as you may require.  The source code is heavily commented to
  83. assist you.
  84.  
  85. Subject EA's
  86.  
  87. if you store a subject EA with each file and directory you can use this as a
  88. method to keep track of what files are what in a more descriptive fashion.
  89. Since the EA moves with the file, you can copy files within the tree or
  90. delete them as required.  when a file or directory is processed that has no
  91. description a text lable of "- no desc -" is placed in the description column.
  92.  
  93. IBM says there is a limit to the subject EA of 40 charcaters.  I've made them
  94. longer without problems, but the stated limit is 40 charcaters.  To add
  95. subject EA's you can use the settings notebook from the drives folder or a
  96. more efficient method is to use FM/2 by Mark Kimes to select and press ctrl-s
  97. to popup a window to display the subject ea and make changes.
  98.  
  99. Special subject EA Options :
  100.  
  101. If the first charcater in the subject EA is an asterix "*" the file or
  102. directory is not included in the generated HTML.  This is like a hide
  103. function.  The file will of course still be accessible from a user web
  104. browser, but they will ahve to explicity enter the name to access it.
  105. Consider this feature the ultimate in low level security.  if the "*" is
  106. placed on a directory then none of the the files in thsat directory or the
  107. subdirs in that directory will be processed.  Files and directories appear in
  108. alpha order by name.
  109.  
  110. If a directory has a pound sign "#" as the first character in the subject ea
  111. then that subdirectory will have a special HTML page without date or file
  112. size included in the files table.  The files are also sorted in reverse order
  113. by file name.  The directory description will have the remaining charcaters
  114. used to form the directory description.  You could add or modify the code to
  115. have other options added.
  116.  
  117. README
  118.  
  119. README files are inserted into the generated HTML eaxactly as they exist.
  120. You can add anything in an HTML format that you care to.  If you want nice
  121. paragraphs make sure to use a <P> HTML tokem.  README files are inserted
  122. under the header before the list of subdirectories.
  123.  
  124. Setup:
  125.  
  126. MakeHTML does require some initial setup for a customized look and feel the
  127. following are the minimal setup requirements followed by the optional
  128. requirements.  Once completed just execute MakeHTML from an OS/2 command
  129. prompt.
  130.  
  131. Edit MakeHTML.CMD for several customized features.  This is done by using an
  132. editor to edit MakeHTML.cmd.  All defined variables are located near the top
  133. of the .cmd file and have comment notes summarizing what each one is.
  134.  
  135. The following are the varibales that can be modified:
  136.  
  137. RootDir = 'F:\DOWNLOAD'
  138.  
  139.        Root of the library (UPDATE THIS).  YOU MUST CHANGE THIS OR nothing
  140. will work!  Note this must include a drive letter an NO trailing slash.
  141.  
  142. MyHTML = 'INDEX.HTML'
  143.  
  144.        Default HTML file name.  Note: no trailing or leading slash.
  145.  
  146. BodyParm = 'BACKGROUND="/down.gif"'
  147.  
  148.        If you want a background or other BODY HTML parm code it here. Note
  149. the quotes.  I use double quotes for the HTML and single quotes for the REXX
  150. script.  be careful editing this stuff.
  151.  
  152. HomePage = '/welcome.html'
  153.  
  154.        Your Web Site Home Page for the Home Icon in the footer.
  155.  
  156. HomeSite = 'Paul Blais Downloads'
  157.  
  158.        The name of your Web site download library for the HTML Title it will
  159. have the subject appended for any subdirs.
  160.  
  161. HomeButton = '<A HREF="'||HomePage||'"><IMG SRC="/ADMIN/SKYHOME.GIF"
  162.        ALIGN="BOTTOM" ALT=" ">HOME PAGE</A>'
  163.  
  164.        Home Button for the footer.  Note that HomePage is used to define this.
  165.  
  166. BackButton = '<IMG SRC="/ICONS/BACK.GIF" ALIGN="BOTTOM" ALT=" ">'
  167.  
  168.        Icon to retrun to previous library
  169.  
  170. MainButton = '<A HREF="'||RootPage||'"><IMG SRC="/ICONS/DIR.GIF" ALIGN="
  171.          BOTTOM" ALT=" ">' /* Icon for related libraries */
  172.  
  173.        Icon to return to root library
  174.  
  175. RelatedIcon = '<IMG SRC="/ADMIN/YELDOT.GIF" WIDTH=14 HEIGHT=14 ALIGN="
  176. ABSMIDDLE" ALT=" ">'
  177.  
  178.        Icon for sub directories.  This is just a smal bullet type icon.  Code
  179. height and width on an intercaed GIF file for best results.
  180.  
  181. FileIcon = '<IMG SRC="/ICONS/DITDOT.GIF" WIDTH=14 HEIGHT=13 ALIGN="ABSMIDDLE"
  182. ALT=" ">'
  183.  
  184.        Icon for member files.   This is just a smal bullet type icon.  Code
  185. height and width on an intercaed GIF file for best results.
  186.  
  187.  
  188.