On November 12, 2000 at 05:37, Jeff Hill wrote:
> I pipe incoming mail from my mailing list to MHonArc, and I need to
> duplicate the Filename, Target and Subject values going into the main
> (date) index and output them to a separate file. I want only the most
> recent entry output.
>
> By creating this as a separate, single entry file, I can include it in
> our home page (through PHP). Visitors will then be able to immediately
> see the subject of the most recent discussion on the list and click on
> it to go to the target in the main index.
>
> I've spent a number of hours looking at this and it seems the only way
> to do it is to go in and modify MHonArc directly. It seems like there
> should be a simpler solution.
If you look at the source code for the file 'mhonarc', you will
see it just calls a main library and then exists. You could create
your own version that does not exit right away, but does some
post processing to get what you want.
The %mhonarc::AddIndex hash should contain the index keys of all
messages that were added to the archive:
foreach $index (keys %mhonarc::AddIndex) {
$subject = $mhonarc::Subject{$index};
$msgpage_filename = &mhonarc::msgnum_filename($IndexNum{$index});
...
}
--ewh