Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Stats script

__/ [ Handover Phist ] on Tuesday 22 August 2006 22:19 \__

> Black Dragon :
>> Roy Schestowitz wrote:
>>
>>> __/ [ Black Dragon ] on Tuesday 22 August 2006 10:34 \__
>>
>>>> Roy Schestowitz wrote:
>>  
>>>>> It's all on SourceForge. It is the same script which Black Dragon uses.
>>>>> I noticed that he cites Garry Knights for what's probably a script for
>>>>> automation of posting, but it's a Swedish guy who wrote the package.
>>  
>>>> I use Garry Knights script and Turqstat for generating the weekly
>>>> statistics and home brewed shell and Perl scripts to automate the
>>>> postings.
>>
>>> Thanks for the information.
>>
>> No problemo.
>>
>> I got Garry Knights script from a fellow in news.software.readers who goes
>> by the nym "SINNER". It was originally written for the
>> alt.os.linux.mandrake newsgroup and apparently is getting passed around by
>> word of mouth. I know of no official place to download it from.


Oh, I know SINNER. *smile* I'm on both newsgroups myself (not been highly
involved recently). I didn't realise that the automation of stats posting
should be attributed to him. And I suspect that Michael is somehow
responsible for the generation of the stats for C.O.linux.misc and the
mandriva/drake newsgroup (I think another NG gets these stats). I can think
of at least 4 variations that hang about unpublished. Among the other ones
are Toby Inkster's and Roy Culley's. Both are written in Perl. I suspect
that Andrew Halliwell has a Perl script as well... one that he wrote as a
project in Uni, or whatever...


>> From the script header;
>>
>><quote>
>> #!/usr/bin/perl -w
>> use strict;
>> #########################
>> # newsstat.pl version 0.3
>>
>> ###################################################################
>> # Collect statistics about the alt.os.linux.mandrake newsgroup.
>> # Check all articles in the last 7-day period. Rank posters by
>> # no. of posts and by volume of posts, report on top and bottom
>> # 20 posters. Show their name, no. posts, size of posts, percentage
>> # quoted lines. Rank user-agents used, by poster rather than by
>> # post. Rank top 10 threads. Rank top 10 cross-posted groups.
>> ###################################################################
>></quote>
>>
> 
> Got it, and it's a really well done script. To glue it to a Leafnode
> server using cron, this BASH script will work where $NG = the group you
> want to post to:
> 
> REQUIREMENT: nc (netcat)
> 
> #!/bin/bash
> ##############################################
> #
> # stats autoposter for $NG
> #
> ##############################################
> 
> NG="comp.os.linux.advocacy"
> 
> echo "GROUP ${NG}" > ~/stats
> echo "POST" >> ~/stats
> echo "From: Newsstat Guy" >> ~/stats
> echo "Newsgroups: ${NG}" >> ~/stats
> echo "Subject: Stats for ${NG}" >> ~/stats
> echo >> ~/stats
> ~/bin/newsstat.pl $NG >> ~/stats
> echo "." >> ~/stats
> echo "." >> ~/stats
> echo "QUIT" >> ~/stats
> nc localhost 119 < ~/bin/stats
> rm ~/bin/stats
> exit 0


Personally, I take an inferior approach and run this as a cron job that
leaves disk output (a text file) to be copies and pasted onto a message in
the newsreader. It takes just seconds to do, which leaves time for editing
(it's needed in a group like alt.os.linux.suse where there are trolls and
privacy freaks).

In the crontab:

,----[ Quote ]
| 23 22 * * 2 turqstat /home/roy/Desktop/AISE.txt -d 7
| -U alt.internet.search-engines -a localnews.mcc.ac.uk;
| cat /home/roy/Main/Programs/Scripts/Definitions/AISE
| /home/roy/Desktop/AISE.txt >/home/roy/Desktop/AISE-STATISTICS-READY.txt
`----

/home/roy/Main/Programs/Scripts/Definitions/AISE just contains some text that
I prepend, including a template for the subject line.

Best wishes,

Roy

-- 
Maths applied to numbers is like logic applied to statistics. Statistics are
lies.

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index