#!/usr/bin/env php 'Marc Riera Irigoyen ', 'edgeandpearl' => 'Marina Kustova ', //'silentflame' => 'Vinay Kumar Singh ', // https://github.com/SilentFlame //'basilisandr' => 'Vasilisa Andriyanets ', // https://github.com/BasilisAndr/chkchn 'memduhg' => 'Memduh Gökırmak ', 'lylax47' => 'John Lyell ', 'irene-tang' => 'Irene Tang ', //'deltamachine' => 'Anna Kondratjeva ', // https://github.com/deltamachine/shallow_syntactic_function_labeller //'share-with-me' => 'Monish Godhia ', //'maryszmary' => 'Мария Шеянова ', // https://github.com/jonorthwash/ud-annotatrix 'gfro3d' => 'Gianfranco Fronteddu ', ]; $attr = []; // Using local mirror instead of https://svn.code.sf.net/p/apertium/svn/ $log = shell_exec("svn log '-r{2017-03-20}:{2017-08-29}' -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 2017 - {$s_ps} ({$k}) - Subversion Log Extract

GSoC 2017: {$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 silentflame silentflame.zip silentflame.tar.gz && mkdir -p silentflame && cd silentflame && git clone https://github.com/SilentFlame/apertium-1 && git clone https://github.com/SilentFlame/lttoolbox && git clone https://github.com/SilentFlame/apertium && cd .. && zip -9r silentflame.zip silentflame.html silentflame && tar -zcvf silentflame.tar.gz silentflame.html silentflame'); shell_exec('rm -rf basilisandr basilisandr.zip basilisandr.tar.gz && mkdir -p basilisandr && cd basilisandr && git clone https://github.com/BasilisAndr/chkchn && cd .. && zip -9r basilisandr.zip basilisandr.html basilisandr && tar -zcvf basilisandr.tar.gz basilisandr.html basilisandr'); shell_exec('rm -rf deltamachine deltamachine.zip deltamachine.tar.gz && mkdir -p deltamachine && cd deltamachine && git clone https://github.com/deltamachine/shallow_syntactic_function_labeller && cd .. && zip -9r deltamachine.zip deltamachine.html deltamachine && tar -zcvf deltamachine.tar.gz deltamachine.html deltamachine'); shell_exec('rm -rf share-with-me share-with-me.zip share-with-me.tar.gz && mkdir -p share-with-me && cd share-with-me && git clone https://github.com/goavki/apertium-html-tools && git clone https://github.com/goavki/apertium-apy && cd .. && zip -9r share-with-me.zip share-with-me.html share-with-me && tar -zcvf share-with-me.tar.gz share-with-me.html share-with-me'); shell_exec('rm -rf maryszmary maryszmary.zip maryszmary.tar.gz && mkdir -p maryszmary && cd maryszmary && git clone https://github.com/jonorthwash/ud-annotatrix && git clone https://github.com/maryszmary/ud-annotatrix ud-annotatrix-fork && cd .. && zip -9r maryszmary.zip maryszmary.html maryszmary && tar -zcvf maryszmary.tar.gz maryszmary.html maryszmary');