MHonArc Resources: RCFILE

[Prev: QUIET] | [Resources][TOC] | [Next: RECONVERT]

# RCFILE

- Syntax
- Description
  - Resource file syntax
  - Resource variables
- Default Setting
- Resource Variables
- Examples
- Version
- See Also

## Syntax

Envariable

  `M2H_RCFILE=`filename

Element

  N/A

Command-line Option

  `-rcfile` filename

## Description

RCFILE tells MHonArc what the resource file is. The resource file allows you to specify most of the resources set by environment variables and command-line options, and it allows you to specify other resources to control MHonArc's behavior.

### Resource file syntax

Resources are set in the file by using elements similiar in style to HTML/SGML markup. However, MHonArc uses simpler parsing rules for the resource file than standard SGML:

- Any line that is not a recognized element open tag, and the line is not contained within an element, is ignored. This implies that regular text can be put anywhere outside of recognized elements for commenting purposes.

  NOTE: | You should use SGML comment declarations (`<!--` ...`-->`) when commenting a resource file. This will eliminate possible conflicts if more stricter parsing rules are adopted.

- The opening tag of an element must occur by itself on a single line. Whitespace is allowed before the the open tag.

- No comments are allowed inside elements because the text will be treated as element content (unless the comment text is supposed to be part of the resource value).

- Each element must be closed with a `</`element_name`>` tag on its own line unless resource associated with the element is a boolean resource. Whitespace is allowed before the close tag.

- Some elements can take an optional attribute called "`Override`", if applicable. This tells MHonArc that the contents of the element will completely override the default behavior of MHonArc, and previous instances of the element. Example: "`<EXCS Override>`". If "`Override`" is not specified, then the contents of the element augment the current setting.

- Some elements can take an optional attribute called "`Chop`", if applicable. This tells MHonArc to remove the last line-break of the element's content.

- Element names are case-insensitive.

- Elements can occur in any order in the resource file.

- Elements canNOT be nested. Many resources define the values of resource variables, which may be used within resource elements.

### Resource variables

Many resources are allowed to have resource variables as part of there content. Resource variables represent data that can only be defined during run-time. I.e. Resource variables will get expanded to an appropriate value during the execution of MHonArc. For more information on resource variables, see the section: Resource Variables.

The description for each resource will contain a list of all applicable variables that may be used in defining the resource's value.

## Default Setting

Nil.

## Resource Variables

N/A

## Examples

The following shows you what a resource file looks like:

    <!-- MHonArc resource file
      -->
    <SORT>
    <TITLE>
    MHonArc test
    </TITLE>

    <TTITLE>
    MHonArc test (by thread)
    </TTITLE>

    <!--=== Index Page Customizations =========================================-->

    <!-- Have LISTBEGIN contain last updated information
      -->
    <LISTBEGIN>
    <address>
    Last updated: $LOCALDATE$<br>
    $NUMOFMSG$ messages in chronological order<br>
    </address>
    <ul>
    <li><a href="$TIDXFNAME$">Thread Index</a></li>
    </ul>
    <p>
    Listing format is the following:
    <p>
    <ul><li>
    <strong>Subject</strong>
    (# of follow-ups)
    <em>From</em><br>
    </ul>
    <p>
    <hr>
    <ul>
    </LISTBEGIN>

    <!-- A compact listing template
      -->
    <LITEMPLATE>
    <li>
    <strong>$SUBJECT:40$</strong>
    ($NUMFOLUP$) <em>$FROMNAME$</em><br>
    </LITEMPLATE>

    <LISTEND>
    </ul>
    <p>
    <hr>
    <strong>
    <a href="http://foo.org/">Home</a>
    </strong>
    <p>
    </LISTEND>

    <!--=== Thread Index Page Customizations ==================================-->
    <THEAD>
    <address>
    Thread index<br>
    Last updated: $LOCALDATE$<br>
    $NUMOFMSG$ messages<br>
    </address>
    <ul>
    <li><a href="$IDXFNAME$">Main Index</a></li>
    </ul>
    <hr>
    </THEAD>

    <!--=== Message Customizations ============================================-->
    <EXCS override>
    apparently
    errors-to
    followup
    forward
    lines
    message-id
    mime-
    nntp-
    originator
    path
    precedence
    received
    replied
    return-path
    status
    via
    x-
    </EXCS>

    <LABELSTYLES>
    -default-
    subject:strong
    from:strong
    to:strong
    </LABELSTYLES>

    <FIELDSTYLES>
    -default-
    subject:strong
    from:strong
    to:strong
    keywords:em
    newsgroups:strong
    </FIELDSTYLES>

    <MSGHEAD>
    <address>
    MHonArc test archive
    </address>
    </MSGHEAD>

    <MSGFOOT>
    <strong>
    <a href="http://foo.org/">Home</a> |
    <a href="$IDXFNAME$">Main Index</a> |
    <a href="$TIDXFNAME$">Thread Index</a>
    </strong>
    </MSGFOOT>

    <!--=== Icons =============================================================-->
    <ICONS>
    application/octet-stream:http://foo.org/icons/binary.xbm
    application/postscript:http://foo.org/icons/postscript.xbm
    audio/basic:http://foo.org/icons/sound.xbm
    image/gif:http://foo.org/icons/image.xbm
    image/jpeg:http://foo.org/icons/image.xbm
    image/tiff:http://foo.org/icons/image.xbm
    multipart/alternative:http://foo.org/icons/alternative.xbm
    multipart/digest:http://foo.org/icons/text.xbm
    multipart/mixed:http://foo.org/icons/mixed.xbm
    multipart/parallel:http://foo.org/icons/mixed.xbm
    text/richtext:http://foo.org/icons/mixed.xbm
    text/html:http://foo.org/icons/mixed.xbm
    text/plain:http://foo.org/icons/text.xbm
    unknown:http://foo.org/icons/unknown.doc.xbm
    video/mpeg:http://foo.org/icons/movie.xbm
    video/quicktime:http://foo.org/icons/movie.xbm
    </ICONS>

More examples are available under Appendix: Resource File Examples.

## Version

1.0

## See Also

[Prev: QUIET] | [Resources][TOC] | [Next: RECONVERT]