#!/usr/bin/perl # # analysecommits.pl: Reads the datafile given as $ARGV[0] and produces # a text summary. # # Copyright (c) 2001 Paul Warren. All rights reserved. # # $Log: analysecommits.pl,v $ # Revision 1.1 2001/10/02 20:04:55 pdw # parrot_html # # my $list_length = 20; use Data::Dumper; my $file = shift @ARGV; my $totals; open FIN,$file; my $tfile = join '',; close FIN; eval $tfile; my $i = 0; my @modules = sort {$totals->{modules}->{$b} <=> $totals->{modules}->{$a}} keys %{$totals->{modules}}; my @authors = sort {$totals->{authors}->{$b} <=> $totals->{authors}->{$a}} keys %{$totals->{authors}}; # $^="LIST_TOP"; $~="LIST"; print "Most active modules\n"; while (@modules and $i < $list_length) { $name = shift @modules; $count = $totals->{modules}->{$name}; write; $i++; } if (@modules) { print "[".scalar(@modules). " active modules omitted]\n\n"; } $i=0; print "Most active developers\n"; while (@authors and $i < $list_length) { $name = shift @authors; $count = $totals->{authors}->{$name}; write; $i++; } if (@authors) { print "[".scalar(@authors). " active developers omitted]\n\n"; } format LIST = @>>> @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $count, $name .