From da3b63420d2b34afe97e72e272078aa13622af8e Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 18 Feb 2019 22:00:48 +0100 Subject: Add update-authors.pl script which helps to update caja.about --- update-authors.pl | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100755 update-authors.pl (limited to 'update-authors.pl') diff --git a/update-authors.pl b/update-authors.pl new file mode 100755 index 00000000..c2a52109 --- /dev/null +++ b/update-authors.pl @@ -0,0 +1,72 @@ +#!/usr/bin/perl +=pod + + update-authors.pl is part of Caja. + + Caja is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + Caja is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Caja. If not, see . + +=cut +use strict; +use warnings; + +sub ReplaceAuthors { + my @authors = @_; + $_ eq 'alexandervdm ' and $_ = 'Alexander van der Meij ' for @authors; + $_ eq 'bkerlin ' and $_ = 'Brent Kerlin ' for @authors; + $_ eq 'bl0ckeduser ' and $_ = 'Gabriel Cormier-Affleck ' for @authors; + $_ eq 'chat-to-me%raveit.de ' and $_ = 'Wolfgang Ulbrich ' for @authors; + $_ eq 'chen donghai ' and $_ = 'Chen Donghai ' for @authors; + $_ eq 'Clément Masci <>' and $_ = 'Clément Masci' for @authors; + $_ eq 'emanuele-f ' and $_ = 'Emanuele Faranda ' for @authors; + $_ eq 'ericcurtin ' and $_ = 'Eric Curtin ' for @authors; + $_ eq 'hekel ' and $_ = 'Adam Erdman ' for @authors; + $_ eq 'infirit ' and $_ = 'Sander Sweers ' for @authors; + $_ eq 'leigh123linux ' and $_ = 'Leigh Scott ' for @authors; + $_ eq 'Martin Wimpress ' and $_ = 'Martin Wimpress ' for @authors; + $_ eq 'Monsta ' and $_ = 'Vlad Orlov ' for @authors; + $_ eq 'monsta ' and $_ = 'Vlad Orlov ' for @authors; + $_ eq 'OBATA Akio ' and $_ = 'Obata Akio ' for @authors; + $_ eq 'raveit65 ' and $_ = 'Wolfgang Ulbrich ' for @authors; + $_ eq 'raveit65 ' and $_ = 'Wolfgang Ulbrich ' for @authors; + $_ eq 'rbuj ' and $_ = 'Robert Buj ' for @authors; + $_ eq 'romovs ' and $_ = 'Roman Ovseitsev ' for @authors; + $_ eq 'tarakbumba ' and $_ = 'Atilla ÖNTAŞ ' for @authors; + $_ eq 'Victor Kareh ' and $_ = 'Victor Kareh ' for @authors; + $_ eq 'Wolfgang Ulbrich ' and $_ = 'Wolfgang Ulbrich ' for @authors; + $_ eq 'yetist ' and $_ = 'Wu Xiaotian ' for @authors; + return @authors; +} + +sub GetCurrentAuthors { + my @authors; + open(FILE,"src/caja.about") or die "Can't open src/caja.about"; + while () { + if (/^Authors=*(.+)$/) { + @authors=split(";",$1); + } + } + close FILE; + return ReplaceAuthors(@authors); +} + +sub GetNewAuthors { + my @authors = `git log --pretty="%an <%ae>" --since "2012-01-01" -- . "_.h" "_.c" | sort | uniq | sed 's/@/%/g' | sed '/^mate-i18n.*/d'`; + chomp @authors; + return ReplaceAuthors(@authors); +} + +my @A = GetCurrentAuthors; +my @B = GetNewAuthors; +my @merged = sort { $a cmp $b } keys %{{map {($_ => 1)} (@A, @B)}}; +print join(';',@merged) . ';'; -- cgit v1.2.1