Thread View: news.software.readers
10 messages
10 total messages
Started by Walter Dnes (delete the 'z' to g...
Sat, 12 Feb 2005 19:20
[slrn] Killfile question about X-headers
Author: Walter Dnes (delete the 'z' to g...
Date: Sat, 12 Feb 2005 19:20
Date: Sat, 12 Feb 2005 19:20
24 lines
2168 bytes
2168 bytes
After my recent question about auto-pruning sub-threads by in slrn, I tried an after-the-fact approach. Given the fact that it requires several *HOURS* to scan a directory with approx 6500 messages, it was not exactly a success. This was with scripts, I may convert it to a compiled program for better speed if I can solve another major problem first. To make a long story short, my approach is to scan all articles and insert the X-header "X-Bozomatic-Branch-Filter: yes" (without the quotes) as the first line in the article file of unwanted posts. I entered that same line in my regular killfile. But it doesn't filter. I've checked, and yes, the X-header does show up in the messages from the bozo, and in the entire sub-thread he starts. The score file works if I use From: headers. Is there a restriction on which headers slrn will lokk at? I suppose I could set up my scripts (or program later on) to monkey with the headers that slrn does recognize, but that's trickier than simply inserting a a line using an ed script. -- Walter Dnes; my email address is *ALMOST* like wzaltdnes@waltdnes.org Delete the "z" to get my real address. If that gets blocked, follow the instructions at the end of the 550 message.
Re: [slrn] Killfile question about X-headers
Author: SINNER
Date: Sat, 12 Feb 2005 19:47
Date: Sat, 12 Feb 2005 19:47
31 lines
2663 bytes
2663 bytes
* Walter Dnes (delete the 'z' to get my real address) wrote in news.software.readers: > After my recent question about auto-pruning sub-threads by in slrn, I > tried an after-the-fact approach. Given the fact that it requires > several *HOURS* to scan a directory with approx 6500 messages, it was > not exactly a success. This was with scripts, I may convert it to a > compiled program for better speed if I can solve another major problem > first. > To make a long story short, my approach is to scan all articles and > insert the X-header "X-Bozomatic-Branch-Filter: yes" (without the > quotes) as the first line in the article file of unwanted posts. I > entered that same line in my regular killfile. But it doesn't filter. > I've checked, and yes, the X-header does show up in the messages from > the bozo, and in the entire sub-thread he starts. The score file works > if I use From: headers. > Is there a restriction on which headers slrn will lokk at? I suppose > I could set up my scripts (or program later on) to monkey with the > headers that slrn does recognize, but that's trickier than simply > inserting a a line using an ed script. Your server needs to support the xhdr command for anything not found in xover. slrn will querey anything not found in the xover using xhdr if it is available. -- David There are two kinds of pedestrians... the quick and the dead. -- Lord Thomas Rober Dewar
Re: [slrn] Killfile question about X-headers
Author: W. Citoan
Date: Sat, 12 Feb 2005 20:29
Date: Sat, 12 Feb 2005 20:29
39 lines
2499 bytes
2499 bytes
Walter Dnes (delete the 'z' to get my real address) wrote:
>
> Given the fact that it requires several *HOURS* to scan a directory
> with approx 6500 messages, it was not exactly a success.
Eh? Even with a slow computer, that seems excessive. I put together a
quick & dirty perl script here (Windows XP, 2.8 GHz Pent4, 768 MB RAM)
and it took less than a minute to go through 7300+ messages.
I actually had a full-featured perl script that did this on a previous
computer (slower, running Debian) and never saw a performance problem.
> To make a long story short, my approach is to scan all articles and
> insert the X-header "X-Bozomatic-Branch-Filter: yes" (without the
> quotes) as the first line in the article file of unwanted posts.
I don't recommend that. That will cause slrn to have to do expensive
scoring. Rather, extract the message id from the bozo's posts and add
those to your slrn score file. That will kill the bozo and responses to
the bozo.
Use a script to run slrnpull (or whatever you're using) and then run
your bozo script. Use a macro to modify the "g" key to reload your
score file when checking for new messages.
define my_refresh_groups ()
{
reload_scorefile(1);
call ("refresh_groups");
call ("bob");
}
definekey ("my_refresh_groups", "g", "group");
- W. Citoan
--
...the bravest are surely those who have the clearest vision of what is
before them, glory and danger alike, and yet notwithstanding go out to meet
it.
-- Thucydides
[slrn] Auto-prune threads started by trolls. A working script
Author: Walter Dnes (delete the 'z' to g...
Date: Sun, 13 Feb 2005 07:09
Date: Sun, 13 Feb 2005 07:09
102 lines
5503 bytes
5503 bytes
On Sat, 12 Feb 2005 20:29:57 -0000, W. Citoan, <wcitoan@NOSPAM-yahoo.com> wrote:
> Eh? Even with a slow computer, that seems excessive. I put together a
> quick & dirty perl script here (Windows XP, 2.8 GHz Pent4, 768 MB RAM)
> and it took less than a minute to go through 7300+ messages.
Almost 5 and half year old (Sept 1999) Dell Dimension XPS T450)
machine here, 450 mhz PIII and 128 megs of RAM. It's running Gentoo
linux, fully optimized. I prefer email and news in text console mode.
My GUI is Blackbox, and it's reasonably snappy. I tried KDE and GNOME...
once. You don't want to hear about their (lack of) speed. They're
faithful imitations of XP when it comes to bloated resource-hogging
eye-candy.
> I actually had a full-featured perl script that did this on a
> previous computer (slower, running Debian) and never saw a
> performance problem.
Hmmm. I used a bash script, ed, grep, etc.
> > To make a long story short, my approach is to scan all articles and
> > insert the X-header "X-Bozomatic-Branch-Filter: yes" (without the
> > quotes) as the first line in the article file of unwanted posts.
>
> I don't recommend that. That will cause slrn to have to do expensive
> scoring. Rather, extract the message id from the bozo's posts and add
> those to your slrn score file. That will kill the bozo and responses
> to the bozo.
Duhh. I hate it when I miss the obvious. Thanks for the tip.
[...a few hours later...]
It woiks!!! Under 2 minutes for the revised script to sail through
7000+ articles. I cd to the spooldir of the group in question and
execute...
~/bozomatic/bozomatic
Here is the script, quoted to prevent linewrap...
> #!/bin/bash
> scriptdir="/home/waltdnes/bozomatic"
> bozo_file="${scriptdir}/killthrd.txt"
> killfile="${HOME}/News/message_ids.txt"
> newsgroup=`pwd | tr / . | sed "s/.*slrnpull.news.//"`
> echo "[${newsgroup}]" > ${killfile}
> echo 'Score:: =-9999' >> ${killfile}
> for article in [0-9]*
> do
> if (head --lines=20 ${article} | grep -i --quiet --file=${bozo_file}); then
> message_id_line=`grep -i "^Message-ID: " ${article} | head --lines=1`
> substring_length=$(( ${#message_id_line} - 14 ))
> message_id=${message_id_line:13:${substring_length}}
> echo "References: ${message_id}" >> ${killfile}
> fi
> done
Notes;
- You need to run this script if slrnpull (or leafnode, or whatever)
has pulled any new articles since the last time you ran it.
- This script only works if you store the articles locally on your
machine.
- This script will not work in standard cshell, because it uses
substrings of variables. I'm familiar with bash. zsh probably
works as well, although I haven't tested it. Regardless of which
shell you normally use, this script will automatically run bash if
it's available.
- This script only takes care of followups to the troll and all
subthreads from there on. To block the troll's post that starts the
(sub)thread you still need a regular entry in your scorefile.
- The entries in killthrd.txt must follow standard regexp rules for
entries in grep string files, not the looser rules used in slrn
killfiles. I do set grep to ignore case, but that's the only slack
you get.
- My ~/News/Score has the following line at the end...
include message_ids.txt
- ~/News/message_ids.txt *MUST* exist, otherwise slrn will not run.
"touch ~/News/message_ids.txt" creates a zero-length file, which is
sufficient. You can put that command into whatever script you use
to launch slrn, if you prefer.
- When an article by a troll is expired, existing replies remain
"read". If someone (who isn't killfiled) replies after the troll's
post expires from your local spool, that reply will not be filtered.
That is not going to happen very often.
killthrd.txt (i.e. ${bozo_file}) is the list of regexps (one per line)
that cause subthreads to be chopped. Right now there's only one name in
there, and he appears to have been kicked off his ISP, but it was useful
for testing. The list of message IDs sent by the bozo is saved in
message_ids.txt.
--
Walter Dnes; my email address is *ALMOST* like wzaltdnes@waltdnes.org
Delete the "z" to get my real address. If that gets blocked, follow
the instructions at the end of the 550 message.
Re: [slrn] Auto-prune threads started by trolls. A working script
Author: Blinky the Shark
Date: Sun, 13 Feb 2005 09:16
Date: Sun, 13 Feb 2005 09:16
14 lines
1553 bytes
1553 bytes
Walter Dnes (delete the 'z' to get my real address) wrote: > My GUI is Blackbox, and it's reasonably snappy. I tried KDE and GNOME... > once. You don't want to hear about their (lack of) speed. They're > faithful imitations of XP when it comes to bloated resource-hogging > eye-candy. Don't they predate XP? -- Blinky Linux Registered User 297263 Who has implemented Usenet Solution #45933: Now killing all posts made with User-Agent G2 (Google Groups)
Re: [slrn] Auto-prune threads started by trolls. A working script
Author: W. Citoan
Date: Sun, 13 Feb 2005 14:44
Date: Sun, 13 Feb 2005 14:44
48 lines
3228 bytes
3228 bytes
Walter Dnes (delete the 'z' to get my real address) wrote: > > It woiks!!! Under 2 minutes for the revised script to sail through > 7000+ articles. I cd to the spooldir of the group in question and > execute... Great! Even for the specs of your computer, that timing is more like what I would expect (my old computer was pretty close to yours). > Notes; > - You need to run this script if slrnpull (or leafnode, or whatever) > has pulled any new articles since the last time you ran it. slrnpull uses a sequential numbering scheme for naming the files in the newsspool. If you want to get fancier, you could store the last file processed each time and only start from there next time. > - This script only takes care of followups to the troll and all > subthreads from there on. To block the troll's post that starts the > (sub)thread you still need a regular entry in your scorefile. If you are using the same score file for slrnpull as slrn (recommended as there's no reason to download files you want killed) be sure not to score the troll below your kill level. You want a score that causes slrn not to show his posts but allows slrnpull to download it. If you don't download it, then your script won't work. Note: I figure you know this. I just added it for anyone else who might stumble across this later. > - When an article by a troll is expired, existing replies remain > "read". If someone (who isn't killfiled) replies after the troll's > post expires from your local spool, that reply will not be filtered. > That is not going to happen very often. Depends upon the size of your local newsspool. If you process only new articles each time (see above), your script would need to save the msg ids from each run instead of recreating the killfile each time. This would allow you to keep them around after they have expired. You would probably want to add expire dates and cleanscore them once in awhile as if you simply kept adding and never deleted, scoring would start bogging down. - W. Citoan -- Imagination is more important than knowledge. -- Albert Einstein
Re: [slrn] Auto-prune threads started by trolls. A working script
Author: Walter Dnes (delete the 'z' to g...
Date: Wed, 16 Feb 2005 01:45
Date: Wed, 16 Feb 2005 01:45
22 lines
2124 bytes
2124 bytes
On 13 Feb 2005 09:16:11 GMT, Blinky the Shark, <no.spam@box.invalid> wrote: > Walter Dnes (delete the 'z' to get my real address) wrote: > > > My GUI is Blackbox, and it's reasonably snappy. I tried KDE and GNOME... > > once. You don't want to hear about their (lack of) speed. They're > > faithful imitations of XP when it comes to bloated resource-hogging > > eye-candy. > > Don't they predate XP? Older versions were OK on my box. KDE+GNOME have been Microsoft-like in getting more bloated with each version. Remember that Win95 just flew in 32 megs of RAM. So too did older versions of GNOME+KDE. GNOME has a lot of best-of-breed apps like Gnumeric, Gimp, and AbiWord. KMail isn't to shabby either. I install KDE and GNOME *BUT DO NOT RUN THEIR DESKTOP ENVIRONMENTS*. This way I get the best of both worlds... great apps without the bloated "desktops". -- Walter Dnes; my email address is *ALMOST* like wzaltdnes@waltdnes.org Delete the "z" to get my real address. If that gets blocked, follow the instructions at the end of the 550 message.
Re: [slrn] Auto-prune threads started by trolls. A working script
Author: Walter Dnes (delete the 'z' to g...
Date: Wed, 16 Feb 2005 01:45
Date: Wed, 16 Feb 2005 01:45
19 lines
1842 bytes
1842 bytes
On Sun, 13 Feb 2005 14:44:58 -0000, W. Citoan, <wcitoan@NOSPAM-yahoo.com> wrote:
> You would probably want to add expire dates and cleanscore them once in
> awhile as if you simply kept adding and never deleted, scoring would
> start bogging down.
That's taken care of by the line...
echo "[${newsgroup}]" > ${killfile}
Note the ">". The redirect zaps the old include file and provides a
fresh file each time. The only thing I might want to add is an option
to ">>" rather than ">". This would be useful if there are trolls in
more than 1 group.
--
Walter Dnes; my email address is *ALMOST* like wzaltdnes@waltdnes.org
Delete the "z" to get my real address. If that gets blocked, follow
the instructions at the end of the 550 message.
Re: [slrn] Auto-prune threads started by trolls. A working script
Author: W. Citoan
Date: Wed, 16 Feb 2005 02:36
Date: Wed, 16 Feb 2005 02:36
29 lines
2264 bytes
2264 bytes
Walter Dnes (delete the 'z' to get my real address) wrote:
> On Sun, 13 Feb 2005 14:44:58 -0000, W. Citoan,
> <wcitoan@NOSPAM-yahoo.com> wrote:
>
> > You would probably want to add expire dates and cleanscore them
> > once in awhile as if you simply kept adding and never deleted,
> > scoring would start bogging down.
>
> That's taken care of by the line...
>
> echo "[${newsgroup}]" > ${killfile}
>
> Note the ">". The redirect zaps the old include file and provides a
> fresh file each time. The only thing I might want to add is an
> option to ">>" rather than ">". This would be useful if there are
> trolls in more than 1 group.
Er, you misread my post. I'm well aware of the difference between a
clobber and append redirect.
My statement was in regards to only processing new posts each time (the
paragraph proceeding the one you quote). In that case, you would always
being doing an append (or lose scores you'd want to keep) and would need
to clean up later.
- W. Citoan
--
What we anticipate seldom occurs; what we least expected generally happens.
-- Benjamin Disraeli
Re: [slrn] Auto-prune threads started by trolls. A working script
Author: Toby
Date: Tue, 22 Feb 2005 15:34
Date: Tue, 22 Feb 2005 15:34
29 lines
2463 bytes
2463 bytes
On 2005-02-16, Walter Dnes (delete the 'z' to get my real address) <wzaltdnes@waltdnes.org> wrote: > On 13 Feb 2005 09:16:11 GMT, Blinky the Shark, <no.spam@box.invalid> wrote: >> Walter Dnes (delete the 'z' to get my real address) wrote: >> >> > My GUI is Blackbox, and it's reasonably snappy. I tried KDE and GNOME... >> > once. You don't want to hear about their (lack of) speed. They're >> > faithful imitations of XP when it comes to bloated resource-hogging >> > eye-candy. >> >> Don't they predate XP? > > Older versions were OK on my box. KDE+GNOME have been Microsoft-like > in getting more bloated with each version. Remember that Win95 just flew > in 32 megs of RAM. So too did older versions of GNOME+KDE. GNOME has a > lot of best-of-breed apps like Gnumeric, Gimp, and AbiWord. KMail isn't > to shabby either. I install KDE and GNOME *BUT DO NOT RUN THEIR DESKTOP > ENVIRONMENTS*. This way I get the best of both worlds... great apps > without the bloated "desktops". > KDE is good because it means computer-shy people can use my box too. I run it myself, but generally only use the box from the CLI for day-to-day tasks. -- Toby. FT: 250 DK Bongo Stars FT: 500 GBA SP Stars
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