[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting text of message as resource variable



On May 1, 2002 at 17:49, "Edward Wildgoose" wrote:

> I am actually hoping to put the whole email inline, so I guess that I can
> look at pre-parsing, or perhaps it would be worth looking at adding the
> parsing into the main code and generating a similar variable containing the
> whole message body?  Do you think that this will be difficult to add?

It is on the TODO list, but the problem is with capatibility.  Old
versions of MHonArc did not properly delimit the message header and
body.  I think it is doable, but there will have to be some capatibility
code added to handle messag pages converted with old versions.

Also, if done, the resource variable representing the message body
would not be available for index pages without a significant performance
hit.  I.e.  Each message page body would have to be opened and parsed
to extract out the message body text for index pages.

> Where would I find the $NOTE$ variable being assigned to in the code?  (If
> asking this is lazy then please don't reply, I haven't got the code with me
> at the moment so I haven't tried to look for it myself)

mhnote.pl shows you what MHonArc does when invoking it to define
annotations for messages.  You can add annotations to message outside
of MHonArc.  All you need to do is create files in the location of the
NOTESDIR resource.  The filenames are the message-ids of the messages.
See the mhonarc::msgid_to_filename() routine (in mhutil.pl) on how
MHonArc convertes a message-id into a filename.

> Also a quick structural question that I can't quite work out.  If I have a
> complete maildir of mail, and I process this once.  How much "processing
> power" and "IO" will be required to re-run the index page generation again,
> assuming that no new mail arrives into the Maildir location?  Will it be a
> quite lightweight operation the second time (it appears to be) or is the
> whole thing recreated?

If you use the -add option, the archive is only updated, not
re-created.  Note, if input is a MH-style directory, you do get
the overhead of MHonArc opening each message file to determine if
it already exists in the archive or is new.  The overhead may be
not be a problem depending on the number of files in the directory.
It is generally cleaner to refile the raw message files to a different
location after MHonArc has processed the directory.

BTW, if you just want to re-generate index pages, just use the
-editidx option with the -nomsgpgs options.  This avoids MHonArc
re-editing all the message pages.  The -editidx option allows you
to adjust page layout without providing mail input.

--ewh


[Index of Archives]     [Bugtraq]     [Yosemite News]     [Mhonarc Home]