From: Ricardo Markiewicz Date: Tue, 2 Dec 2003 15:28:19 +0000 (+0000) Subject: Se agrega quien hizo mas commits cada dia ... se ve que luca programa 2 lineas ... X-Git-Tag: svn_import~39 X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/commitdiff_plain/385eb8bbf0b2376f62e175a2d1ea2b929db84929 Se agrega quien hizo mas commits cada dia ... se ve que luca programa 2 lineas commitea :-D --- diff --git a/log_trace.pl b/log_trace.pl index f1716d3..428893b 100755 --- a/log_trace.pl +++ b/log_trace.pl @@ -10,21 +10,47 @@ #@lines = ; #close(LOG); -$texto = `svn log | grep rev | grep lines`; +#$texto = `svn log | grep rev | grep lines`; +$texto = `cat log.txt | grep rev | grep lines`; @lines = split(/\n/, $texto); -my %hash; +my %hash, %users; foreach $line (@lines) { @datos = split(/ /, $line); $hash{$datos[5]}++; + $users{$datos[5]}{$datos[3]}++; } print "PlaQui - Grafica de Progreso SVN\n"; +print "--------------------------------\n\n"; +print "Fecha Commits\n"; + foreach $date (sort keys %hash) { - print "$date\t"; + print "$date "; + + $win = ""; + $win_pts = -1; + foreach $name (keys %{$users{$date}}) { + if ($users{$date}{$name} > $win_pts) { + $win = $name; + $win_pts = $users{$date}{$name}; + } else { + if ($users{$date}{$name} = $win_pts) { + $win = $win."|".$name; + } + } + } + + #Imprimo el Ganador + for($i=0; $i<$hash{$date}; $i++) { print "*"; } + print "($win)"; print "\n"; } +print "\n"; +print "( ) = Máximo Commiteador del Día\n"; +print "* == 1 Commit\n"; +