use utf8;
binmode STDOUT, ":utf8";

my $author;
my $inpatch = 0;

while (<>)
{
    if    ( /^patch/ ) { $inpatch = 1; }
    elsif ( /^goner/ ) { $inpatch = 0; }
    elsif ( !/[a-z]/ ) { print "\n"; }
    elsif ( !$inpatch ) {}
    elsif ( /^Author: (.*)/ ) { $author = $1; }
    elsif ( /^Date:   (.*)/ ) { print "$author, $1 \n"; }
    elsif ( /^    ([RMA]!?) \.\/(.*)/ ) { print "        $1 $2\n"; }
    elsif ( /^     \.\/(.*) -> (.*)/ ) { print "        $1 → $2\n"; }
    else  { print s/^  \* //r; }
}
