#!/usr/bin/perl my %l; { my ($date, $user, $file); local $_; while (<>) { if (my $e = /^description:/ .. /^={77}/) { next if $e == 1 || $e =~ /E0/; if (/^-{28}/ .. /^date: /) { if (/^date: (\S+)\s.*author: (\S+);/) { ($date, $user) = ($1, $2); } } elsif (!/^branches: / && !/file .* was initially added on branch/ && !/empty log message/ && !/no_comment/) { $l{$date}{$user}{$file} .= $_; } } elsif (/Working file: (.*)/) { $file = $1; } } } my %users; foreach my $date (reverse sort keys %l) { foreach my $user (sort keys %{$l{$date}}) { next if $ENV{AUTHOR} && $ENV{AUTHOR} ne $user; my $fuser = $users{$user} || $user; print "$date $fuser\n\n"; my %inv; while (my ($file, $log) = each %{$l{$date}{$user}}) { $log =~ s/^\s+( \*)?//ms; $log =~ s/\s+$//ms; $log = "\n$log" if $log =~ /^-/; push @{$inv{$log}}, $file; } foreach my $log (keys %inv) { my $line = join(', ', @{$inv{$log}}) . ($log !~ /^\(/ && ':') . " $log"; print "\t* ", join("\n\t", auto_fill($line, 72)), "\n\n"; } } } 1; sub auto_fill { my ($line, $col) = @_; map { my @l; my $l = ''; $_ = " $_" if /^-/; while ($_) { s/^(\s*)(\S*)//; my $m = "$l$1$2"; if (length $m > $col) { push @l, $l; $l = $2; } else { $l = $m } } @l, $l; } split("\n", $line); } BEGIN { %users = ( 'abiro' => 'Arpad Biro ', 'adelorbeau' => 'Arnaud de Lorbeau ', 'adesmons' => 'Arnaud Desmons', 'aginies' => 'Antoine Ginies ', 'alafox' => 'Alice Lafox ', 'alemaire' => 'Aurélien Lemaire', 'alus' => 'Arkadiusz Lipiec ', 'amaury' => 'Amaury Amblard-Ladurantie', 'baudens' => 'David Baudens ', 'camille' => 'Camille Bégnis ', 'cbelisle' => 'Christian Belisle', 'chmou' => 'Chmouel Boudjnah', 'chmouel' => 'Chmouel Boudjnah', 'croy' => 'Christian Roy ', 'damien' => 'dam\'s ', 'daouda' => 'Daouda Lo ', 'dchaumette' => 'Damien Chaumette ', 'dindinx' => 'David odin', 'drdrake' => 'Dovix ', 'erwan' => 'Erwan Velu ', 'fabman' => 'Fabian Mandelbaum ', 'fcrozat' => 'Frederic Crozat ', 'flepied' => 'Frederic Lepied ', 'florin' => 'Florin Grad ', 'fpons' => 'Fançois Pons', 'fred' => 'Frederic Bastok', 'fwang' => 'Funda Wang ', 'gb' => 'Gwenole Beauchesne ', 'gbeauchesne' => 'Gwenole Beauchesne ', 'gc' => 'Guillaume Cottenceau ', 'hilbert' => '(Hilbert) ', 'install' => 'DrakX ', 'jdanjou' => 'Julien Danjou', 'jjorge' => 'José JORGE ', 'jpomerleau' => 'Joel Pomerleau', 'keld' => 'Keld Jørn Simonsen ', 'lmontel' => 'Laurent Montel ', 'mscherer' => 'Michael Scherer ', 'nplanel' => 'Nicolas Planel ', 'oblin' => 'Olivier Blin ', 'othauvin' => 'Olivier Thauvin ', 'pablo' => 'Pablo Saratxaga ', 'peroyvind' => 'Per Øyvind Karlsen ', 'phetroy' => 'Philippe Libat', 'philippe' => 'Philippe Libat', 'prigaux' => 'Pixel ', 'quintela' => 'Juan Quintela ', 'rchaillat' => 'Renaud Chaillat', 'rdalverny' => 'Romain d\'Alverny ', 'redhog' => 'RedHog', 'reinouts' => 'Reinout van Schouwen ', 'rgarciasuarez' => 'Rafael Garcia-Suarez ', 'rvojta' => 'Robert Vojta ', 'sbenedict' => 'Stew Benedict ', 'sdetilly' => 'Sylvain de Tilly', 'siegel' => 'Stefan Siegel ', 'tbacklund' => 'Thomas Backlund ', 'tkamppeter' => 'Till Kamppeter ', 'tpittich' => 'Tibor Pittich ', 'tsdgeos ' => 'Albert Astals Cid ', 'tv' => 'Thierry Vignaud ', 'tvignaud' => 'Thierry Vignaud ', 'uid524' => 'Chmouel Boudjnah', 'vdanen' => 'Vincent Danen ', 'vguardiola' => 'Vincent Guardiola ', 'warly' => 'Warly ', 'yduret' => 'Yves Duret', 'yoann' => 'Yoann Vandoorselaere', 'yrahal' => 'Youcef Rabah Rahal ', ); }