🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #189762

Re: [Dialog] Rewriting subject lines?

#189762
From: foxidrive
Date: Wed, 23 Aug 2006 02:57
49 lines
2640 bytes
On Tue, 22 Aug 2006 21:02:58 -0400, Jay Levitt wrote:

> I use Dialog to read the gmane.comp.lang.ruby.rails newsgroup at gmane.org.
> This is, in turn, a gateway for a mailing list which prepends "[Rails]" to
> each subject line.
> 
> Unfortunately, Dialog isn't smart enough to know that "[Rails] Re: blah" is
> a reply to "[Rails] blah", since the Re: is in the middle of the line.
> 
> Is there a way to rewrite the subject line, removing the prefix, so that
> Dialog will detect the thread properly?
> 
> Jay Levitt

I use this script to remove "[MFC] " sans quotes from emails.
You'll need somebody clever to change the 'IsEmail' to work for a newsgroup
and of course alter the text that you want removed.

=====================================================================
program OnBeforeSavingMessage;

const NameofList = '['+'MFC'+'] ';

procedure OnBeforeSavingMessage(var Message: TStringlist;
                                    Servername: string;
                                    IsEmail: boolean);
var
i,p: integer;
Soggetto: string;
begin
 if IsEmail then begin
   for i:=0 to message.count-1 do begin
   	if copy (message[i], 1, 9)='Subject: ' then begin
		p := pos (NameofList, message[i]); 
   		if p > 0 then begin
            		Soggetto := message[i];
            		delete (Soggetto, p, Length(NameofList));
            		message[i]:=Soggetto;
                end;
		break;   		
   	end
   	else if message[i]='' then break;   
   end;
  end;
end;

begin
end.
=====================================================================
Technical Details
Message-ID: <6tja8jli3pcz.ub875qie6oee.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nntp.waia.asn.au!202.72.130.18.MISMATCH!quokka.wn.com.au!figjam.pipenetworks.com!218.100.0.53.MISMATCH!not-for-mail
References: <xzs9foinnu3b.dlg@jay.fm>

Show Full Headers
Complete Article Headers
Message-ID: <6tja8jli3pcz.ub875qie6oee.dlg@40tude.net>
Subject: Re: [Dialog] Rewriting subject lines?
Date: Wed, 23 Aug 2006 12:57:35 +1000
From: foxidrive <woohoo@gotcha.invalid>
References: <xzs9foinnu3b.dlg@jay.fm>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nntp.waia.asn.au!202.72.130.18.MISMATCH!quokka.wn.com.au!figjam.pipenetworks.com!218.100.0.53.MISMATCH!not-for-mail
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.1 (a1ef839e.464.37)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Lines: 49
NNTP-Posting-Host: 202.63.44.174
X-Trace: 1156301853 uq-127creek-reader-03.brisbane.pipenetworks.com.au 495
X-Complaints-To: Abuse, including message IDs to abuse@pipenetworks.com