From c5f82a156b07d02831096773c6f4a7be7d462caa Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Tue, 27 Oct 2009 13:27:32 +0100 Subject: First commit --- rfpquery.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 rfpquery.py diff --git a/rfpquery.py b/rfpquery.py new file mode 100755 index 0000000..79ded94 --- /dev/null +++ b/rfpquery.py @@ -0,0 +1,48 @@ +#!/usr/bin/python + +import urllib2, sys, re + +if len(sys.argv) < 2: + print 'Syntax:', sys.argv[0], '[max_days_old]' + sys.exit() + +try: + max_days_old = int(sys.argv[1]) +except: + print 'Not an integer!' + sys.exit() + + +reports = [] +item = [] + +rfpurl = urllib2.urlopen('http://www.debian.org/devel/wnpp/requested') + +for line in rfpurl: + if re.findall('bugs\.debian\.org', line) or re.match('requested(.*)ago', line): + # First line + if re.match('^.ul.(.*),', line) or re.match ('^(.*)li.(.*),', line): + # Link + link = re.sub('