🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #54836

Re: XNEWS: Importing Folders

#54836
From: Luu Tran
Date: Fri, 03 Dec 1999 00:00
41 lines
1578 bytes
director@gti.net (Jeff Knapp) wrote in
<s4d6q25bdi431@news.supernews.com>: 

>Since my Perl skills are lame at best and VB's handling of such like
>this sucks, I will stick with running it thru NewsXpress and then into
>Xnews. 
>

Give this a try.  I syntax checked it but didn't test it.  You can run it 
in Unix or Win32 with 

perl script.pl <infile >outfile

This assumes the first line contains a header common to all articles, 
e.g., Path:

Good luck.


---------------

$hdr = 'From ???@0x00000000 Mon Jan 01 00:00:00 1999' . "\n";

while (<>) {
	if (/^([^:\s]+\s)/) {
		$first = "^$1";
		print $hdr;
		print "$_\n";
		while (<>) {
			print $hdr if (/$first/);
			print "$_\n";
		}
	}
}
		

-- 
  luu 
author of Xnews - http://xnews.3Dnews.net

Technical Details
Message-ID: <8E90DDF6Cluutrangeocities@207.126.101.100>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <s30hvltjhsq55@news.supernews.com> <8E7FE747Eluutrangeocities@207.69.128.140> <8E8C886C9directorgtinet@207.126.101.97> <8E8CDE68Bluutrangeocities@207.126.101.97> <s4d6q25bdi431@news.supernews.com>

Show Full Headers
Complete Article Headers
Message-ID: <8E90DDF6Cluutrangeocities@207.126.101.100>
Subject: Re: XNEWS: Importing Folders
Date: Fri, 03 Dec 1999 00:00:00 +0000
From: luutran@geocities_.com.invalid (Luu Tran)
References: <s30hvltjhsq55@news.supernews.com> <8E7FE747Eluutrangeocities@207.69.128.140> <8E8C886C9directorgtinet@207.126.101.97> <8E8CDE68Bluutrangeocities@207.126.101.97> <s4d6q25bdi431@news.supernews.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 556089362
Organization: Daedalus
User-Agent: Xnews/2.11.30p
Newsgroups: news.software.readers
X-Complaints-To: newsabuse@supernews.com