Skip to content

Commit da3b634

Browse files
rbujraveit65
authored andcommitted
Add update-authors.pl script which helps to update caja.about
1 parent 5379181 commit da3b634

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

update-authors.pl

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/usr/bin/perl
2+
=pod
3+
4+
update-authors.pl is part of Caja.
5+
6+
Caja is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 2 of the License, or
9+
(at your option) any later version.
10+
11+
Caja is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with Caja. If not, see <http://www.gnu.org/licenses/>.
18+
19+
=cut
20+
use strict;
21+
use warnings;
22+
23+
sub ReplaceAuthors {
24+
my @authors = @_;
25+
$_ eq 'alexandervdm <alexandervdm%gliese.me>' and $_ = 'Alexander van der Meij <alexandervdm%gliese.me>' for @authors;
26+
$_ eq 'bkerlin <me%brentkerlin.com>' and $_ = 'Brent Kerlin <me%brentkerlin.com>' for @authors;
27+
$_ eq 'bl0ckeduser <bl0ckedusersoft%gmail.com>' and $_ = 'Gabriel Cormier-Affleck <bl0ckedusersoft%gmail.com>' for @authors;
28+
$_ eq 'chat-to-me%raveit.de <Nice&Gently>' and $_ = 'Wolfgang Ulbrich <mate%raveit.de>' for @authors;
29+
$_ eq 'chen donghai <chen.donghai%zte.com.cn>' and $_ = 'Chen Donghai <chen.donghai%zte.com.cn>' for @authors;
30+
$_ eq 'Clément Masci <>' and $_ = 'Clément Masci' for @authors;
31+
$_ eq 'emanuele-f <black.silver%hotmail.it>' and $_ = 'Emanuele Faranda <black.silver%hotmail.it>' for @authors;
32+
$_ eq 'ericcurtin <ericcurtin17%gmail.com>' and $_ = 'Eric Curtin <ericcurtin17%gmail.com>' for @authors;
33+
$_ eq 'hekel <hekel%archlinux.info>' and $_ = 'Adam Erdman <hekel%archlinux.info>' for @authors;
34+
$_ eq 'infirit <infirit%gmail.com>' and $_ = 'Sander Sweers <infirit%gmail.com>' for @authors;
35+
$_ eq 'leigh123linux <leigh123linux%googlemail.com>' and $_ = 'Leigh Scott <leigh123linux%googlemail.com>' for @authors;
36+
$_ eq 'Martin Wimpress <code%flexion.org>' and $_ = 'Martin Wimpress <martin%mate-desktop.org>' for @authors;
37+
$_ eq 'Monsta <monsta%inbox.ru>' and $_ = 'Vlad Orlov <monsta%inbox.ru>' for @authors;
38+
$_ eq 'monsta <monsta%inbox.ru>' and $_ = 'Vlad Orlov <monsta%inbox.ru>' for @authors;
39+
$_ eq 'OBATA Akio <obache%users.noreply.github.com>' and $_ = 'Obata Akio <obache%users.noreply.github.com>' for @authors;
40+
$_ eq 'raveit65 <chat-to-me%raveit.de>' and $_ = 'Wolfgang Ulbrich <mate%raveit.de>' for @authors;
41+
$_ eq 'raveit65 <mate%raveit.de>' and $_ = 'Wolfgang Ulbrich <mate%raveit.de>' for @authors;
42+
$_ eq 'rbuj <robert.buj%gmail.com>' and $_ = 'Robert Buj <robert.buj%gmail.com>' for @authors;
43+
$_ eq 'romovs <romovs%gmail.com>' and $_ = 'Roman Ovseitsev <romovs%gmail.com>' for @authors;
44+
$_ eq 'tarakbumba <tarakbumba%gmail.com>' and $_ = 'Atilla ÖNTAŞ <tarakbumba%gmail.com>' for @authors;
45+
$_ eq 'Victor Kareh <vkareh%vkareh.net>' and $_ = 'Victor Kareh <vkareh%redhat.com>' for @authors;
46+
$_ eq 'Wolfgang Ulbrich <chat-to-me%raveit.de>' and $_ = 'Wolfgang Ulbrich <mate%raveit.de>' for @authors;
47+
$_ eq 'yetist <xiaotian.wu%i-soft.com.cn>' and $_ = 'Wu Xiaotian <yetist%gmail.com>' for @authors;
48+
return @authors;
49+
}
50+
51+
sub GetCurrentAuthors {
52+
my @authors;
53+
open(FILE,"src/caja.about") or die "Can't open src/caja.about";
54+
while (<FILE>) {
55+
if (/^Authors=*(.+)$/) {
56+
@authors=split(";",$1);
57+
}
58+
}
59+
close FILE;
60+
return ReplaceAuthors(@authors);
61+
}
62+
63+
sub GetNewAuthors {
64+
my @authors = `git log --pretty="%an <%ae>" --since "2012-01-01" -- . "_.h" "_.c" | sort | uniq | sed 's/@/%/g' | sed '/^mate-i18n.*/d'`;
65+
chomp @authors;
66+
return ReplaceAuthors(@authors);
67+
}
68+
69+
my @A = GetCurrentAuthors;
70+
my @B = GetNewAuthors;
71+
my @merged = sort { $a cmp $b } keys %{{map {($_ => 1)} (@A, @B)}};
72+
print join(';',@merged) . ';';

0 commit comments

Comments
 (0)