#!/usr/bin/env php 'Aidana ', 'frankier' => 'Frankie Robertson ', 'gfro3d' => 'Gianfranco Fronteddu ', 'kvld' => 'Vladislav Kiryukhin ', 'maryszmary' => 'Мария Шеянова ', 'memduhg' => 'Memduh Gökırmak ', //'Schindler97' => 'Jaipal Singh ', 'tiefling-cat' => 'Nikita Medyankin ', 'uliana-sentsova' => 'Ульяна Сенцова ', //'' => 'Syed Juned Ali ', //'' => 'Kira Ren ', ]; $attr = []; // Using local mirror instead of https://svn.code.sf.net/p/apertium/svn/ $log = shell_exec("svn log '-r{2016-03-15}:{2016-08-24}' -q file:///home/apertium/svn-mirror/apertium-sf-net/ | grep '^r'"); $log = trim($log); $log = explode("\n", $log); foreach ($log as $l) { $l = str_replace('| hectoralos |', '| gfro3d |', $l); foreach ($ps as $k => $v) { if (strpos($l, '| '.$k.' |') !== false) { $attr[$k][] = intval(substr($l, 1, 6)); } } } ksort($attr); foreach ($attr as $k => $vs) { $nv = []; $l = 0; foreach ($vs as $v) { if ($l && $v == $nv[$l]+1) { $nv[$l] = $v; } else { $nv[$v] = $v; $l = $v; } } $attr[$k] = $nv; } foreach ($attr as $k => $vs) { echo "Exporting {$k} ...\n"; chdir(__DIR__); shell_exec("rm -rf {$k} {$k}.zip {$k}.tar.gz"); shell_exec("mkdir -p {$k}"); chdir($k); $paths = []; foreach ($vs as $b => $e) { $log = shell_exec('svn log --xml -r'.$b.':'.$e.' -v file:///home/apertium/svn-mirror/apertium-sf-net/ | xml_pp | grep ""'); if (preg_match_all('~]*>(/[^<]+)~u', $log, $ms, PREG_PATTERN_ORDER)) { foreach ($ms[1] as $m) { if (empty($paths[$m])) { $paths[$m] = 0; } ++$paths[$m]; } } // Don't care about pure whitespace changes: -x -b shell_exec('svn diff -r'.($b-1).':'.$e.' -x -b file:///home/apertium/svn-mirror/apertium-sf-net/ > r'.$b.'-'.$e.'.diff'); } $s_ps = htmlspecialchars($ps[$k]); $html = << GSoC 2016 - {$s_ps} ({$k}) - Subversion Log Extract

GSoC 2016: {$s_ps} ({$k})

Subversion Log Extract

Download all diffs as zip or tar.gz

Touched Paths

    XOUT; ksort($paths); foreach ($paths as $pk => $pv) { $pk = htmlspecialchars($pk); $html .= '
  • '.$pk.' ('.$pv.' hits)
  • '."\n"; } $html .= "
\n\n"; $html .= <<Changesets
    XOUT; foreach ($vs as $b => $e) { if ($b == $e) { $html .= '
  • r'.$e.' (diff)
  • '."\n"; } else { $html .= '
  • r'.$b.':'.$e.' (diff)
  • '."\n"; } } $html .= "
\n\n"; $html .= << XOUT; chdir(__DIR__); file_put_contents("{$k}.html", $html); shell_exec("zip -9r {$k}.zip $k.html $k"); shell_exec("tar -zcvf {$k}.tar.gz $k.html $k"); } chdir(__DIR__); shell_exec('rm -rf schindler schindler.zip schindler.tar.gz && mkdir -p schindler && cd schindler && git clone https://gitlab.com/jpsinghgoud/apertium-lint.git && cd .. && zip -9r schindler.zip schindler.html schindler && tar -zcvf schindler.tar.gz schindler.html schindler');