Bugzilla – Attachment 66244 Details for
Bug 54110
Create script to identify most active bug wranglers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Tested python3 compatible
qawrangler-stats.py (text/x-python), 1.22 KB, created by
leighman
on 2012-08-28 19:49:35 UTC
(
hide
)
Description:
Tested python3 compatible
Filename:
MIME Type:
Creator:
leighman
Created:
2012-08-28 19:49:35 UTC
Size:
1.22 KB
patch
obsolete
>#!/usr/bin/env python3 > >import sys, re >import gzip >from urllib.request import urlopen, URLError >from io import BytesIO >from collections import Counter > >month = '' >if len(sys.argv) >= 2: > month = sys.argv[1] > >url = 'http://lists.freedesktop.org/archives/libreoffice-bugs/' + month + '.txt.gz' >print('Downloading ' + url) > >try: > response = urlopen(url) > buf = BytesIO(response.read()) > gz = gzip.GzipFile(fileobj=buf) > > txt = gz.read().decode('us-ascii') > gz.close() > > reportedby = re.compile(r'^.*ReportedBy:.(.*)$', re.MULTILINE) > reporters = re.findall(reportedby, txt) > > wrangledby = re.compile(r'^.*<(.*)> changed:$', re.MULTILINE) > wranglers = re.findall(wrangledby, txt) > > topreporters = Counter(reporters).most_common(10) > topwranglers = Counter(wranglers).most_common(10) > > print('\n=== ' + month[5:] + ' ' + month[:4] + '===') > print('\n--- Top 10 reporters ---') > for reporter in topreporters: > print('{0:40}{1:5d}'.format(reporter[0], reporter[1])) > > print('\n--- Top 10 wranglers ---') > for wrangler in topwranglers: > print('{0:40}{1:5d}'.format(wrangler[0], wrangler[1])) > >except URLError: > print('Unknown file - give an archive in the form YYYY-Month as argv[1]') >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 54110
:
66182
|
66235
|
66241
|
66242
| 66244 |
66247
|
78586
|
78598