#!/usr/bin/perl -wT

print "-- Autogenerated by content-types/doc/make-insert.pl\n";

while (<STDIN>) {
  if (/(.*);(\w\w)/) {
    my $code = $2;
    my $name = lc($1);
    $name =~ s/\b(\w)/uc($1)/gex;
    $name =~ s/The/the/gx;
    $name =~ s/Of/of/gx;
    $name =~ s/And/and/gx;
    $name =~ s/'/''/gx;
    print "insert into iso_countries (iso_code, country_name) values ('$code', '$name');\n";
  }
}

print "-- End\n";
