Gnus development mailing list
 help / color / mirror / Atom feed
* [gnu.emacs.gnus] Setting up an nndir version of a mailing list or newsgroup?
@ 1996-11-29  8:21 Joev Dubach
  1996-11-30 13:13 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Joev Dubach @ 1996-11-29  8:21 UTC (permalink / raw)


I didn't get any reply to this on gnu.emacs.gnus; does anyone here
know?

Thanks,
Joev

------- Start of forwarded message -------
Newsgroups: gnu.emacs.gnus
Subject: Setting up an nndir version of a mailing list or newsgroup?
From: dubach1@fas.harvard.edu (Joev Dubach)
Date: 23 Nov 1996 05:50:26 -0500

Is there a boilerplate way of setting up nndir "newsgroups" like
ding-list or ding-list-recent?

For example, a newsgroup I read doesn't propogate well, and there are
some people I'd like to be able to read it who don't have access to my
newsserver.  Somebody else has already set up a mailing-list/newsgroup
gateway, but since the group is high-traffic, it would ideally not
have to be distributed by mail.

Of course, there's also the possibility that some people won't be
willing/able to use Gnus, so it'd be nice to set it up so that it
could also be (slightly less conveniently) read in some sort of HTML
form, but that's secondary.  The main thing is: what's the best way to
set up an nndir version of a mailing list?

Joev                          <URL:"http://www.fas.harvard.edu/~dubach1/">

  ">What are the VMS machines? VAXstations?
   I believe they are ENIACs powered by multiple gerbils in Habatrails
   running in parallel.  Also, the monitors are controlled by a little
   man who sits inside and writes things backwards.  You may be familiar
   with his brother, he's the guy that sits inside the ATMs and hands out
   money."
          -- Arthur Toth

------- End of forwarded message -------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gnu.emacs.gnus] Setting up an nndir version of a mailing list or newsgroup?
  1996-11-29  8:21 [gnu.emacs.gnus] Setting up an nndir version of a mailing list or newsgroup? Joev Dubach
@ 1996-11-30 13:13 ` Lars Magne Ingebrigtsen
  1996-11-30 23:49   ` Joev Dubach
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-11-30 13:13 UTC (permalink / raw)


dubach1@husc.harvard.edu (Joev Dubach) writes:

> The main thing is: what's the best way to
> set up an nndir version of a mailing list?

Just point an nndir group at it:

(gnus-group-make-directory-group "/that/directory/where/it/resides/")

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@ifi.uio.no * Lars Ingebrigtsen


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gnu.emacs.gnus] Setting up an nndir version of a mailing list or newsgroup?
  1996-11-30 13:13 ` Lars Magne Ingebrigtsen
@ 1996-11-30 23:49   ` Joev Dubach
  1996-12-01  0:17     ` Jason L Tibbitts III
  0 siblings, 1 reply; 4+ messages in thread
From: Joev Dubach @ 1996-11-30 23:49 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:

> dubach1@husc.harvard.edu (Joev Dubach) writes:
>> The main thing is: what's the best way to
>> set up an nndir version of a mailing list?

> Just point an nndir group at it:
> (gnus-group-make-directory-group "/that/directory/where/it/resides/")

Um, I mean, from an administrative standpoint: how do I shove the
mailing list into that /that/directory/where/it/wants/to/reside/?
With the .overview being set up properly?  On a reasonably continuous
schedule?

I'd think people would have a bunch of scripts for this, seeing as
there are actual mailing lists (ding-list, ding-list-recent at least)
that get filtered into nndir-friendly directories.

Joev                          <URL:"http://www.fas.harvard.edu/~dubach1/">

  "As she lay there dozing next to me, one voice inside my head kept
   saying, 'Relax... you are *not* the first doctor to sleep with one of
   his patients.'  But, another voice kept reminding me, 'Howard, you're
   a veterinarian!'"
          -- Unknown


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gnu.emacs.gnus] Setting up an nndir version of a mailing list or  newsgroup?
  1996-11-30 23:49   ` Joev Dubach
@ 1996-12-01  0:17     ` Jason L Tibbitts III
  0 siblings, 0 replies; 4+ messages in thread
From: Jason L Tibbitts III @ 1996-12-01  0:17 UTC (permalink / raw)


>>>>> "JD" == Joev Dubach <dubach1@husc.harvard.edu> writes:

JD> Um, I mean, from an administrative standpoint: how do I shove the
JD> mailing list into that /that/directory/where/it/wants/to/reside/?  With
JD> the .overview being set up properly?  On a reasonably continuous
JD> schedule?

Well, I'm the one that keeps ding-list and ding-list-recent.  Everything is
done with Procmail and and old hack that was used before (ding) could
handle Procmail spools.  Use this at your own risk, and don't use it on
modifiable groups, where Gnus will ever delete anything or touch the
.overview file.

Here is the Procmail rule for ding-list and ding-list-recent:

UMASK=022

:0
*^TOding@ifi.uio.no
{
        :0 c
        ding-list/. ding-list-recent/.

        :0 hw :ding.lock
        | ( /home/tibbs/bin/add-active-nov $LASTFOLDER; \
            /usr/local/bin/tail -500 ding-list/.overview > ding-list-recent/.overview ; \
            rm -f blurgh `ls -1t ding-list-recent/* | sed -e 1,500d` )
}


Here's add-active-nov:

#!/usr/local/bin/perl

($dir=$ARGV[0]) =~ s#/[0-9]+$##;
($num=$ARGV[0]) =~ s#.*/([0-9]+)$#$1#;
($group=$dir)   =~ s#/#\.#g;

$lines      = 0;
$chars      = (stat($ARGV[0]))[7];
$references = "";

open (HEADERS, "formail -c -a Subject: -X subject: -a From: -X from: -a Date: -X date: -a Message-ID: -X message-id: -X in-reply-to: -X references: -X lines: -X content-length: < $ARGV[0] |") || "Could not open formail";
while(<HEADERS>)
{
  chop;
  if (s/^from:[ \t]*//i) {
      $from = $_;
    }
  elsif (s/^subject:[ \t]*//i) {
    $subject = $_;
  }
  elsif (s/^date:[ \t]*//i) {
    $date = $_;
  }
  elsif (s/^message-id:[ \t]*//i) {
    $id = $_;
  }
  elsif (s/^references:[ \t]*//i) {
    s/.*\t([^\t]+)/\1/;
    $references = $_;
  }
  elsif (s/^in-reply-to:[ \t]*//i) {
    s/.*\t([^\t]+)/\1/;
    if (   $references eq "" && $_ =~ /(<[^>]+>)/) {
      $references = $1;
    }
  }
  elsif (s/^lines:[ \t]*//i) {
    $lines = $_;
  }
  elsif (s/^content-length:[ \t]*//i) {
    $chars = $_;
  }
  else {
    die "Unknown field: $_";
  }
}

close (HEADERS);

if (-f "$dir/.overview") {
  $nov = "$dir/.overview";
} elsif (-f "$dir/.nov") {
  $nov = "$dir/.nov";
} else {
  $nov = "$dir/.overview";
}

system("lockfile -! $nov.lock") || die "Could not get lock";

open (NOV, ">>$nov") || die "Could not open $nov";
printf NOV ("$num\t$subject\t$from\t$date\t$id\t$references\t$chars\t$lines\t\n");
close (NOV);

system("rm -f $nov.lock");

$act = "$ENV{'HOME'}/Mail/active";
$actold = $act . ".old";

system("lockfile -! $act.lock") || die "Could not get lock";

rename($act,$actold) || die "rename $act $!";

open(ACTIVE, "$actold") || die "Could not open $actold";
open(NEW_ACTIVE, ">$act") || die "Could not open $act";

while (<ACTIVE>) {
  s/^$group [0-9]+/$group $num/;
  print NEW_ACTIVE;
}

close ACTIVE;
close NEW_ACTIVE;
system("rm -f $act.lock");


JD> I'd think people would have a bunch of scripts for this, seeing as
JD> there are actual mailing lists (ding-list, ding-list-recent at least)
JD> that get filtered into nndir-friendly directories.

Well, not a bunch, but the above gross hacks have fed over 11000 articles
into those two groups with zero barfs so far.  I just noticed that it will
miss BCCd articles, but a match on envelope sender should fix that.

 - J<


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-12-01  0:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-29  8:21 [gnu.emacs.gnus] Setting up an nndir version of a mailing list or newsgroup? Joev Dubach
1996-11-30 13:13 ` Lars Magne Ingebrigtsen
1996-11-30 23:49   ` Joev Dubach
1996-12-01  0:17     ` Jason L Tibbitts III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).