chiark / gitweb /
Normalise commodity name case (from uploads) master origin/master
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Apr 2023 12:20:08 +0000 (13:20 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Apr 2023 12:23:41 +0000 (13:23 +0100)
yarrg/Commods.pm

index 7f4061048c5e7360c4be9a62197d13d335ee76ff..474f43fb86ba3734dc0171331656383a592aca17 100644 (file)
@@ -427,6 +427,7 @@ sub check_tsv_line ($$) {
     $l =~ m/[\t [:graph:]]/ or &$bad_data('nonprinting char(s) '.sprintf "%#x", ord $&);
     my @v= split /\t/, $l, -1;
     @v==6 or &$bad_data('wrong number of fields');
     $l =~ m/[\t [:graph:]]/ or &$bad_data('nonprinting char(s) '.sprintf "%#x", ord $&);
     my @v= split /\t/, $l, -1;
     @v==6 or &$bad_data('wrong number of fields');
+    $v[0] = ucfirst lc $v[0]; # YPP anomalously has "Rum Spice"
     $v[1] =~ s/^\s+//; $v[1] =~ s/\s+$//; # ooo don't check :-(
     my ($commod,$stall) = @v;
 
     $v[1] =~ s/^\s+//; $v[1] =~ s/\s+$//; # ooo don't check :-(
     my ($commod,$stall) = @v;