The Weasel Users Guide Version 1.01

Release History

23rd April 1997 1.01 Minor update to allow local files to be updated with no ftp upload. Compiled with OS/2 JDK 1.02
21st October 1996 1.00 First public release.

Installation

Simply create a directory and put all the files in the distribution into this directory.
You must have the Java kit correctly installed. Make sure that your CLASSPATH environment variable includes the '.' (current) directory.

eg CLASSPATH=.;c:\java\lib\classes.zip

You are advised to change the current directory to where you put the files before attempting to run Weasel.

Command Line parameters

Weasel is a command line driven program and requires that a number of parameters be passed to it via the command line. (or the equivalent on a Mac)
It is run using the Java interpreter as follows:
   java Weasel templatefilepath [FTPHostName FTPUserName FTPPassword] [FTPDirectory] [FTPFileName]

Note: Remember that Java is case sensitive even if your OS treats files in a non case sensitive way. The name of the Java class is 'Weasel', therefore you must type java Weasel and not java weasel or java WEASEL to run it.

  • TemplateFilePath (compulsory)

    The file path of the local file to use as the template file.
  • FTPHostName (optional)

    The hostname of the FTP server to upload the processed file to. If not specified no upload will be attempted but the local temporary file 'temp.tmp' will contain the resultant file after processing the template file.
  • FTPUserName (optional)

    The username of the FTP account on the FTP server. Must be specified if FTPHostName is specified.
  • FTPPassword (optional)

    The password of the FTP account specified by username. Must be specified if FTPHostName is specified.
  • FTPDirectory (optional)

    The directory on the FTP server where the processed file is uploaded to. If not specified it uses the default login directory.
  • FTPFileName (optional)

    Allows the uploaded file's name to be specified. If not specified the template's filename is used instead.
    The FTPDirectory option must be present in order to use this option.
  • Weasel Embedded Commands

    Embedded commands are placed in the template file and during processing are replaced ('patched') with special replacement information depending on the command.
    Embedded commands are specified as follows:
       ##COMMAND#
    
    ie Embedded commands start with a double '#' and end with a single '#'.
    During processing the whole '##COMMAND#' is replaced by the appropriate replacement text.
    The following commands are currently implemented with others planned/in development
    Command Description of Replacement Text Notes
    IPADDRESS Your computer's default local host address in dotted IP notation eg 193.5.56.37 -
    HOSTNAME The hostname of your computer. When you dialup your ISP this hostname may be allocated along with the IP address.
    This command puts in the full hostname including the domain. For example ab123.du.pipex.com
    TIME This gets replaced with the current time with respect to GMT. Currently returns current time (ie time file is processed) relative to GMT. It is planned to allow the date/time format to be specified in a future release.

    Example

    To construct an HTML link to a file served by an HTTP (WWW) server residing on your computer using the dotted IP address:

    <A HREF="http://##IPADDRESS#/directory/file.html"></A>

    A sample template file shows use of all the tags and can be used as a basis for your own template file.

    Notes

    1. Using the dotted IP address will generally be faster than specifying the hostname as it removes the need to a domain name server (DNS) lookup to obtain the numeric address.
    2. Weasel is freeware but I would appreciate an email from anyone who downloads it and finds it useful.
    3. Please give the URL to my web site rather than giving the files directly to others people as this should contain the latest version of the program and documentation.
    4. The supplied template file contains a link to my Web site and I ask that you keep this link or a similar one on any Web page generated by Weasel.
    5. Some ISPs may prohibit (or say they do) dialup users running server programs via a dialup connection.
    6. Caution: Make sure you are aware of the security implications of running server software on your computer. You will be accessible by millions of Internet users so if your computer gets hacked over the 'net don't come crying to me #;).
    7. Disclaimer: Weasel is supplied as is and the author can take no responsibility for any consequences if you decide to use it.
    8. Send bug reports, wish lists, comments and encouragements to the author (Stephen Summerfield) at stephen@netality.com