<html> <head> <title>MHonArc Resources: RCFILE</title> <link rel="stylesheet" type="text/css" href="../docstyles.css"> </head> <body> <!--x-rc-nav--> <table border=0><tr valign="top"> <td align="left" width="50%">[Prev: <a href="quiet.html">QUIET</a>]</td><td><nobr>[<a href="../resources.html#rcfile">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next: <a href="reconvert.html">RECONVERT</a>]</td></tr></table> <!--/x-rc-nav--> <hr> <h1>RCFILE</h1> <!--X-TOC-Start--> <ul> <li><a href="#syntax">Syntax</a> <li><a href="#description">Description</a> <ul> <li><small><a href="#">Resource file syntax</a></small> <li><small><a href="#">Resource variables</a></small> <li><small><a href="#locale">Localized resource file variations</a></small> </ul> <li><a href="#default">Default Setting</a> <li><a href="#rcvars">Resource Variables</a> <li><a href="#examples">Examples</a> <li><a href="#version">Version</a> <li><a href="#seealso">See Also</a> </ul> <!--X-TOC-End--> <!-- *************************************************************** --> <hr> <h2><a name="syntax">Syntax</a></h2> <dl> <dt><strong>Envariable</strong></dt> <dd><p> <code>M2H_RCFILE=</code><var>filename</var> </p> </dd> <dt><strong>Element</strong></dt> <dd><p>N/A </p> </dd> <dt><strong>Command-line Option</strong></dt> <dd><p> <code>-rcfile </code><var>filename</var> </p> </dd> </dl> <!-- *************************************************************** --> <hr> <h2><a name="description">Description</a></h2> <p>RCFILE tells MHonArc what resource files to load. A resource file allows you to specify most of the resources set by environment variables and command-line options along with other resources to control MHonArc's behavior. </p> <p>The <tt>-rcfile</tt> command-line option can be specified multiple times. For example, </p> <table border="1" width="100%"><tr><td><pre class="shell"> prompt> <b>mhonarc -rcfile <var>file1.mrc</var> -rcfile <var>file2.mrc</var></b> ... </pre></td></tr></table> <p>Each resource file specified will be loaded in the order specified on the command-line. </p> <h3>Resource file syntax</h3> <P>Resources are set in the file by using <EM>elements</EM> similiar in style to HTML/XML markup. However, MHonArc uses simpler parsing rules for the resource file than standard XML: </P> <UL> <LI><P>Any line that is not a recognized element open tag, <EM>and</EM> the line is not contained within an element, is ignored. This implies that regular text can be put anywhere <STRONG>outside</STRONG> of recognized elements for commenting purposes. </P> <table class="note" width="100%"> <tr valign=top> <td><strong>NOTE:</strong></td> <td width="100%"><p>You should use XML comment declarations (<CODE><!-- </CODE>...<CODE> --></CODE>) when commenting a resource file. This will eliminate possible conflicts if more stricter parsing rules are adopted. </p> </td> </tr> </table> <br> <LI><P>The open tag of an element must occur by itself on a single line.</P> <p><b>Correct</b>: </p> <pre class="code"> <b><u><LiTemplate></u></b> <li><strong>$SUBJECT$</strong> <ul><li><em>From</em>: $FROM$</li></ul> </li> </LiTemplate> </pre> <p><b>Wrong</b>: </p> <pre class="code"> <b style="color: red;"><u><LiTemplate></u></b><li><strong>$SUBJECT$</strong> <ul><li><em>From</em>: $FROM$</li></ul> </li> </LiTemplate> </pre> <p> </p> </li> <LI><P>Comments inside elements are treated as part of the element content. </P> <LI><P>Each element must have a close tag, <CODE></</CODE><VAR>element_name</VAR><CODE>></CODE>, on its own line.</p> <p><b>Correct</b>: </p> <pre class="code"> <LiTemplate> <li><strong>$SUBJECT$</strong> <ul><li><em>From</em>: $FROM$</li></ul> </li> <b><u></LiTemplate></u></b> </pre> <p><b>Wrong</b>: </p> <pre class="code"> <LiTemplate> <li><strong>$SUBJECT$</strong> <ul><li><em>From</em>: $FROM$</li></ul> </li><b style="color: red;"><u></LiTemplate></u></b> </pre> <p>Close tags are not needed for boolean resources. </P> </li> <LI><P>Some elements can take an optional attribute called "<CODE>Override</CODE>". This tells MHonArc that the contents of the element will completely override the default behavior of MHonArc and previous instances of the element. Example: "<tt class="icode"><EXCS Override></tt>". If "<tt class="icode">Override</tt>" is not specified, then the contents of the element augment the current setting. </P> <LI><P>Some elements can take an optional attribute called "<CODE>Chop</CODE>". This tells MHonArc to remove the last line-break of the element's content. </P> <LI><P>Element names are case-insensitive. </P> <LI><P>Elements can occur in any order in the resource file. </P> <LI><P>Elements <b>CANNOT</b> be nested. Many resources define the values of <a href="../rcvars.html">resource variables</a>, which may be used within resource elements: </P> <p><b>Correct</b>: </p> <pre class="code"> <b><u><TTitle> Example List Threads </TTitle></u></b> <TIdxPgBegin> <html> <head> <title><b><u>$TIDXTITLE$</u></b></title> ... </TIdxPgBegin> </pre> <p><b>Wrong</b>: </p> <pre class="code"> <TIdxPgBegin> <html> <head> <title> <b style="color: red;"><u><TTitle> Example List Threads </TTitle></u></b> </title> ... </TIdxPgBegin> </pre> </li> </UL> <H3>Resource variables</h3> <p>Many resources are allowed to have <em>resource variables</em> as part of there content. Resource variables represent data that defined during run-time: resource variables will get expanded to the appropriate value during the execution of MHonArc. For more information on resource variables, see <cite><a href="../rcvars.html">Resource Variables</a></cite>. </p> <h3><a name="locale">Localized resource file variations</a></h3> <p>MHonArc supports the ability to define locale specific variations of a resource file based upon the <a href="lang.html">LANG</a> resource setting. For example: </p> <table border="1" width="100%"><tr><td><pre class="shell"> prompt> <b>mhonarc <a class="shell" href="lang.html">-lang</a> en_US -rcfile settings.mrc</b> ... </pre></td></tr></table> <p>MHonArc will check for and read the following resource files, in order: </p> <ol> <li><tt>settings.mrc</tt></li> <li><tt>settings.mrc.en</tt></li> <li><tt>settings.mrc.en_us</tt></li> </ol> <table class="note" width="100%"> <tr valign="baseline"> <td><strong>NOTE:</strong></td> <td width="100%"><p>MHonArc will quietly ignore any locale-specific files that do not exist. </p> </td> </tr> </table> <p> </p> <table class="note" width="100%"> <tr valign="baseline"> <td><strong>NOTE:</strong></td> <td width="100%"><p>Setting <a href="lang.html">LANG</a> via a resource file element will only affect subsequent resource file resolution: subsequent resource files loaded via multiple <tt>-rcfile</tt> options and resource files loaded via the <a href="include.html">INCLUDE</a> and <a href="otherindexes.html">OTHERINDEXES</a> resources. </p> </td> </tr> </table> <p>Continuing with the previous example, the following specifies a French-Canadian archive: </p> <table border="1" width="100%"><tr><td><pre class="shell"> prompt> <b>mhonarc <a class="shell" href="lang.html">-lang</a> fr_CA -rcfile settings.mrc</b> ... </pre></td></tr></table> <p>Causing the following resource files to be examined: </p> <ol> <li><tt>settings.mrc</tt></li> <li><tt>settings.mrc.fr</tt></li> <li><tt>settings.mrc.fr_ca</tt></li> </ol> <p>The following is the list of files examined given a resource file <tt><var>file.mrc</var></tt> and the generic locale setting <tt><var>language</var>_<var>country</var>.<var>codeset</var></tt>: </p> <ol> <li><tt><var>file.mrc</var></tt></li> <li><tt><var>file.mrc</var>.<var>language</var></tt></li> <li><tt><var>file.mrc</var>.<var>language</var>.<var>codeset</var></tt></li> <li><tt><var>file.mrc</var>.<var>language</var>_<var>country</var></tt></li> <li><tt><var>file.mrc</var>.<var>language</var>_<var>country</var>.<var>codeset</var></tt></li> </ol> <p>If you manage multiple archives comprising multiple languages, you can define generic settings in a shared resource file and define language-specific overrides and/or variations in locale-specific resource files. For example, by leveraging the use of custom <a href="definevar.html">resource variables</a>, you can parameterize textual labels so the locale-specific resource files only need to define variable values instead of redefining layout. For example, the following is the default value of the <a href="nextbutton.html">NEXTBUTTON</a> resource: </p> <pre class="code"> <b><NextButton chop></b> [<a href="$MSG(NEXT)$">Date Next</a>] <b></NextButton></b> </pre> <p>To facilitate the the localization of your archives, change the resource so the button label becomes a custom resource variable reference: </p> <pre class="code"> <b><NextButton chop></b> [<a href="$MSG(NEXT)$"><b>$BUTTON-DATE-NEXT-LABEL$</b></a>] <b></NextButton></b> </pre> <p>Notice that "<tt class="icode">Date Next</tt>" has been changed to "<tt class="icode">$BUTTON-DATE-NEXT-LABEL$</tt>". In the locale specific resource file, all you need to do is define <tt>$BUTTON-DATE-NEXT-LABEL$</tt>. Continuing with the <tt>settings.mrc</tt> example, the following would be defined in <tt>settings.mrc.en</tt> to set the English version of the label: </p> <pre class="code"> <b><<a href="definevar.html">DefineVar</a> chop></b> $BUTTON-DATE-NEXT-LABEL$ Date Next <b></DefineVar></b> </pre> <!-- *************************************************************** --> <hr> <h2><a name="default">Default Setting</a></h2> <p>Nil. </p> <!-- *************************************************************** --> <hr> <h2><a name="rcvars">Resource Variables</a></h2> <p>N/A </p> <!-- *************************************************************** --> <hr> <h2><a name="examples">Examples</a></h2> <p>The following illustrates what a resource file looks like. For more examples of resource files, see <a href="../app-rcfileexs.html"><cite>Appendix: Resource File Examples</cite></a>. </p> <PRE class="code"> <!-- MHonArc resource file --> <b><<a href="sort.html">SORT</a>></b> <b><<a href="title.html">TITLE</a>></b> MHonArc test <b></TITLE></b> <b><<a href="ttitle.html">TTITLE</a>></b> MHonArc test (by thread) <b></TTITLE></b> <!--=== Index Page Customizations =========================================--> <!-- Have LISTBEGIN contain last updated information --> <b><<a href="listbegin.html">LISTBEGIN</a>></b> <address> Last updated: <a href="../rcvars.html#LOCALDATE">$LOCALDATE$</a><br> <a href="../rcvars.html#NUMOFMSG">$NUMOFMSG$</a> messages in chronological order<br> </address> <ul> <li><a href="<a href="../rcvars.html#TIDXFNAME">$TIDXFNAME$</a>">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> <b></LISTBEGIN></b> <!-- A compact listing template --> <b><<a href="litemplate.html">LITEMPLATE</a>></b> <li> <strong><a href="../rcvars.html#SUBJECT">$SUBJECT:40$</a></strong> (<a href="../rcvars.html#NUMFOLUP">$NUMFOLUP$</a>) <em><a href="../rcvars.html#FROMNAME">$FROMNAME$</a></em><br> <b></LITEMPLATE></b> <b><<a href="listend.html">LISTEND</a>></b> </ul> <p> <hr> <strong> <a href="http://example.com/">Home</a> </strong> <p> <b></LISTEND></b> <!--=== Thread Index Page Customizations ==================================--> <b><<a href="thead.html">THEAD</a>></b> <address> Thread index<br> Last updated: <a href="../rcvars.html#LOCALDATE">$LOCALDATE$</a><br> <a href="../rcvars.html#NUMOFMSG">$NUMOFMSG$</a> messages<br> </address> <ul> <li><a href="<a href="../rcvars.html#IDXFNAME">$IDXFNAME$</a>">Main Index</a></li> </ul> <hr> <b></THEAD></b> <!--=== Message Customizations ============================================--> <b><<a href="excs.html">EXCS</a> override></b> apparently errors-to followup forward lines message-id mime- nntp- originator path precedence received replied return-path status via x- <b></EXCS></b> <b><<a href="labelstyles.html">LABELSTYLES</a>></b> -default- subject:strong from:strong to:strong </LABELSTYLES> <b><<a href="fieldstyles.html">FIELDSTYLES</a>></b> -default- subject:strong from:strong to:strong keywords:em newsgroups:strong <b></FIELDSTYLES></b> <b><<a href="msghead.html">MSGHEAD</a>></b> <address> MHonArc test archive </address> <b></MSGHEAD></b> <b><<a href="msgfoot.html">MSGFOOT</a>></b> <strong> <a href="http://example.com/">Home</a> | <a href="<a href="../rcvars.html#IDXFNAME">$IDXFNAME$</a>">Main Index</a> | <a href="<a href="../rcvars.html#TIDXFNAME">$TIDXFNAME$</a>">Thread Index</a> </strong> <b></MSGFOOT></b> <!--=== Icons =============================================================--> <b><<a href="icons.html">ICONS</a>></b> application/*;[20x22]/icons/generic.gif application/msword;[20x22]/icons/layout.gif application/postscript;[20x22]/icons/ps.gif application/rtf;[20x22]/icons/layout.gif application/x-csh;[20x22]/icons/script.gif application/x-dvi;[20x22]/icons/dvi.gif application/x-gtar;[20x22]/icons/tar.gif application/x-gzip;[20x22]/icons/compressed.gif application/x-ksh;[20x22]/icons/script.gif application/x-latex;[20x22]/icons/tex.gif application/octet-stream;[20x22]/icons/binary.gif application/x-patch;[20x22]/icons/patch.gif application/pdf;[20x22]/icons/pdf.gif application/x-script;[20x22]/icons/script.gif application/x-sh;[20x22]/icons/script.gif application/x-tar;[20x22]/icons/tar.gif application/x-tex;[20x22]/icons/tex.gif application/x-zip-compressed;[20x22]/icons/compressed.gif application/zip;[20x22]/icons/compressed.gif audio/*;[20x22]/icons/sound1.gif chemical/*;[20x22]/icons/sphere2.gif image/*;[20x22]/icons/image2.gif message/external-body;[20x22]/icons/link.gif multipart/*;[20x22]/icons/layout.gif text/*;[20x22]/icons/text.gif video/*;[20x22]/icons/movie.gif */*;[20x22]/icons/generic.gif <b></ICONS></b> </PRE> <!-- *************************************************************** --> <hr> <h2><a name="version">Version</a></h2> <p>1.0 </p> <!-- *************************************************************** --> <hr> <h2><a name="seealso">See Also</a></h2> <p> <a href="lang.html">LANG</a> </p> <!-- *************************************************************** --> <hr> <!--x-rc-nav--> <table border=0><tr valign="top"> <td align="left" width="50%">[Prev: <a href="quiet.html">QUIET</a>]</td><td><nobr>[<a href="../resources.html#rcfile">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next: <a href="reconvert.html">RECONVERT</a>]</td></tr></table> <!--/x-rc-nav--> <hr> <address> $Date: 2005/06/07 19:15:44 $ <br> <img align="top" src="../monicon.png" alt=""> <a href="http://www.mhonarc.org/" ><strong>MHonArc</strong></a><br> Copyright © 1997-1999,2003, <a href="http://www.earlhood.com/" >Earl Hood</a>, <a href="mailto:mhonarc%40mhonarc.org" > mhonarc<!-- -->@<!-- -->mhonarc.org</a><br> </address> </body> </html>