🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
3 messages
3 total messages Started by Eddie Wed, 21 Oct 2009 20:55
[Dialog] Filtering by post body
#237401
Author: Eddie
Date: Wed, 21 Oct 2009 20:55
13 lines
1783 bytes
In Dilaog, is it possible to filter out posts by content of the post body?
I can't seem to find anything relevant on Google.

There is an increasing number of pyramidal scheme posts plaguing hr.*
groups and I would like to filter them out and the only way is to match to
certain words in post body.

Thanks!

-- 
PGP: 0x800AFEB3

When freedom is outlawed only outlaws will have freedom.
Re: [Dialog] Filtering by post body
#237505
Author: Rom
Date: Thu, 22 Oct 2009 05:56
44 lines
2518 bytes
On Wed, 21 Oct 2009 22:55:35 +0200, Eddie wrote:

> In Dilaog, is it possible to filter out posts by content of the post body?

Yes, with a script.

> There is an increasing number of pyramidal scheme posts plaguing hr.*
> groups and I would like to filter them out and the only way is to match to
> certain words in post body.

Bodies must be downloaded for the group(s) for body filtering/scoring:
Group menu > Default/Selected group options > Retrieving
[x]Retrieve bodies for all new messages

Here's the script:
<http://www.40tude.com/dialog/wiki/index.php/ScriptXBody> (if
available) or <http://dialog.datalist.org/scripts/ScriptXBody.html>.

Settings > Scripting > Enable scripting (if not already).
Copy script into Settings > Scripting > Scripting... > Event scripts
tab > OnBeforeSavingMessage, then Script > Compile, and Script >
Reload all compiled script in Dialog's main window.

The script adds X-Body1:, X-Body2:, X-Body3: etc. header(s) with the
words (without spaces) of the non-quoted text from the message body so
can score/filter.

Filtering/scoring/actions:
Settings > Scoring and actions > Scoring and action rules tab.

Some examples:
[news.software.readers]
!delete Header "wrongtarget"
!delete Header {^(X-Body[0-9]+?: ).*?keyword.*?}
!ignore,markread Header "someword"
+10 Header "Vista" "Win7"
-10 Header "linux"

Also see these topics in Dialog's Help:
Regular Expressions <dialog.chm::/RegularExpressions.htm>,
Scoring/Actions Syntax <dialog.chm::/scoringactionsyntax.htm>.

-- 
Rom
Re: [Dialog] Filtering by post body
#237541
Author: Eddie
Date: Thu, 22 Oct 2009 17:13
25 lines
2101 bytes
Rom <-@-.invalid> wrote:

> On Wed, 21 Oct 2009 22:55:35 +0200, Eddie wrote:
> 
>> In Dilaog, is it possible to filter out posts by content of the post body?
> 
> Yes, with a script.

Nice one!

> Bodies must be downloaded for the group(s) for body filtering/scoring:
> Group menu > Default/Selected group options > Retrieving
> [x]Retrieve bodies for all new messages

/cut

Thanks for the long explanation :) All I really needed was the script, the
rest it easy :)

Once again, thanks a lot!

-- 
PGP: 0x800AFEB3

When freedom is outlawed only outlaws will have freedom.
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