1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538
|
<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>
|