#!/usr/bin/perl
use strict;

# Reads an svn change log from: http://misterhouse.svn.sourceforge.net/viewvc/misterhouse/branches/v2-104/?view=log
# Creats a pod file to be added to docs/updates.pod, which translates to docs/updates.txt.
# Updates.txt then gets parsed by mh/bin/authors.

my ($author, $date, $changes);

my %names = (dnorwood2 => 'David Norwood', gliming => 'Gregg Liming', hplato => 'Howard Plato', jduda => 'Jim Duda', mattrwilliams => 'Matthew Williams', winter => 'Bruce Winter', zonyl => 'Jason Sharpee');

while (<>) {
    if (/^Modified (.+?) \S+ (\S+) UTC.+ (\S+)$/) {
	print "$author :: $date\n - $changes\n" if $author;
	$changes = '';
	$author = $3;  $date = "$1 $2";
        $author = $names{$author} if $names{$author};
	next;
    }
    next if /^Revision / or /^Original Path/ or /^ *$/;
    $changes .= $_;
}

