Minimalist Online Docmentation




Overview

The config file is the first thing that the interpreter reads. The interpreter expects to find it as ".mod/config", located at the root of the source directory tree, which is specified on the command line. Some of these values can be overridden with command-line options to the interpreter.


Format

A '#' at the beginning of a line signifies a comment.

Variable assignments are of the format:

variable_name = value

Variable names should be flush with the left margin. The '=' sign can be surrounded by whitespace. There should be no whitespace or special characters in the value. Do not use quotes.

Except when specified otherwise, file and pathnames should be an abolute path (start with "/"), or should be relative to the source directory.


Variables

destination

Required. This specifies the destination for the finished html files. You'll always want to define this. There are three different types of possible destinations:

Directory:

The most common destination type is a directory name under which the resulting html tree should be built. This must be a full path, since it should lie outside of the source directory.

Tar archive:

If the destination ends in ".tar" or ".tar.gz", mod2html will store all output in the requested tar file or gzipped tar file. Status will not be kept, of course, and all destination files will be recreated on each run. Relative paths will be relative to the current working directory when the script was called.

FTP location:

If the destination starts with "ftp://", mod2html will attempt to upload the resulting files to the given anonymous ftp server and directory. If priveleged FTP is desired, a username and optionally a password can be specified before the hostname in the same format as supported by most browsers:

ftp://[username[:password]@]hostname/[path/]

If the password is not supplied, you will be prompted for it when the FTP connection is made. This is the recommended usage, since it's never a good idea to store your plain text password in any file.

web_site_url

Required. Set this variable to the full web address of the site that you're maintaining with this source tree. Don't include a filename at the end (such as "index.html"); it should just be the directory that contains your MOD-maintained site. Examples:

  • http://www.emsei.psu.edu/~woods/
  • http://www.example.com/products/software/
  • http://www.mysite.com (if you were using MOD to maintain the root of mysite.com).

index_style

Optional. Value can be either static (the default), or dynamic. The dynamic version uses javascript and cookies to display an expandable/collapsable tree of topics.

default_template

Optional. Use this variable to override the usual name for the default template, which is ".mod/default.tmpl". You may want to use this if you want to use the same default template for multiple source trees. Usually the default is fine.

lib_dir

Optional. This option lets you specify an alternate lib directory, if you'll be customizing some of the files for the current destination. The lib directory contains the images and default javascript files that will need be copied to the destination. The default value is /usr/local/lib/mod. If you'd like to change the default, edit the mod2html script and search for the default path to change it.

status_dir

Optional. This variable sets the directory where mod2html should store its status files for a given destination. The default is ".mod/status", which is almost always fine. The value must be a directory that is writable by the userid that will execute mod2html. Most people will not need to set this variable.


Example

Here's a typical example of a config file:

# This is a configuration file for mod2html. Each MOD tree should have one
# of these files. The default name is ".mod/config" in the source directory.

# Where to install generated html files
destination = /home/www/htdocs/ecf/admin

# This is the site that we're maintaining
web_site_url = http://www.emsei.psu.edu/ecf/admin/

# Create a dynamic index
index_style = dynamic




SourceForge.net Logo