forked from rdesktop/rdesktop
-
Notifications
You must be signed in to change notification settings - Fork 1
/
genauthors
executable file
·58 lines (40 loc) · 1.15 KB
/
genauthors
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
#!/usr/bin/env python
# -*-mode: python; coding: utf-8 -*-
import re
import sys
# Filled in with historical authors which are not mentioned in the source
authors = {
"Hugo Trippaers <[email protected]>": 1,
"Michal Mihalik <[email protected]>": 1,
"Norbert Federa <[email protected]>": 1,
"Peter Kallden <[email protected]>": 1,
}
def dostatement(s):
# Get rid of (C)
s = re.sub('\(C\)', '', s).strip()
# Get rid of years
s = re.sub('\d\d\d\d(-\d\d\d\d)?', '', s).strip()
# Get rid of in-code statements
if s.find('"') != -1:
return
global authors
authors[s] = 1
def dofile(fname):
f = open(fname)
pt = re.compile('\sCopyright (.*)')
for line in f:
m = pt.search(line)
if m != None:
dostatement(m.group(1).strip())
def main():
for fname in sys.argv[1:]:
dofile(fname)
print """This is an attempt at a list of people who have made significant
contributions to the code. If you have been unintentionally omitted
please let one of the team members know.
"""
keys = authors.keys()
keys.sort()
for k in keys:
print k
main()