Thread View: news.software.readers
8 messages
8 total messages
Started by Jay Levitt
Wed, 23 Aug 2006 01:02
[Dialog] Rewriting subject lines?
Author: Jay Levitt
Date: Wed, 23 Aug 2006 01:02
Date: Wed, 23 Aug 2006 01:02
11 lines
1664 bytes
1664 bytes
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
Re: [Dialog] Rewriting subject lines?
Author: foxidrive
Date: Wed, 23 Aug 2006 02:57
Date: Wed, 23 Aug 2006 02:57
49 lines
2640 bytes
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.
=====================================================================
Re: [Dialog] Rewriting subject lines?
Author: Korbinian Abenthum
Date: Wed, 23 Aug 2006 08:53
Date: Wed, 23 Aug 2006 08:53
46 lines
2612 bytes
2612 bytes
foxidrive wrote:
> On Tue, 22 Aug 2006 21:02:58 -0400, Jay Levitt wrote:
>> Is there a way to rewrite the subject line, removing the prefix, so that
>> Dialog will detect the thread properly?
> 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.
Change line 12 from
| if IsEmail then begin
to
| if NOT IsEmail then begin
-----8<------
program OnBeforeSavingMessage;
const NameofList = '[Rails] ';
procedure OnBeforeSavingMessage(var Message: TStringlist;
Servername: string;
IsEmail: boolean);
var
i,p: integer;
Soggetto: string;
begin
if NOT 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.
Re: [Dialog] Rewriting subject lines?
Author: Jay Levitt
Date: Wed, 23 Aug 2006 14:30
Date: Wed, 23 Aug 2006 14:30
18 lines
2009 bytes
2009 bytes
On Wed, 23 Aug 2006 10:53:24 +0200, Korbinian Abenthum wrote: >> 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. > > Change line 12 from >| if IsEmail then begin > to >| if NOT IsEmail then begin Hmm.. that script looks like it oughta work, but for some reason, that event isn't triggering. I added a WriteToLog line at the start, and it never displays when I clear the group and then sample headers. I've compiled the script and reloaded all scripts; is there something else I need to do? Jay
Re: [Dialog] Rewriting subject lines?
Author: Korbinian Abenthum
Date: Sun, 27 Aug 2006 09:09
Date: Sun, 27 Aug 2006 09:09
12 lines
1983 bytes
1983 bytes
Jay Levitt wrote: > Hmm.. that script looks like it oughta work, but for some reason, that > event isn't triggering. I added a WriteToLog line at the start, and it > never displays when I clear the group and then sample headers. I've > compiled the script and reloaded all scripts; is there something else I > need to do? A "OnBeforeSaving"-script only triggers when you are downloading the body. Are you doing that, or are you really just getting the headers? If you get the bodies, then maybe scripting is deactivated. Turn "Settings -> Scripting -> Enabled Scripting" on.
Re: [Dialog] Rewriting subject lines?
Author: Jay Levitt
Date: Sun, 27 Aug 2006 20:44
Date: Sun, 27 Aug 2006 20:44
12 lines
1927 bytes
1927 bytes
On Sun, 27 Aug 2006 11:09:43 +0200, Korbinian Abenthum wrote: > A "OnBeforeSaving"-script only triggers when you are downloading the body. > Are you doing that, or are you really just getting the headers? > If you get the bodies, then maybe scripting is deactivated. Turn "Settings > -> Scripting -> Enabled Scripting" on. Ah.. that won't work for me, then. I want to rewrite the subject lines as I'm receiving headers, since I only download bodies if the particular article's of interest to me. Jay
Re: [Dialog] Rewriting subject lines?
Author: Korbinian Abenthum
Date: Sun, 03 Sep 2006 10:39
Date: Sun, 03 Sep 2006 10:39
26 lines
2745 bytes
2745 bytes
Jay Levitt wrote: > On Sun, 27 Aug 2006 11:09:43 +0200, Korbinian Abenthum wrote: >> A "OnBeforeSaving"-script only triggers when you are downloading the body. >> Are you doing that, or are you really just getting the headers? >> If you get the bodies, then maybe scripting is deactivated. Turn "Settings >> -> Scripting -> Enabled Scripting" on. > Ah.. that won't work for me, then. I want to rewrite the subject lines as > I'm receiving headers [...] Ok, I think the above script wouldn't have helped you in any case, since threading by subject appears to be done only when getting the XOver information (i.e. when getting headers). I tried changing the subject in an OnXOver script, but all it changes is the text of the article header in the header list, but not the threading by subject. Funny enough, you can change the References in the OnXOver-script, and it works. Can you have a look into the header of one of the replies to this mailing list? Is there a header like "In-Reply-To: " or something in it to indicate some kind of threading? Otherwise, I can only help you by attaching all followups in one long list to the OP (by subject).
Re: [Dialog] Rewriting subject lines?
Author: Jay Levitt
Date: Sun, 03 Sep 2006 18:08
Date: Sun, 03 Sep 2006 18:08
12 lines
1983 bytes
1983 bytes
On Sun, 3 Sep 2006 12:39:29 +0200, Korbinian Abenthum wrote: > Can you have a look into the header of one of the replies to this mailing > list? Is there a header like "In-Reply-To: " or something in it to indicate > some kind of threading? > Otherwise, I can only help you by attaching all followups in one long list > to the OP (by subject). Actually, now they've figured out how to turn off the mailing list subject prefix, so Dialog's happy again! Thanks for following up though. Jay
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