1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Written by Sebastian Pipping <sebastian@pipping.org>
# Licensed under GPL v2 or later
from __future__ import print_function
import xml.etree.ElementTree as ET # Python 2.5
import sys
_PAST_GENTOO_ACCOUNT, _CHAT_OR_LOCAL_ONLY = range(2)
_past_nicknames_for = {
'chithanh': (
('chithead', _CHAT_OR_LOCAL_ONLY),
),
'fauli': (
('opfer', _PAST_GENTOO_ACCOUNT),
),
'stkn': (
('aura', _CHAT_OR_LOCAL_ONLY),
),
'r0bertz': (
('zhllg', _CHAT_OR_LOCAL_ONLY),
)
}
_external_contributors_spam_protected = {
'belanger': ('Mathieu Belanger', 'b747xx', 'gmail.com'),
'caratorn': ('Charles Clément', 'caratorn', 'gmail.com'),
'chewi': ('James Le Cuirot', 'chewi', 'aura-online.co.uk'),
'codestr0m': ('Christopher Bergström', 'codestr0m', 'osunix.org'),
'damkor': ('damkor', 'damkor', 'hotmail.com'),
'fridrik': ('Federico Fissore', 'federico', 'fissore.org'),
'frquadrat': ('Frank-Ralph Reiser', 'frank.ralph.reiser', 'gmail.com'),
'geki': ('Han Meyer-Thurow', 'h.mth', 'web.de'),
'gnu_andrew': (' Andrew John Hughes', 'gnu_andrew', 'member.fsf.org'),
'hey_neken': ('Mikel Olasgasti', 'hey_neken', 'mundurat.net'),
'jieryn': ('Jesse Farinacci', 'jieryn', ' gmail.com'),
'kasun': ('Kasun Gajasinghe', 'kasunbg', 'gmail.com'),
'kiorky': ('Mathieu Pasquet', 'kiorky', 'cryptelium.net'),
'kylepan': ('Jiale Pan', 'kyle.j.pan', 'gmail.com'),
'mellen': ('Tais M. Hansen', 'mellen', 'osd.dk'),
'MvG': ('Martin von Gagern', 'Martin.vGagern', 'gmx.net'),
'obeliks': ('Bernhard Frauendienst', 'gentoo', 'obeliks.de'),
'obsidian': ('William Thomson', 'wlt', 'obsidian-studios.com'),
'otih': ('Fabian Fingerle', 'fabian', 'datensalat.eu'),
'tacvbo': ('Octavio Ruiz', 'tacvbo', 'tacvbo.net'),
'rambaldi': ('Rambaldi', 'rambaldi', 'xs4all.nl'),
'sattvik': ('Solano Gomez', 'gentoo', 'sattvik.com'),
'slonopotamus': ('Marat Radchenko', 'marat', 'slonopotamus.org'),
'svoop': ('Sven Schwyn', 'gentoo', 'bitcetera.com'),
'techgurufloyd': ('Jacob Floyd', 'techgurufloyd', 'gmail.com'),
'unlord': ('Nathan Egge', 'nathanegge', 'yahoo.com'),
'weisso': ('Mike Weissman', 'mike', 'weisso.com'),
}
_external_contributors = dict([
(nick, (name, '%s@%s' % (user, host))) \
for (nick, (name, user, host)) \
in _external_contributors_spam_protected.items()
])
_contributor_aliases = {
'MvG': ('mvg', ),
'obsidian': ('wltjr', ),
}
for source, targets in _contributor_aliases.items():
for target in targets:
_external_contributors[target] = _external_contributors[source]
def _produce_line(svn_nick, realname, address):
line = '%s = %s <%s>' % (svn_nick, realname, address)
print(line.encode('utf-8'))
def _gentoo_address(nick):
return '%s@gentoo.org' % nick
def main(args):
if len(args) != 2:
print('USAGE: %s GENTOO/xml/htdocs/proj/en/devrel/roll-call/userinfo.xml' % args[0])
return 1
try:
userlist = ET.parse(args[1])
except IOError as e:
print(str(e), file=sys.stderr)
return 1
for user in userlist.findall('user'):
svn_nick = user.attrib['username']
location = user.find('location')
realname = user.find('realname').attrib['fullname'].strip()
_produce_line(svn_nick, realname, _gentoo_address(svn_nick))
past_nicknames = _past_nicknames_for.get(svn_nick, [])
for alias, kind in past_nicknames:
if kind == _PAST_GENTOO_ACCOUNT:
gentoo_nick=alias
elif kind == _CHAT_OR_LOCAL_ONLY:
gentoo_nick=svn_nick
else:
assert False, 'Invalid kind %s' % str(kind)
_produce_line(alias, realname, _gentoo_address(gentoo_nick))
for svn_nick, (realname, address) in sorted(_external_contributors.items()):
_produce_line(svn_nick, realname.decode('utf-8'), address=address)
return 0
if __name__ == '__main__':
ret = main(sys.argv)
sys.exit(ret)
|