Welcome to mirror list, hosted at ThFree Co, Russian Federation.

generate-AUTHORS.py « scripts - github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a2e1eeaac3fbcea9db28677ec06cbafc6950c6a3 (plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2005-2019 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

from __future__ import (unicode_literals, print_function, division)

import sys
import subprocess
import codecs
import pyuca

blacklist = (
	# Unknown
	"(no author) <(no author)@05730e5d-ab1b-0410-a4ac-84af385074fa>",
	"root <root@DiskStation.(none)>",
	"unknown <LoL@.(none)>",

	# Bots
	"MumbleTransifexBot <mumbletransifexbot@mumble.info>",

	# ...What?
	"Netbios Domain Administrator <admin@gameserver2.(none)>",
)

# These are authors whose patches were applied during
# the time when Mumble used SVN for version control.
# The patches themselves are in Git, but the author
# and commiter metadata in Git does not reflect the
# actual patch author.
# This list has been manually compiled by looking
# through the Git history.
patchAuthors = (
	# Via 6cc47c35cac16877e119cef35d9255918849495d
	"Opalium <opalium@users.sourceforge.net>",

	# Via d16876d804d028153f37f4f8aff770469edf6997
	"Marc Deslauriers <marc.deslauriers@canonical.com>",

	# Via bd690db64560cd1785c9aaed86547ffe681b60db
	"Otto Allmendinger <oallmendinger@users.sourceforge.net>",

	# Via 143589b1a8f264026c12f974e084030eaba51428
	"ozon <mumble-tower@users.sourceforge.net>",

	# Via 1b048e6c1516eee4f932f9f9eeeb6b13de5d15cb
	"Cesare Tirabassi <cesare.tirabassi@gmail.com>",

	# Via ddfc033c3c20a67994ef6329691f2a3616a346c0
	"Stefan Gehn <mETz@gehn.net>",

	# Via c317abec96d9007cc7ca95f54e5193b48268e7ad
	"Thibault Capdevielled <theblackstorm@userse.sourceforge.net>",

	# Via 51510ff8f744adc281c4eca6c0fdef5ba2ab9cbb
	"Jan Braun <janbraun@gmx.net>",

	# Via 887368a9fb5a6d35c3750a5f48d1293d4fc58df3
	"Balazs Nagy <julian7@users.sourceforge.net>",

	# Via 7814dba5f86b69f446e45c639ae3db7adfaf9c48
	"Jerome Vidal <jerhum@users.sourceforge.net>",

	# Via 82e4966bba8d390e22f43d15764c6c272dd91e2b
	"Matt M. <mokomull@users.sourceforge.net>",

	# Via b40cf89632a8ac46ac92d8a7fa4091c7d035122a
	"mystic_sam <mystic_sam@users.sourceforge.net>",

	# Via 2cecce4270555e4b7fc4c9e3f39c064f72247667
	"Entitaet <entitaet@users.sourceforge.net>",

	# Via 2a6ae358c37ff0c3570ebcb8466aacd673352b95
	"Jakob Dettner <jakobdettner@users.sourceforge.net>",

	# Via b8ff5eed6ef0835b4db2ed160f1e41a045d16db4
	"derandi <derandi@users.sourceforge.net>",

	# Via b2f70a7802e90eea0d04eef7edc0a52178fda753
	"Prosper_Spurius <prosper_spurius@users.sourceforge.net>",

	# Via 9952748561122969d02f2d9ebc49b001ffe82823
	"Leszek Godlewski <inequation@users.sourceforge.net>",

	# Via 2c0a0ff8244966be4d058742a3c01859bad44b37
	"Mark Schreiber <mark7@users.sourceforge.net>",

	# Via 39005601bb92b8f994e8e50887b3bb6535a2c305
	"Sebastian Schlingmann <mit_service@users.sourceforge.net>",

	# Via d2b735799ca37d957def45816766ef266c2b7057
	"Arseniy Lartsev <ars3niy@users.sourceforge.net>",

	# Via 12191680451f0f9d31526908a9c0ded669f05cb8
	"javitonino <javitonino@users.sourceforge.net>",

	# Via 82ffa8948f06f87f58ca7072960d7c54729e7e8b
	"Thibaut Girka",

	# Via a1ba43376db2ec76f2cf244793bfc1565ac88454
	"Jérôme \"buggerone\" <buggerone@users.sourceforge.net>",

	# Via 0d9f5d03426735c4d42e9cd9fe81868b1437aa06
	"Friedrich Uz-Valentin <uz_@users.sourceforge.net>",

	# Added to AudioConfigDialog.cpp's license header
	# in 324540e8fab00af7a894c8ce7ad5a726cde80034 by
	# slicer.
	"Andreas Messer <andi@bupfen.de>",
)

def gitAuthorsOutput():
	p = subprocess.Popen(["git", "log", "--use-mailmap", "--format=%aN <%aE>", "origin/master", "origin/1.2.x"], stdout=subprocess.PIPE)
	stdout, stderr = p.communicate()
	if stdout is not None:
		stdout = stdout.decode('utf-8')
	if stderr is not None:
		stderr = stderr.decode('utf-8')
	if p.returncode != 0:
		raise Exception('"git log" failed: %s', stderr)
	return stdout

def main():
	authorsSet = set()
	authorsText = gitAuthorsOutput()
	for line in authorsText.split("\n"):
		if line == '':
			continue

		# Email addresses completely when they are not set.
		# See for example "zapman <unknown>".
		if " <unknown>" in line:
			line = line.replace(" <unknown>", "")

		# Use GitHub URL instead of $user@users.noreply.github.com
		if '@users.noreply.github.com' in line:
			line = line.replace('@users.noreply.github.com', '')
			line = line.replace('<', '<https://github.com/')

		if line in blacklist:
			continue

		authorsSet.add(line)

	for author in patchAuthors:
		authorsSet.add(author)

	f = codecs.open("AUTHORS", "w", "utf-8")
	f.write('''// This is the official list of people who have contributed
// to, and/or hold the copyright to Mumble.
//
// The use of Mumble source code is governed by a BSD-style
// license that can be found in the LICENSE file at the root
// of the Mumble source tree or at <https://www.mumble.info/LICENSE>.
//
// Contributions made on behalf of another entity, such as a
// company are indicated with the following suffix:
//
//     John Doe <jd@mumble.info> (on behalf of $COMPANY)
//
// It is possible to mix individual contributions with company
// contributions. For example, if a contributor, over time,
// has contributed code copyrighted by the contributor, as well
// as various companies:
//
//     John Doe <jd@mumble.info> (individually, on behalf of
//                                $COMPANY1, on behalf of
//                                $COMPANY2, [...]).
//
// Mumble's code is developed in a Git repository. A log of
// every contribution ever made to Mumble is available in the
// Git repository. The Git repository can be queried to get
// detailed authorship information for copyright and attribution
// purposes for each file that makes up the software. A detailed
// analysis of contributions made to Mumble is available via GitHub's
// contribution statistics:
//
// <https://github.com/mumble-voip/mumble/graphs/contributors>

''')

	# Sort alphabetically
	authors = list(authorsSet)
	collator = pyuca.Collator()
	authors.sort(key=collator.sort_key)

	for author in authors:
		f.write(author)
		f.write("\n")

	f.write("""
// Special thanks to:
//
//    Thorvald Natvig, for founding the Mumble project
//    and maintaining it during its formative years.
""")

	f.close()

if __name__ == '__main__':
	main()