🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
3 messages
3 total messages Started by informix Sat, 26 Jul 1997 00:00
newgroups lists
#35511
Author: informix
Date: Sat, 26 Jul 1997 00:00
18 lines
958 bytes
	i want to get complete lists of all available usenet groups...
	after going through 18000 messages in news.groups i realized
	i had to be lame and post a message to usenet...

	i would like to receive plain ascii lists of available usenet
	groups... ftp sites would be PERFECT... 

	i only have a DUMB terminal and html formatted lists of newsgroups
	drive me crazy...

	thanx, and aloha...

Ron!
informix@sfo.com


Re: newgroups lists
#35521
Author: Greg Wooledge
Date: Sun, 27 Jul 1997 00:00
39 lines
1804 bytes
On 26 Jul 1997 18:31:16 -0700, informix <informix@roxy.sfo.com> wrote:

>	i want to get complete lists of all available usenet groups...

I don't think that's strictly possible.  Maybe this would be helpful:

==========================================================================
#!/usr/bin/perl

use Net::Telnet;
$news = new Net::Telnet();
$news->open (Host => "news", Port => 119, Timeout => 90);

$news->cmd (String => "", Prompt => '/^2[0-9][0-9] .*$/');	# wait
$news->print ("list");

# List will be preceded by 2nn response.
do {
	$line = $news->getline();
} until $line =~ /^2[0-9][0-9] .*$/;

# List will be terminated by line containing only a period.
do {
	$line = $news->getline(Timeout => 90);
	print $line;
} until $line eq ".\r\n";

$news->close;
==========================================================================

It's pretty primitive -- tweak to suit your needs.  Or pipe it through
sort, whatever you want. :-)
-- 
------------                  Greg Wooledge                  -------------
-------                   wooledge@kellnet.com                     -------
---              http://kellnet.com/wooledge/main.html                 ---

Re: newgroups lists
#35544
Author: lvirden
Date: Tue, 29 Jul 1997 00:00
37 lines
1675 bytes

According to Greg Wooledge <wooledge@kellnet.com>:
:On 26 Jul 1997 18:31:16 -0700, informix <informix@roxy.sfo.com> wrote:
:
:>	i want to get complete lists of all available usenet groups...
:
:I don't think that's strictly possible.  Maybe this would be helpful:

Actually, using this code , passing an NNTP news server as the first argument
should give you a list of the newsgroups in the news server's active file.

#!/ldata2/bin/perl -w
use strict;
use diagnostics;
use English;
use Net::NNTP;
my ($p_nh) = @ARGV;
my ($nh, $newsgroup, $ng);
$nh = Net::NNTP->new($p_nh);
if (!$nh) {
  die "$p_nh wasn't a valid newshost!"
}
$ng = $nh->active();
foreach $newsgroup (keys %$ng) {
  print "$newsgroup\n";
}
$nh->quit;


-- 
Larry W. Virden                 INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads