From 3bff3477c8d916efa8f810048286e9a52dc9a035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C3=85strand?= Date: Wed, 13 Apr 2011 11:33:22 +0000 Subject: [PATCH] Make it possible to automatically generate the AUTHORS file from the source code. This adds a few new developers to AUTHORS. In some cases, the email adress is also changed. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1617 423420c4-83ab-492f-b58f-81f9feb106b5 --- Makefile.in | 3 +++ doc/AUTHORS | 12 ++++++++--- genauthors | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 3 deletions(-) create mode 100755 genauthors diff --git a/Makefile.in b/Makefile.in index a904c51..bb5e6a6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -159,3 +159,6 @@ configure: configure.ac .c.o: $(CC) $(CFLAGS) -o $@ -c $< +.PHONY: +doc/AUTHORS: + ./genauthors *.c diff --git a/doc/AUTHORS b/doc/AUTHORS index 3190aca..f2e23bd 100644 --- a/doc/AUTHORS +++ b/doc/AUTHORS @@ -2,13 +2,19 @@ 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. +Alexi Volkov Erik Forsberg +GuoJunBo +Henrik Andersson for Cendio AB Hugo Trippaers Jay Sorg +Jeremy Meng Jeroen Meijer -Matt Chapman -Michael Gernoth +Matrox Graphics Inc. +Matthew Chapman +Michael Gernoth Michal Mihalik Norbert Federa +Peter Astrand for Cendio AB Peter Kallden -Peter Åstrand +Pierre Ossman for Cendio AB diff --git a/genauthors b/genauthors new file mode 100755 index 0000000..ab85873 --- /dev/null +++ b/genauthors @@ -0,0 +1,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 ": 1, + "Michal Mihalik ": 1, + "Norbert Federa ": 1, + "Peter Kallden ": 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()