[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [policies/master] Drop trac activity script



commit 1adccd8c6c2d7b2a85d0d377fb0a48f6f7fbb628
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Oct 4 14:40:54 2020 -0700

    Drop trac activity script
    
    TPI moved from Trac to Gitlab so this script is no longer useful.
---
 scripts/trac_activity.py | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/scripts/trac_activity.py b/scripts/trac_activity.py
deleted file mode 100644
index ef09dfa..0000000
--- a/scripts/trac_activity.py
+++ /dev/null
@@ -1,27 +0,0 @@
-import collections
-import re
-import urllib
-
-TICKETS_CREATED = 'https://trac.torproject.org/projects/tor/timeline?daysback=180&ticket=on&update=Update'
-TICKETS_UPDATED = 'https://trac.torproject.org/projects/tor/timeline?daysback=180&ticket_details=on&update=Update'
-WIKI_UPDATES = 'https://trac.torproject.org/projects/tor/timeline?daysback=180&wiki=on&update=Update'
-
-USER_ACTION = re.compile('by <span class="trac-author(?:-user)?">(\S+)</span>')
-
-for title, url in (('Tickets Created', TICKETS_CREATED), ('Tickets Updated', TICKETS_UPDATED), ('Wiki Edits', WIKI_UPDATES)):
-  request = urllib.urlopen(url)
-  user_edits = filter(lambda user: user != 'trac' and user != 'cypherpunks', USER_ACTION.findall(request.read()))
-
-  print('=' * 60)
-  print(title)
-  print('=' * 60)
-  print('')
-
-  threshold = 0.01 * len(user_edits)  # only show results if it's at least 1% to avoid long tail
-
-  for user, count in sorted(collections.Counter(user_edits).items(), key = lambda entry: entry[1], reverse = True):
-    if count >= threshold:
-      print(' * %s %s' % (count, user))
-
-  print('')
-

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits