[Date Index]
[Thread Index]

[Date Prev] bullet [Date Next] bullet [Thread Prev] bullet [Thread Next]
bullet
Re: Santa Scripts
bullet bullet bullet bullet

According to Carl Malamud:
>
> Do you have instructions put together on how to install
> a new regular expression? (e.g.,: step 1, add to
> xxxx.pl, step 2, make sure a file xxx.html exists).

The santa CGI perl scripts needs no modification do add new include files or new headers/footers. For the context sensitive include files (see sample template below), include the regular expression within double quotes in the first line of the document (within a comment field) and place the file in the ~santa/Messages/Context directory; everything else is automagic.

When invoked, the santa script scans the ~santa/Messages/Context directory and scans all files, and builds an internal index of regular expressions. In then scans the body of the message sent by the user and includes all the appropriate files.

For Opening and closing statements, the scripts scans ~santa/Messages/Headers and ~santa/Messages/Footers directory and picks a file at random from each directory. This way, people who submit multiple times will get different messages returned to them.

So the total message returned looks something like this:

Header (picked at random from Headers/ ) 1st Para (picked based on receipient {Santa,Elves,Rudolph}) Country Specific include (from Country/ ) Foreach RE found in body include appropriate file from Context/ Footer (picked at random from Footer/ )

Here is the directory hierachy for messages:

~santa/Messages/Archive/ Archive of messages received and sent.

~santa/Messages/Context/ Where regular expression patterns and include files are located.

~santa/Messages/Country/ Where include files unique to a country code are located.

~santa/Messages/Elves/ ~santa/Messages/Rudoplh/ ~santa/Messages/Santa/ First paragraph included in return messages when addressed to specific North Pole receipient

~santa/Messages/Footers/ Footer file picked at random

~santa/Messages/Headers/ Header file picked at random

~santa/Messages/Images/ Local storage of images/gifs/audio files

I have to finish off the logging routines which don't work right now. Sorry about the delay, being layed up in bed for 4 days last week threw my schedule off.

--curtis

============cut here for sample template========================== <!-- "cindy.*crawford" --> <!-- ^^^^^^^^^^^^^^^^case insensitive regular expression --> <!-- Cindy Crawford Reference -->

<P> Rudolph says don't hold your breath on that Cindy Crawford doll thing! Ho! Ho! Ho! <BR> But here is an appropriate substitute for now: <IMG SRC="/santa/Images/crawford.gif"> <BR>

bullet
[Date Prev] bullet [Date Next] bullet [Thread Prev] bullet [Thread Next]
bullet