I'm forwarding a private response I made to a mharc user that
may be of interest to other users. It discusses how one can apply
resource settings on a per-archive basis:
------- Forwarded Message
Mharc has a feature to do line-wrapping on message bodies. When used
on a bug report list, this sometimes this messes up test cases which
involve intentionally long lines. I am trying to think of ways that
Mharc could solve this problem.
The main resource file, common.mrc.in, has the following settings:
<MIMEArgs override>
m2h_external::filter; inline useicon
m2h_text_plain::filter; attachcheck quote maxwidth=80
m2h_text_html::filter; notitle
</MIMEArgs>
You can remove the "maxwidth=80" setting,
but this will affect all archives (note see
<http://www.mhonarc.org/mharc/doc/install.html#customizations> about
editing the main resource file and how ".in" files are handled).
Alternatively, there is an undocumented feature where you can specify
resource settings on a per-archive basis. Say the archive in questions
is called "bugs" (the name used is what is used in lists.def). To
have unique resource settings just for bugs, create the following
file:
$MHA_RC_DIR/bugs.mrc.in
($MHA_RC_DIR is normally $SW_ROOT/lib/mrc; check your config.sh).
In the file, you can add the following to remove line wrapping,
and any other options that may mess up your messages:
<MIMEArgs>
m2h_text_plain::filter;
</MIMEArgs>
Then, from $SW_ROOT, run:
make configure
Future updates to the archive should get the new settings. If
you need to reprocess an existing messages for an archive, you
can do:
$SW_ROOT/bin/web-archive -rebuild -verbose -keepsearch bugs
Make sure to specify the archive name, otherwise all archives will
be rebuilt. You can leave out -verbose if you do not want to see
any progress diagnostics.
CAUTION: Do not use "-keepsearch" if you have removed messages from
the raw mail archives since resulting HTML message pages may have
different URIs than what is stored within the search index.
If you have multiple archives you want to apply the same settings to,
you can create a resource file to represent those settings and then
reference the resource file in the archive-specific resource file.
For example:
1. Create the file $MHA_RC_DIR/_bug_list.mrc.in.
2. Edit the file to contain:
<MIMEArgs>
m2h_text_plain::filter;
</MIMEArgs>
and any other applicable resource settings.
3. Within the archive-specific resource file template (continuing
with the example above, it would $MHA_RC_DIR/bugs.mrc.in), add
the following:
<Include>
@@MHA_RC_DIR@@/_bug_list.mrc
</Include>
(The "@@MHA_RC_DIR@@" is what you literally put in the file).
4. From $SW_ROOT, run:
make configure
With the above, you centralize your settings for bug report lists
and avoid having to copy-n-paste the same settings for multiple
lists.
I hope this helps,
--ewh
------- End of Forwarded Message
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHARC-USERS