#!/usr/bin/perl -w

$name = $ARGV[0];

$name =~ s/ /_/g;
$name =~ s/\'//g;
$name =~ s/_*\-+_*/\-/g;
if ( $name =~ /^\(/ ) {
	$name =~ s/^\(//;
	$name =~ s/\)_*/\-/;
}

# i can't really come up with a rationale for this, but i don't think
# capital letters look right among underscores
$name =~ tr/A-Z/a-z/;

print $name;
