#!/usr/bin/env php
['Ahmed Siam', 'aahs.coder@gmail.com'],
'aconeil' => ["Alex O'Neil", 'aconeil@iu.edu'],
'lguyogiro' => ['Robert Pugh', 'robert.pugh408@gmail.com'],
'nsingh475' => ['Natasha Singh', 'natashasi475@gmail.com'],
'yypy22' => ['Eiji Miyamoto', 'eiji.miyamoto@student.manchester.ac.uk'],
];
$rs = [
'ahmedsiam0' => ['icuformat', 'https://github.com/ahmedsiam0/lttoolbox', 'https://github.com/ahmedsiam0/apertium', 'https://github.com/ahmedsiam0/apertium-separable', 'https://github.com/ahmedsiam0/apertium-anaphora', 'https://github.com/ahmedsiam0/apertium-recursive', 'https://github.com/ahmedsiam0/apertium-lex-tools', 'https://github.com/ahmedsiam0/lexd'],
'aconeil' => ['https://github.com/aconeil/FLEx_to_Apertium'],
'lguyogiro' => ['apertium-azz', 'apertium-nhi'], //, 'apertium-azz-nhi'
'nsingh475' => ['apertium-kfy'],
'yypy22' => ['https://github.com/yypy22/apertium-jpn'],
];
foreach ($ps as $p => $n) {
echo "Collecting for $p\n";
$extra = '';
if (count($n) > 2) {
$extra = '
Links
';
foreach ($n[2] as $ex) {
$ex = htmlspecialchars($ex);
$extra .= '- '.$ex.'
';
}
$extra .= '
';
}
$html = <<
GSoC 2023 - {$n[0]} <{$n[1]}> ({$p})
{$extra}
Repositories
XHTML;
$cs = "Commits To ...
\n";
chdir(__DIR__);
shell_exec("rm -rf $p/ $p.zip");
mkdir($p);
chdir($p);
sort($rs[$p]);
foreach ($rs[$p] as $r) {
chdir(__DIR__.'/'.$p);
$url = $r;
if (substr($url, 0, 4) !== 'http') {
$url = "https://github.com/apertium/$url";
}
echo shell_exec("git clone --mirror '$url'");
if (preg_match('~^https://github.com/([^/]+)/([^/]+)$~', $url, $m)) {
chdir($m[2].'.git');
mkdir('diffs');
$css = explode("\n", trim(shell_exec("git log --all --branches --full-history --author-date-order --abbrev=12 '--pretty=tformat:%at%x09%h' '--since=2023-03-01' '--until=2023-09-01' '--author={$n[1]}' | sort | uniq")));
$cnt = count($css);
$html .= "\t- {$url} ({$cnt} commits) (local)
\n";
$cs .= "\n\n";
foreach ($css as $c) {
$c = explode("\t", $c);
shell_exec("git log -n 1 -c {$c[1]} > diffs/{$c[1]}.diff");
$c[0] = date('Y-m-d H:i', $c[0]);
$cs .= "\t- {$c[0]}: {$c[1]} (local)
\n";
}
$cs .= "
\n";
}
}
$html .= <<
{$cs}