Saturday, January 14, 2006

Usenet binaries with Pan

This is a scoring script that I use on some huge groups like alt.binaries.multimedia or alt.binaries.tv and it's much quicker than using the interface. Pan is compatible with the PCRE "Perl Compatible Regular Expressions".

Quick example :

$ score dead.like.me
ADDED :

[^alt\.binaries\.multimedia|alt\.binaries\.tv$]
Score: =-9999
Subject: dead.like.me.S\d\dE\d\d|dead.like.me.\dx\d\d|dead.like.me.\d\d\d


That way all the files called like "dead like me S01E22" or "dead-like-me.1x11" or "dead.like.me.104" are scored -9999 and I can save some RAM by reading only the headers scored 0. I can also delete all the headers scored -9999 ( ignored ) all at the same time.

Here's the "score" script to put in your /home/you/bin directory. The hardcoded things need to be changed ( path, group name )

#!/usr/bin/python
import sys

scorefile = "/home/you/News/Score"

group = "^alt\\.binaries\\.multimedia|alt\\.binaries\\.tv$"
arg = sys.argv[1]
score = arg+'.S\\d\\dE\\d\\d|'+arg+'.\\dx\\d\\d|'+arg+'.\\d\\d\\d'

f=open(scorefile, 'a')

f.write( "\n" + "[" + group + "]\n" )
f.write( "\t" + "Score: =-9999" + "\n" )
f.write( "\t" + "Subject: " + score + "\n\n" )
f.close

print "ADDED :"
print "\n" + "[" + group + "]"
print "\t" + "Score: =-9999" + "" print "\t" + "Subject: " + score

1 comment :

Anonymous said...

Binary grabber: SABnzbd+, www.sabnzbd.org
I think it's the best. It downloads the nzb's you selected checks on missing parts, if you wish repairs it and uncompress it. The usenet Automatic tool. Btw it runs upon you browser at port 8080
grtz from Belgium