Re: pulling data from the mhonarc databases...

1998-04-22 13:49:03
On April 21, 1998 at 22:46, Chuq Von Rospach wrote:

Has anyone tried this? I'd like to be able to pull out and possibly
manipulate data in the mhonarc databases, so I can generate things like
on-the-fly HTMLized digests (one thing I'd like to offer users is the
ability to be e-mailed a Table of Contents, and then they'd could click
on URLs to bring up articles that intereset them. since I've already
got the articles in mhonarc, extending it seems like a perfect thing --
but I need to be able to programmatically get, say,
"subject/author/URL" for all messages posted in the last "N" seconds
(or minutes, or hours. Basically, since a previous timestamp). then
format and mail the ToC.

You may want to look at the GENIDX resource and IDXSIZE resource.
You can have an index created that shows the last X messages (not
as good a last N seconds, but may be adequate).  With a custom
resource file, you can get what you want.  Example invocation:

    mhonarc -rcfile digest.rc -genidx -idxsize 50 -sort -outdir /some/path

will create an index to stdout with the last 50 messages of /some/path
using the formatting specified in digest.rc.

To get the proper links/urls in the output, make sure digest.rc
redefines the proper resources (eg LITEMPLATE) to use absolute URLs
since the page will be sent out in email.  Or, just define the <BASE>
(via the IDXPGBEGIN resource) element in the page so all relative URLs
will get resolved properly (probably the better approach).


             Earl Hood              | University of California: Irvine
      ehood(_at_)medusa(_dot_)acs(_dot_)uci(_dot_)edu      |      Electronic 
Loiterer | Dabbler of SGML/WWW/Perl/MIME

<Prev in Thread] Current Thread [Next in Thread>