From d67c0a1eda3a59214e8d7ab6fede0fbd6abcabda Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 2 Jun 2016 08:19:12 +0000 Subject: [PATCH] authors: Clean up AUTHORS and NICKS files Git didn't really understand the multiple email addresses in the NICKS file the same way I expected it to, and this fixes that. It also makes AUTHORS the "master" file that everything else depends on, so it now includes all of name, nickname and email addresses. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3243 --- AUTHORS | 181 ++++++++-------- NICKS | 195 ++++++++++-------- .../syncthing/core/aboutModalView.html | 2 +- script/authors.go | 118 +++++++++-- 4 files changed, 303 insertions(+), 193 deletions(-) diff --git a/AUTHORS b/AUTHORS index f1523d4cc..f14677037 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,90 +1,95 @@ # This is the official list of Syncthing authors for copyright purposes. +# The format is: +# +# Name Name Name (nickname) +# +# The NICKS list is auto generated from this file. -Aaron Bieber -Adam Piggott -Alessandro G. -Alexander Graf -Anderson Mesquita -Andrew Dunham -Antony Male -Arthur Axel fREW Schmidt -Alexandre Viau -Audrius Butkevicius -Bart De Vries -Ben Curthoys -Ben Schulz -Ben Sidhom -Benny Ng -Brandon Philips -Brendan Long -Brian R. Becker -Caleb Callaway -Carsten Hagemann -Cathryne Linenweaver -Chris Howie -Chris Joel -Colin Kennedy -Daniel Bergmann -Daniel Harte -Daniel Martí -David Rimmer -Denis A. -Dennis Wilson -Dominik Heidler -Elias Jarlebring -Emil Hessman -Erik Meitner -Federico Castagnini -Felix Ableitner -Felix Unterpaintner -Francois-Xavier Gsell -Frank Isemann -Gilli Sigurdsson -Jaakko Hannikainen -Jacek Szafarkiewicz -Jake Peterson -Jakob Borg -James Patterson -Jaroslav Malec -Jens Diemer -Jochen Voss -Johan Vromans -Karol Różycki -Kelong Cong -Ken'ichi Kamada -Kevin Allen -Lars K.W. Gohlke -Laurent Etiemble -Lode Hoste -Lord Landon Agahnim -Marc Laporte -Marc Pujol -Marcin Dziadus -Mateusz Naściszewski -Matt Burke -Max Schulze -Michael Jephcote -Michael Ploujnikov -Michael Tilli -Nate Morrison -Pascal Jungblut -Peter Hoeg -Philippe Schommers -Phill Luby -Piotr Bejda -Ryan Sullivan -Scott Klupfel -Sergey Mishin -Stefan Kuntz -Stefan Tatschner -Tim Abell -Tobias Nygren -Tomas Cerveny -Tully Robinson -Tyler Brazier -Veeti Paananen -Victor Buinsky -Vil Brekin -William A. Kennington III -Wulf Weich -Yannic A. +Aaron Bieber (qbit) +Adam Piggott (simplypeachy) +Alessandro G. (alessandro.g89) +Alexander Graf (alex2108) +Alexandre Viau (aviau) +Anderson Mesquita (andersonvom) +Andrew Dunham (andrew-d) +Antony Male (canton7) +Arthur Axel fREW Schmidt (frioux) +Audrius Butkevicius (AudriusButkevicius) +Bart De Vries (mogwa1) +Ben Curthoys (bencurthoys) +Ben Schulz (uok) +Ben Sidhom (bsidhom) +Benny Ng (tpng) +Brandon Philips (philips) +Brendan Long (brendanlong) +Brian R. Becker (brbecker) +Caleb Callaway (cqcallaw) +Carsten Hagemann (Moter8) +Cathryne Linenweaver (Cathryne) +Chris Howie (cdhowie) +Chris Joel (cdata) +Colin Kennedy (moshen) +Daniel Bergmann (brgmnn) +Daniel Harte (norgeous) +Daniel Martí (mvdan) +David Rimmer (dinosore) +Denis A. (dva) +Dennis Wilson (snnd) +Dominik Heidler (asdil12) +Elias Jarlebring (jarlebring) +Emil Hessman (ceh) +Erik Meitner (WSGCSysadmin) +Federico Castagnini (facastagnini) +Felix Ableitner (Nutomic) +Felix Unterpaintner (bigbear2nd) +Francois-Xavier Gsell (zukoo) +Frank Isemann (fti7) +Gilli Sigurdsson (gillisig) +Jaakko Hannikainen (jgke) +Jacek Szafarkiewicz (hadogenes) +Jake Peterson (acogdev) +Jakob Borg (calmh) +James Patterson (jpjp) +Jaroslav Malec (dzarda) +Jens Diemer (jedie) +Jochen Voss (seehuhn) +Johan Vromans (sciurius) +Karol Różycki (krozycki) +Kelong Cong (kc1212) +Ken'ichi Kamada (kamadak) +Kevin Allen (ironmig) +Lars K.W. Gohlke (lkwg82) +Laurent Etiemble (letiemble) +Lode Hoste (Zillode) +Lord Landon Agahnim (LordLandon) +Marc Laporte (marclaporte) +Marc Pujol (kilburn) +Marcin Dziadus (marcindziadus) +Mateusz Naściszewski (mateon1) +Matt Burke (burkemw3) +Max Schulze (kralo) +Michael Jephcote (Rewt0r) +Michael Ploujnikov (plouj) +Michael Tilli (pyfisch) +Nate Morrison (nrm21) +Pascal Jungblut (pascalj) +Peter Hoeg (peterhoeg) +Philippe Schommers (filoozoom) +Phill Luby (pluby) +Piotr Bejda (piobpl) +Ryan Sullivan (KayoticSully) +Scott Klupfel (kluppy) +Sergey Mishin (ralder) +Stefan Kuntz (Stefan-Code) +Stefan Tatschner (rumpelsepp) +Tim Abell (timabell) +Tobias Nygren (tnn2) +Tomas Cerveny (kozec) +Tully Robinson (tojrobinson) +Tyler Brazier (tylerbrazier) +Veeti Paananen (veeti) +Victor Buinsky (buinsky) +Vil Brekin (Vilbrekin) +William A. Kennington III (wkennington) +Wulf Weich (wweich) +Yannic A. (eipiminus1) diff --git a/NICKS b/NICKS index c6acb55aa..f182eb184 100644 --- a/NICKS +++ b/NICKS @@ -1,89 +1,112 @@ # This file maps email addresses used in commits to nicks used the changelog. +# It is auto generated from the AUTHORS file by script/authors.go. -acogdev -alex2108 -alessandro.g89 -andersonvom -andrew-d -asdil12 -AudriusButkevicius -aviau -bencurthoys -bigbear2nd -brbecker -brendanlong -brgmnn -bsidhom -buinsky -burkemw3 -calmh -canton7 -Cathryne -cdata -cdhowie -ceh -cqcallaw -dinosore -dva -dzarda -eipiminus1 -facastagnini -filoozoom -frioux -fti7 -gillisig -hadogenes -ironmig -jarlebring -jedie -jgke -jpjp -kamadak -KayoticSully -kilburn -kluppy -kozec -kralo -krozycki -letiemble -LordLandon -lkwg82 -marcindziadus +acogdev +alessandro.g89 +alex2108 +andersonvom +andrew-d +asdil12 +AudriusButkevicius +aviau +aviau +bencurthoys +bigbear2nd +brbecker +brendanlong +brgmnn +brgmnn +bsidhom +buinsky +burkemw3 +burkemw3 +calmh +canton7 +Cathryne +Cathryne +cdata +cdhowie +ceh +cqcallaw +dinosore +dva +dzarda +eipiminus1 +eipiminus1 +facastagnini +filoozoom +frioux +frioux +fti7 +gillisig +hadogenes +ironmig +jarlebring +jedie +jedie +jgke +jpjp +jpjp +kamadak +KayoticSully +kc1212 +kc1212 +kilburn +kluppy +kozec +kralo +kralo +krozycki +letiemble +letiemble +lkwg82 +LordLandon +marcindziadus marclaporte -mateon1 -mogwa1 -moshen -Moter8 -mvdan -norgeous -nrm21 -Nutomic -pascalj -peterhoeg -philips -piobpl -plouj -pluby -pyfisch -qbit -ralder -Rewt0r -rumpelsepp -sciurius -seehuhn -simplypeachy -snnd -Stefan-Code -timabell -tnn2 -tojrobinson -tpng -tylerbrazier -uok -veeti -Vilbrekin -wkennington -wsgcsysadmin -wweich -Zillode -zukoo +marclaporte +mateon1 +mogwa1 +moshen +Moter8 +mvdan +norgeous +norgeous +norgeous +nrm21 +Nutomic +pascalj +pascalj +peterhoeg +philips +piobpl +plouj +pluby +pyfisch +qbit +ralder +Rewt0r +Rewt0r +rumpelsepp +rumpelsepp +sciurius +seehuhn +simplypeachy +simplypeachy +snnd +Stefan-Code +Stefan-Code +timabell +tnn2 +tojrobinson +tpng +tylerbrazier +uok +uok +veeti +Vilbrekin +wkennington +WSGCSysadmin +wweich +wweich +Zillode +zukoo diff --git a/gui/default/syncthing/core/aboutModalView.html b/gui/default/syncthing/core/aboutModalView.html index 6a11a4dc6..103f2a68c 100644 --- a/gui/default/syncthing/core/aboutModalView.html +++ b/gui/default/syncthing/core/aboutModalView.html @@ -11,7 +11,7 @@

Copyright © 2014-2016 the following Contributors:

-Jakob Borg, Audrius Butkevicius, Alexander Graf, Anderson Mesquita, Ben Schulz, Caleb Callaway, Lars K.W. Gohlke, Lode Hoste, Michael Ploujnikov, Philippe Schommers, Ryan Sullivan, Sergey Mishin, Stefan Tatschner, Aaron Bieber, Adam Piggott, Alessandro G., Alexandre Viau, Andrew Dunham, Antony Male, Arthur Axel fREW Schmidt, Bart De Vries, Ben Curthoys, Ben Sidhom, Benny Ng, Brandon Philips, Brendan Long, Brian R. Becker, Carsten Hagemann, Cathryne Linenweaver, Chris Howie, Chris Joel, Colin Kennedy, Daniel Bergmann, Daniel Harte, Daniel Martí, David Rimmer, Denis A., Dennis Wilson, Dominik Heidler, Elias Jarlebring, Emil Hessman, Erik Meitner, Federico Castagnini, Felix Ableitner, Felix Unterpaintner, Francois-Xavier Gsell, Frank Isemann, Gilli Sigurdsson, Jaakko Hannikainen, Jacek Szafarkiewicz, Jake Peterson, James Patterson, Jaroslav Malec, Jens Diemer, Jochen Voss, Johan Vromans, Karol Różycki, Kelong Cong, Ken'ichi Kamada, Kevin Allen, Laurent Etiemble, Lord Landon Agahnim, Marc Laporte, Marc Pujol, Marcin Dziadus, Mateusz Naściszewski, Matt Burke, Max Schulze, Michael Jephcote, Michael Tilli, Nate Morrison, Pascal Jungblut, Peter Hoeg, Phill Luby, Piotr Bejda, Scott Klupfel, Stefan Kuntz, Tim Abell, Tobias Nygren, Tomas Cerveny, Tully Robinson, Tyler Brazier, Veeti Paananen, Victor Buinsky, Vil Brekin, William A. Kennington III, Wulf Weich, Yannic A. +Jakob Borg, Audrius Butkevicius, Alexander Graf, Anderson Mesquita, Ben Schulz, Caleb Callaway, Daniel Harte, Lars K.W. Gohlke, Lode Hoste, Michael Ploujnikov, Philippe Schommers, Ryan Sullivan, Sergey Mishin, Stefan Tatschner, Aaron Bieber, Adam Piggott, Alessandro G., Alexandre Viau, Andrew Dunham, Antony Male, Arthur Axel fREW Schmidt, Bart De Vries, Ben Curthoys, Ben Sidhom, Benny Ng, Brandon Philips, Brendan Long, Brian R. Becker, Carsten Hagemann, Cathryne Linenweaver, Chris Howie, Chris Joel, Colin Kennedy, Daniel Bergmann, Daniel Martí, David Rimmer, Denis A., Dennis Wilson, Dominik Heidler, Elias Jarlebring, Emil Hessman, Erik Meitner, Federico Castagnini, Felix Ableitner, Felix Unterpaintner, Francois-Xavier Gsell, Frank Isemann, Gilli Sigurdsson, Jaakko Hannikainen, Jacek Szafarkiewicz, Jake Peterson, James Patterson, Jaroslav Malec, Jens Diemer, Jochen Voss, Johan Vromans, Karol Różycki, Kelong Cong, Ken'ichi Kamada, Kevin Allen, Laurent Etiemble, Lord Landon Agahnim, Marc Laporte, Marc Pujol, Marcin Dziadus, Mateusz Naściszewski, Matt Burke, Max Schulze, Michael Jephcote, Michael Tilli, Nate Morrison, Pascal Jungblut, Peter Hoeg, Phill Luby, Piotr Bejda, Scott Klupfel, Stefan Kuntz, Tim Abell, Tobias Nygren, Tomas Cerveny, Tully Robinson, Tyler Brazier, Veeti Paananen, Victor Buinsky, Vil Brekin, William A. Kennington III, Wulf Weich, Yannic A.

diff --git a/script/authors.go b/script/authors.go index b4e01d3d5..82994fffd 100644 --- a/script/authors.go +++ b/script/authors.go @@ -13,6 +13,7 @@ package main import ( "bytes" + "fmt" "io/ioutil" "log" "math" @@ -25,8 +26,26 @@ import ( const htmlFile = "gui/default/syncthing/core/aboutModalView.html" +var ( + nicknameRe = regexp.MustCompile(`\(([^\s]*)\)`) + emailRe = regexp.MustCompile(`<([^\s]*)>`) +) + +const authorsHeader = `# This is the official list of Syncthing authors for copyright purposes. +# The format is: +# +# Name Name Name (nickname) +# +# The NICKS list is auto generated from this file. +` + +const nicksHeader = `# This file maps email addresses used in commits to nicks used the changelog. +# It is auto generated from the AUTHORS file by script/authors.go. +` + type author struct { name string + nickname string emails []string commits int log10commits int @@ -50,36 +69,75 @@ func main() { if err := ioutil.WriteFile(htmlFile, bs, 0644); err != nil { log.Fatal(err) } + + // Write AUTHORS file + + sort.Sort(byName(authors)) + + out, err := os.Create("AUTHORS") + if err != nil { + log.Fatal(err) + } + fmt.Fprintf(out, "%s\n", authorsHeader) + for _, author := range authors { + fmt.Fprintf(out, "%s", author.name) + if author.nickname != "" { + fmt.Fprintf(out, " (%s)", author.nickname) + } + for _, email := range author.emails { + fmt.Fprintf(out, " <%s>", email) + } + fmt.Fprintf(out, "\n") + } + out.Close() + + // Write NICKS file + + sort.Sort(byNick(authors)) + + out, err = os.Create("NICKS") + if err != nil { + log.Fatal(err) + } + fmt.Fprintf(out, "%s\n", nicksHeader) + for _, author := range authors { + if author.nickname == "" { + continue + } + for _, email := range author.emails { + fmt.Fprintf(out, "%s <%s>\n", author.nickname, email) + } + } + out.Close() } func getAuthors() []author { bs := readAll("AUTHORS") lines := strings.Split(string(bs), "\n") var authors []author - nameRe := regexp.MustCompile(`(.+?)\s+<`) - authorRe := regexp.MustCompile(`<([^>]+)>`) + for _, line := range lines { - m := nameRe.FindStringSubmatch(line) - if len(m) < 2 { - continue - } - name := m[1] - - ms := authorRe.FindAllStringSubmatch(line, -1) - if len(ms) == 0 { + if len(line) == 0 || line[0] == '#' { continue } - var emails []string - for i := range ms { - emails = append(emails, ms[i][1]) + fields := strings.Fields(line) + var author author + for _, field := range fields { + if m := nicknameRe.FindStringSubmatch(field); len(m) > 1 { + author.nickname = m[1] + } else if m := emailRe.FindStringSubmatch(field); len(m) > 1 { + author.emails = append(author.emails, m[1]) + } else { + if author.name == "" { + author.name = field + } else { + author.name = author.name + " " + field + } + } } - a := author{ - name: name, - emails: emails, - } - authors = append(authors, a) + authors = append(authors, author) } return authors } @@ -141,3 +199,27 @@ func (l byContributions) Less(a, b int) bool { } func (l byContributions) Swap(a, b int) { l[a], l[b] = l[b], l[a] } + +type byName []author + +func (l byName) Len() int { return len(l) } + +func (l byName) Less(a, b int) bool { + aname := strings.ToLower(l[a].name) + bname := strings.ToLower(l[b].name) + return aname < bname +} + +func (l byName) Swap(a, b int) { l[a], l[b] = l[b], l[a] } + +type byNick []author + +func (l byNick) Len() int { return len(l) } + +func (l byNick) Less(a, b int) bool { + anick := strings.ToLower(l[a].nickname) + bnick := strings.ToLower(l[b].nickname) + return anick < bnick +} + +func (l byNick) Swap(a, b int) { l[a], l[b] = l[b], l[a] }