summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/CREDITS.txt54
-rw-r--r--crawl-ref/source/util/salvage-credits.pl69
2 files changed, 96 insertions, 27 deletions
diff --git a/crawl-ref/CREDITS.txt b/crawl-ref/CREDITS.txt
index 04f38e54ee..5258ad205f 100644
--- a/crawl-ref/CREDITS.txt
+++ b/crawl-ref/CREDITS.txt
@@ -16,31 +16,31 @@ Enne Walker) would like to thank:
We'd also like to thank members of the Dungeon Crawl community who have
contributed to Dungeon Crawl Stone Soup:
-Warwick Allison R. Dan Henry nyra
-Juha Arpiainen Brendan Hickey Dylan O'Donnell
-Roy Axenov Benoit Hudson Stefan O'Rear
-Max Bane Iainuki Yuuma Oohara
-Bill Beher Ilyak Erik Piper
-Alexander Beisig Mitsuhiro Itakura Lemuel Pitkin
-Stu Black Mikko Juola Derek Ray
-Erik Inge Bolsø Jarmo Kielosto Remsleep
- Will Rogers
-Peter Borgmann Kornel Kisielewicz David Rose
-Jude Brown Daniel Klein Sebastian Salman
-Trent W. Buck Vambola Kotkas Brett Scarborough
-Terje Bø Vsevolod Kozlov Darshan Shaligram
-Aaron Curtis Ryan Kusnery Robert Shimmin
-Denzi Jukka Kuusisto Sigurd
-Rachel Elizabeth Dillon Maciej Lapinski Edgar Simo
-Mike Drinen Jordan Lewis Solf
-Kieron Dunbar Icy Lich Johan Strandell
-Micha Elsner Jesse Luehrs Roman Sêk
-Christopher Evenstar Markus Maier Marc H. Thoben
-Ben Goetter Arien Malec Matt Titus
-Rob Grant Neil 'Mu' Middleton Steven Wheeler
-John Greenberg Shawn M Moore Jeremey Wilson
-GreyKnight Eva Myers Yelve Yakut
-Shayne Halvorson Wille Mäntylä Zooko
-Ciaran Hamilton Onia Ninara
-Chris Hamons Erkki Nurmi
+Warwick Allison R. Dan Henry Mattias Nyberg
+Juha Arpiainen Brendan Hickey nyra
+Roy Axenov Benoit Hudson Dylan O'Donnell
+Max Bane Iainuki Stefan O'Rear
+Bill Beher Ilyak Yuuma Oohara
+Alexander Beisig Mitsuhiro Itakura Pedro
+Stu Black Mikko Juola Erik Piper
+Erik Inge Bolsø Jarmo Kielosto Lemuel Pitkin
+Peter Borgmann Kornel Kisielewicz Derek Ray
+Jude Brown Daniel Klein Remsleep
+Trent W. Buck Vambola Kotkas Will Rogers
+Terje Bø Vsevolod Kozlov David Rose
+Aaron Curtis Ryan Kusnery Sebastian Salman
+Denzi Jukka Kuusisto Brett Scarborough
+Rachel Elizabeth Dillon Maciej Lapinski Darshan Shaligram
+Mike Drinen Jordan Lewis Robert Shimmin
+Kieron Dunbar Icy Lich Sigurd
+Micha Elsner Jesse Luehrs Edgar Simo
+Christopher Evenstar Markus Maier Solf
+Ben Goetter Arien Malec Johan Strandell
+Rob Grant Paul Maloney Roman Sêk
+John Greenberg Neil 'Mu' Middleton Marc H. Thoben
+GreyKnight Shawn M Moore Matt Titus
+Joshua Gross Eva Myers Steven Wheeler
+Shayne Halvorson Wille Mäntylä Jeremey Wilson
+Ciaran Hamilton Onia Ninara Yelve Yakut
+Chris Hamons Erkki Nurmi Zooko
diff --git a/crawl-ref/source/util/salvage-credits.pl b/crawl-ref/source/util/salvage-credits.pl
new file mode 100644
index 0000000000..ab0f4fe6cc
--- /dev/null
+++ b/crawl-ref/source/util/salvage-credits.pl
@@ -0,0 +1,69 @@
+#! /usr/bin/perl
+
+use strict;
+use warnings;
+use Encode;
+
+binmode STDOUT, ':utf8';
+
+print "Fetching all historical contributors for CREDITS\n";
+my @shas = qx/git log --pretty=oneline --follow CREDITS.txt/;
+s/^(\w+).*/$1/ for @shas;
+
+my $contributors = '';
+
+fetch_contributors($_) for @shas;
+
+print "Going back to master\n";
+system "git checkout master" and die "git checkout master failed\n";
+
+open my $outf, '>>', 'CREDITS.txt' or die "Can't write CREDITS.txt\n";
+binmode $outf, ':utf8';
+print $outf "\n$contributors\n";
+close $outf;
+
+print "Contributors appended to CREDITS.txt!\n";
+
+sub fetch_contributors {
+ my $sha = shift;
+ print "Visiting $sha credits.\n";
+ system "git checkout $sha" and die "git checkout $sha failed\n";
+ $contributors .= credits_names();
+}
+
+sub find_credits {
+ my @tests = grep(-f, ('CREDITS.txt', 'CREDITS'));
+ die "Cannot find CREDITS file\n" unless @tests;
+ return $tests[0];
+}
+
+sub decodeText {
+ my $bytes = shift;
+ eval {
+ $bytes = decode('utf-8', $bytes, 1);
+ return $bytes;
+ };
+ eval {
+ $bytes = decode('iso-8859-1', $bytes, 1);
+ return $bytes;
+ };
+ $bytes
+}
+
+sub credits_names {
+ my $file = find_credits();
+ open my $inf, '<', $file or die "Can't read $file: $!\n";
+ binmode $inf;
+ my @lines = <$inf>;
+ close $inf;
+ my $res = '';
+ my $incontributors;
+ for (@lines) {
+ chomp;
+ $_ = decodeText($_);
+ $_ .= "\n";
+ $res .= $_ if $incontributors && /\S/;
+ $incontributors = 1 if !$incontributors && /contributed.*:\s*$/;
+ }
+ $res
+}