[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Source code to HTML



At 4:21 PM -0700 12/5/99, A K Suska wrote:
>  >> If you need to, either change the extension for CGI or change the
>  >> extension for the scripts themselves.
>  >
>  > What a novel idea :-) I'll just change the extensions of the scripts
>  > (currently removing them entirely) rather than walking through the
>  > landmined path of screwing with the CGI's.
>
>You could also have a cgi that acts as a catalogue program, serving up cgi's
>by request using "Content-type: text/plain\n\n" to deliver the scripts.
>That would be my preferred method, as it keeps the naming conventions intact
>and in the long run makes serving them much easier and automated.

What I've been doing for the last several months is running a shell 
script that builds an HTML table (at 
<http://www.ivsoftware.com/IV_SWShell.html>). The table lists all of 
the files I pass to it. The program also builds Server Side Include 
files for each of the files. Here's the SSI file for 
<http://www.ivsoftware.com/shell/AddHeader.html>:
<!-- Begin AddHeader.html -->
<!--#include virtual="/include/incHeader.html"-->
<!--#include virtual="/include/incBodyStart.html"-->
<!--#include virtual="/include/incLogo.html"-->
<!--#include virtual="/include/incBlueRule.html"-->
<!--#include virtual="/include/incBGSoftware.html"-->
<!--#include virtual="/include/incBGSWShell.html"-->
<!--#include virtual="/include/incBlueRule.html"-->
<!--#include virtual="/include/incCodeTop.html"-->
AddHeader - Add RCS headers to beginning of specified files
<!--#include virtual="/include/incCodeMiddle.html"-->
<!--#include virtual="/pub/code/AddHeader"-->
<!--#include virtual="/include/incCodeBottom.html"-->
<!--#include virtual="/include/incFooter.html"-->
<!-- End AddHeader.html -->

The last line of incCodeMiddle.html (5 lines from bottom) is "<PRE>", 
which sets up the actual source code file to be listed in a 
pre-formatted fashion.

For the most part this has worked fine, but there are a couple files 
that have been problematic, one of them being the program that makes 
the HTML table. The problems with displaying the files have to do 
with things that interfere with HTML tags, such as redirection (lt, 
gt) or HTML code, itself.


Mike Schienle                                 Interactive Visuals, Inc.
mgs@ivsoftware.com                  Remote Sensing and Image Processing
http://www.ivsoftware.com/         Analysis and Application Development

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org