Add "last chance looking for" webpage generator
authorRich Salz <rsalz@openssl.org>
Wed, 21 Feb 2018 19:17:49 +0000 (14:17 -0500)
committerRich Salz <rsalz@openssl.org>
Wed, 21 Feb 2018 19:18:04 +0000 (14:18 -0500)
license/README
license/add-lastchance [new file with mode: 0755]

index aa713db7af9c4262c7c8408ea45b13af10903244..3db57426f42c97d4a4ddb8ed4c98fb125a6a693d 100644 (file)
@@ -10,6 +10,8 @@ Tools
     rmcommit -- Remove a set of commits from a user's activity
     rmuser -- Remove specified email authors from database
     whattoremove -- Commits to remove for folks who said no
+    add-counts -- add commit data to output of get-followups
+    add-lastchance -- "last chance trying to reach" version of add-counts
 
 Passwords; create these files.  One line per each
     adpass.txt -- HTTP password for admin functions
diff --git a/license/add-lastchance b/license/add-lastchance
new file mode 100755 (executable)
index 0000000..3d963f6
--- /dev/null
@@ -0,0 +1,74 @@
+#! /usr/bin/env perl
+# Annotate the output of "get-followups -d" to show the stats
+# of each commit for a "last chance trying to find" page.
+use strict;
+use warnings;
+
+die "Feed this the output of 'get-followups -d'\n" if -t 0;
+
+print <<'EOF';
+<html>
+  <head>
+    <title>Help find these hackers</title>
+    <link rel="stylesheet" type="text/css" href="/style.css">
+  </head>
+  <body>
+    <h1>Help find these hackers</h1>
+    <p>
+If you know where to find any of the following people, please email their
+current address to license@openssl.org, or ask them to get in touch.
+
+Each contributor is separated by a blank line.  The first line is the last
+known email we have (not valid), and the full name if known.  Each following
+line has the number of files changed, lines added and deleted, the commit ID
+and date, and then the commit subject line.
+
+Thank you!
+</p>
+<pre>
+EOF
+
+while ( <> ) {
+    unless ( /([0-da-f]{8}) .*/ ) {
+       s/.*uid.[0-9]+, //;
+       s/, \d, /, /;
+       s/"//g;
+       if ( /([^,]*), (.*)/ ) {
+           if ( $1 eq $2 ) {
+               print "&lt;$1>\n";
+           } else {
+               print "$2 &lt;$1>\n";
+           }
+       } else {
+           print;
+       }
+       next;
+    }
+    my $cid = $1;
+    my $line = $_;
+    $line =~ s/^\s*//;
+    if ( $cid eq 'd02b48c6' ) {
+       print "- +0/-0 ", $_;
+       next;
+    }
+    my $pattern = "$cid^..$cid";
+    my $files = 0;
+    my $adds = 0;
+    my $dels = 0;
+    open my $F, "git diff --numstat $pattern|"
+       || die "Can't open git diff, $!\n";
+    while ( <$F> ) {
+       $files++;
+       next unless /(\d+)\s+(\d+)\s+(.*)/;
+       $adds += int($1);
+       $dels += int($2);
+    }
+    close $F || die "Can't close git diff, $!\n";
+    print "$files +$adds -$dels $line";
+}
+print <<'EOF';
+
+    </pre>
+</body>
+</html>
+EOF