On 6/1/05, Earl Hood <earl(_at_)earlhood(_dot_)com> wrote:
On June 1, 2005 at 12:00, East Coast Coder wrote:
The CBMessageRead callback provides me with everything I need. I'd
like to take it from there - that is, handle all of the databasing and
message output. Is there anyway to tell MHonArc to stop after that
callback? I know that CBMessageHeadRead supports a return 0 to do
this, but CBMessageRead doesn't.
If you do not want mhonarc to output a message page, why do you
need mhonarc to parse the message body?
I need mhonarc to do two things:
1) Parse the mbox format
2) Convert all of the content types into HTML
What I don't want is for mhonarc to save the results of #2 into a
file. I'd rather it hand it off to me (which it does, via the
callback), and let me handle saving it myself - I'm working on
nonstandard uses of it, as opposed to generating a collection of html
Is there a configuration option that could set this - don't write to
the db, don't write to any files, just run the callbacks. Or do I
need to modify some of the code (what?)?
You can suppress the creation of message pages by passing
the -nomsgpgs option to process_input(). Note, if you do use
-nomsgpgs, then the message bodies are completely skipped, bypassing
any callbacks related to message bodies.
This won't work for me - see above. So I guess I'll need to modify
the source a little bit. Any suggestions on the least invasive way to
As for the db, you can register a $mhonarc::CBDbPreSave callback and
have it return a false value to prevent the database file from being
written. It would be nicer to have a -nodb option, but I have not
implemented it. It should be easy to do if the $mhonarc::CBDbPreSave
method is not desirable.
Okay - I assume that not having a db won't cause a crash anywhere (of
course, the features that require it won't work).
Note, if you plan to render the messages yourself, you could use
mhonarc to help out in this via the -single mode.
I need to do lots of messages at once, high speed, so I don't think
this will work: a) the overhead of fork()/exec()/parse/compiling
mhonarc each time (although it could be wrapped into a sub) and b) I
want to process a mbox, not an individual message.
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV