X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=www%2Fopening-stats.pl;h=58a0f9be02a9ed230808fb00ce281abeef3531e9;hb=cdae7109f5f92579d74fef8bce8aed5ee0cf2b61;hp=f13e0a83523a358b679ebfd9678f94b8aa68d5aa;hpb=e8fea43561352d3573201f4ebad2538ccd38568c;p=remoteglot-book diff --git a/www/opening-stats.pl b/www/opening-stats.pl index f13e0a8..58a0f9b 100755 --- a/www/opening-stats.pl +++ b/www/opening-stats.pl @@ -48,6 +48,9 @@ eval { $root_game->{'eco'} = $pgn->eco; $root_game->{'moves'} = int(((scalar @{$pgn->moves}) + 1) / 2); }; +if ($@) { + print STDERR "Error while getting root move: $@\n"; +} # Explore one move out. my $white_left = $json_root_pos->{'white'}; @@ -128,6 +131,7 @@ sub read_root_pgn { or die "../pgnnames.txt: $!"; while (<$pgnnamesfh>) { chomp; + s/^comp://; push @pgnnames, $_; } close $pgnnamesfh;