Freeport Translation Software

What is this software, and how do you get it?

This software is both a a gateway for the Plexus server, and a CGI for other servers (Such as Apache) that will read Freeport style menu files used by the National Capital Freenet and send HTML to the browser. It was originally written by Michael Richardson, with updates by Russell McOrmond. Matthew Darwin re-wrote it as an Apache module.

While this software could be of general use for any Freenet system migrating from Freeport to the WEB, this particular project is centered around the National Capital Freenet here in Ottawa.


There are a number of different ways to configure this software:

Using Plexus, and the translator as a Gateway

Plexus
freeport_gateway.pl
This is the PLEXUS gateway that reads the Freeport menu files and outputs HTML to the browser.
freeport.pl
These are the common routines usedby each translator.
pattern.pl
This is a gateway that is used to support 'p' commands when a pattern is given. (Currently not supported/tested)
Configuration in local.conf and plexus.conf
The sections referencing freeport.pl are required to configure the freeport_gateway.pl script. In plexus.conf, the various variables are set such as where the 'information providers' (/ip/) files are (What to put in front of variable filenames for 'p',etc), as well as the root directory (where the files for /freeport/ are actually stored on the filesystem.

Using Apache with the translator configured as a CGI

Apache
This server can be configured to have references to /freeport/ set to be sent to a CGI that will return the translated code.
In srm.conf:
ScriptAlias /freeport/ /home/www/floraweb/cgi-bin/freeport_cgi/
freeport_cgi
This is the CGI wrapper for the routines in freeport_inc.pl. If given a full filename on the command line, it will output the translated HTML code to STDOUT.
freeport.pl
These are the common routines usedby each translator.

Using Apache with the translator configured to do offline batch translation

Apache with an updated mod_mime.c which contains the 'ForceType' config option.
This server can be configured to have all files in a specific directory automatically be returned as a specific mime-type. In this case we wish ALL files in the directory to be returned as text/html regardless of their filenames.

<DIRECTORY /home/www/data/flora/free>
DefaultType text/html
ForceType text/html
...
</Directory>

freeport_batch
This is a wrapper for the routines in freeport.pl. It will read a file listing all the filenames (Created by a directory walking utility), read these menu files from one directory, and generate translated HTML files into a different directory. On the NCF there is a file called /freenet/rootdir/config/menu_attributes.dat that can be used for this purpose.
freeport.pl
These are the common routines usedby each translator.

This batch translator option has many advantages over a C based translation built into the Apache server, which was another consideration to moving away from the expensive PLEXUS implementation.

Disadvantages:

As an Apache module

In May 1998, Matthew re-wrote freeport.pl as a perl 5 module (NCF::FreePort::Menu.pm). He added a bunch of functionality, removed some stuff (the header and footer) and cleaned it up. It's also OO now.

The two pieces you need to get things to run as an Apache module are:

It works in Apache 1.3.x with mod_perl on Linux.


Sites running this software

While many other sites previously ran this software, there are only two that we know of at the moment:


Potential Future directions and TODO list


How to report bugs or make suggestions on enhancements

With the Freeport menu converter, we have the ability to interpret the Freeport menu files in any way we wish. Often you will read a menu via the WEB, and there will be "Can't convert" messages in places where you might not expect them, or where you feel that the translator might be more intelligent. Alternatively, the Freeport translator might be translating a menu in a way that is felt to be inappropriate.

In order to make things more intelligent, we need to be indicated a few things:

Once we have this information, we will then be in a position to translate this into code that the Freeport to WEB translator would run.

Please post any bug reports or suggestions to the comnet-www@flora.ottawa.on.ca mailing list, or by posting directly to the support newsgroup.


Things that can be solved with documentation rather than software:


This information needs to be added to the IP information.

Things already completed:



Last update: $Date: 1998/11/27 02:06:32 $