Yuri D'Elia wrote:
> In article <[EMAIL PROTECTED]>,
> Greg Ercolano <[EMAIL PROTECTED]> wrote:
>> It might be a read only 'archive' of the newsgroup, and was only
>> started a few weeks ago; I don't think they've synced up with the
>> existing messages, just the ones from that day forward.
>
> Note that it's fully bi-directional, posting is allowed from gmane.
> In fact, I'm posting from gmane's nntp (one server window less in my
> client setup).
Ahh, sorry; not familiar with gmane.
Yes, looks like under the '- Action -' link at the top, there's
a way to post replies; I missed that. Huh, so I guess it acts
as an NNTP client as well.. neat.
> Searching is also very fast, importing the archives into gmane would be
> nice for that reason; but I don't want to use newssuck or similar tools
> to extract the archives.
>
> If one of the server admins is interested and could tar-gz the spool, I
> can help and do the rest.
It's easy to yank the whole group over NNTP with the small perl
script (below) saving all the messages as individual ascii files.
I put in a 3 sec sleep delay between each message download
to be nice to mike's news server.
I can pull the newsgroup for you and email you a tar.gz file of
all the messages.
I've already started the dl, so probably in about 4 hours I should
have a tar file for you.
#!/usr/bin/perl -w
use Net::NNTP;
# nntp-download - Download an entire newsgroup to current directory
# [EMAIL PROTECTED] 11/13/2006
### MAIN
{
my $host = "news.easysw.com"; # NNTP server to connect to
my $port = 119; # port to use (119 normally)
my $group = "fltk.general"; # newsgroup to work with
# OPEN CONNECTION TO SERVER
my $nntp;
if ( ! defined ( $nntp = Net::NNTP->new($host, 'Port' => $port) ) ) {
print STDERR "Net::NNTP->new() failed: $!\n";
exit(1);
}
# SELECT THE GROUP
unless ( $nntp->group($group) ) {
print STDERR "group($group) failed: $!\n";
exit(1);
}
# LOAD LIST OF ARTICLES
my $articles = $nntp->listgroup($group);
my $num_articles = [EMAIL PROTECTED];
if ( $num_articles < 0 ) {
print STDERR "listgroup() for $group failed: $!\n";
exit(1);
}
# LOOP THROUGH ARTICLES, GRAB EACH TO CURRENT DIRECTORY
foreach my $msgnum ( sort( { ($a+0) <=> ($b+0) } @{$articles} ) ) {
printf(STDERR "Working on %s/$num_articles \r", $msgnum);
unless ( open(MSG, ">$msgnum") ) {
print STDERR "$msgnum: can't open the file for writing ($!)\n";
exit(1);
}
print MSG @{$nntp->article($msgnum)};
close(MSG);
sleep(3); # don't overload the news server; 3 sec delay
between each msg
}
print STDERR "Done" . (" "x40) . "\n";
$nntp->quit;
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk