🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Ross Presser Tue, 07 Mar 2000 00:00
Re: Xnews importing Agent's files?
#59006
Author: Ross Presser
Date: Tue, 07 Mar 2000 00:00
25 lines
1381 bytes
alt.distinguished.richey@nospam.plz (Richey / Delphi-
Box).wrote.posted.offered:

>Hello,
>
>is it possible to import Agent's .dat/.idx files into XNews
>or is support planned for changing from Agent to XNews?
>
>This would be great and really ease my decision in leaving Agent...

1) See if Agent can export a standard .newsrc file.  I seem to remember 
it can.  This would prevent you from having to reread old messages or 
do catchups.

2) IIRC, you can export a folder or group in Agent into a "Unix Message 
File".  This is, I believe, exactly the same format as Xnews' folder 
files.

-- 
Ross Presser
ross_presser@imtek.com
"And if you're the kind of person who parties with a bathtub full of
pasta, I suspect you don't care much about cholesterol anyway."

RE: Xnews importing Agent's files?
#59085
Author: H. Merijn Brand
Date: Thu, 09 Mar 2000 00:00
23 lines
1768 bytes
from.email@address.invalid (EagleStorm) wrote in 
<d61bcs4275joi452mj6hmj9l2th3s2u88i@4ax.com>:

>� Ross Presser � <8EF0737C5pt101594@207.211.168.90> wrote:
>
>>2) IIRC, you can export a folder or group in Agent into a "Unix Message 
>>File".  This is, I believe, exactly the same format as Xnews' folder 
>>files.
>IMHO, this is a questionable assertion.

Perl has come in handy in converting broken .mbx formats to .mbx
X-News can read. I've done so for Becky!, Pegasus (both unix formatted
mail boxes and .pmm files). Pegasus' .mbx files make you cry! Hope
upcoming version 4 is better

-- 
H.Merijn Brand
using perl5.005.03 on HP-UX 10.20, HP-UX 11.00, AIX 4.2.1, AIX 4.3.0, DEC
     OSF/1 4.0 and WinNT 4.0 SP-6a, often with Tk800.018 and/or DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/
Member of Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)

Re: Xnews importing Agent's files?
#59087
Author: Arkadiusz Mucha
Date: Thu, 09 Mar 2000 00:00
22 lines
1774 bytes
On Tue, 07 Mar 2000 23:41:37 +0100, EagleStorm
<from.email@address.invalid> wrote:

>� Ross Presser � <8EF0737C5pt101594@207.211.168.90> wrote:
>
>>2) IIRC, you can export a folder or group in Agent into a "Unix Message 
>>File".  This is, I believe, exactly the same format as Xnews' folder 
>>files.
>IMHO, this is a questionable assertion.

Yes, it is indeed questionable.  I noticed that each message in my
XNews archive folder is preceded by a line similar to this :
From ???@0x000007DA Pn lut 07 12:24:11 2000
(The date is in Polish so it should be different on your systems)
I exported Agent messages by appending them to the archive.mbx file,
using the line quoted above as the delimiter, and it worked. Even the
dates were correct. 

Arkadiusz Mucha


Re: Xnews importing Agent's files?
#59106
Author: Ross Presser
Date: Fri, 10 Mar 2000 00:00
29 lines
1816 bytes
alt.distinguished.arkmucha@priv2.onet.pl (Arkadiusz
Mucha).wrote.posted.offered: 

>On Tue, 07 Mar 2000 23:41:37 +0100, EagleStorm
><from.email@address.invalid> wrote:
>
>>� Ross Presser � <8EF0737C5pt101594@207.211.168.90> wrote:
>>
>>>2) IIRC, you can export a folder or group in Agent into a "Unix
>>>Message File".  This is, I believe, exactly the same format as
>>>Xnews' folder files.
>>IMHO, this is a questionable assertion.
>
>Yes, it is indeed questionable.  I noticed that each message in my
>XNews archive folder is preceded by a line similar to this :
>From ???@0x000007DA Pn lut 07 12:24:11 2000
>(The date is in Polish so it should be different on your systems)
>I exported Agent messages by appending them to the archive.mbx file,
>using the line quoted above as the delimiter, and it worked. Even
>the dates were correct. 

Guess I was wrong.  Wasn't the first time, won't be the last.
-- 
Ross Presser
ross_presser@imtek.com
"And if you're the kind of person who parties with a bathtub full of
pasta, I suspect you don't care much about cholesterol anyway."

RE: Xnews importing Agent's files?
#59133
Author: H. Merijn Brand
Date: Fri, 10 Mar 2000 00:00
125 lines
4244 bytes
arkmucha@priv2.onet.pl (Arkadiusz Mucha) wrote in 
<8a8r1d.3vvk945.0@burczy.mucha.pl>:

>On Tue, 07 Mar 2000 23:41:37 +0100, EagleStorm
><from.email@address.invalid> wrote:
>
>>� Ross Presser � <8EF0737C5pt101594@207.211.168.90> wrote:
>>
>>>2) IIRC, you can export a folder or group in Agent into a "Unix Message 
>>>File".  This is, I believe, exactly the same format as Xnews' folder 
>>>files.
>>IMHO, this is a questionable assertion.
>
>Yes, it is indeed questionable.  I noticed that each message in my
>XNews archive folder is preceded by a line similar to this :
>From ???@0x000007DA Pn lut 07 12:24:11 2000

Which might lead to messages in the thread having '0' lines :-(

>(The date is in Polish so it should be different on your systems)
>I exported Agent messages by appending them to the archive.mbx file,
>using the line quoted above as the delimiter, and it worked. Even the
>dates were correct. 
>
>Arkadiusz Mucha

Same for Pegasus. Solution (See # <<<<<<<<<) for converting Pegasus
mail files to Becky!.

--------------------------8<---------------------------------------
#!/usr/bin/perl

use strict;

# Change this to your needs
chdir "E:/Work/Mail" or die "Cannot chdir to PMail dir: $!";

my %hier = ();
open HIERARCH, "HIERARCH.PM";
while (<HIERARCH>) {
    my @h = split m/"*,"*/, $_, 5;
    $h[0] == 0 or next;

    chomp $h[4];
    $h[4] =~ s/"$//;

    my @f = split m/:/ => $h[2];
    my @n = split m/:/ => $h[3];

    my $pmm = $f[2];
    if ($pmm =~ m/^UNX/) {
	$pmm .= ".MBX";
	}
    else {
	$pmm .= ".PMM";
	}
    my $bnm = "$n[1] - $h[4].mbx";

# Change this to your needs
    chdir "E:/Work/Mail" or die "Cannot chdir to PMail dir: $!";
    -e $pmm or next;
    unless (open PMM, "<$pmm") {
	warn "$pmm: $!";
	next;
	}

# Change this to your needs
    chdir "E:/Work/Becky/wardan/Conv" or die "Cannot chdir to Conv dir: 
$!";
    open BECK, ">>$bnm" or die "$bnm: $!";

    if ($pmm =~ m/^UNX/) {
	local $/ = "From ???\@??? ";    	# <<<<<<<<<<<<<<<<<<
	while (<PMM>) {
	    chomp;

	    s/^\w\w\w \w\w\w \d\d \d\d:\d\d:\d\d [ \d]?\d\d\d\n//;
	    s/[\s\n]+$//;

	    m/^\S/ or next;

	    s/^(From:\s+-\s+.*\n)+//;

	    my $dte = (m/^(Date:\s+.+)$/im)[0];
	    my $frm = (m/^(From:\s.+)$/im)[0];
	    my $sbj = (m/^(Subject:\s.+)$/im)[0];

	    defined $frm and print BC $frm, "\n";
	    defined $sbj and print BC $sbj, "\n";
	    defined $dte and print BC $dte, "\n";
# Change "\n.\n" to "\n\n" for X-News
	    print BECK $_, "\n.\n";
	    }
	}
    else {
	binmode PMM;
	my $posts;
	sysread PMM, $_, 84 + 42;
	{ local $/ = undef;
	  $posts = <PMM>
	  }
	close PMM;

	foreach my $post (split m/\cZ/ => $posts) {
	    $post =~ s/^\0+//;
	    $post =~ s/\r+//g;
	    $post =~ s/[\r\n\0]+$//;
# Change "\n.\n" to "\n\n" for X-News
	    print BECK $post, "\n.\n";
	    }
	}
    close PMM;
    close BECK;
    }
close HIERARCH;
-------------------------->8---------------------------------------

-- 
H.Merijn Brand
using perl5.005.03 on HP-UX 10.20, HP-UX 11.00, AIX 4.2.1, AIX 4.3.0, DEC
     OSF/1 4.0 and WinNT 4.0 SP-6a, often with Tk800.018 and/or DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/
Member of Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)

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