1 # Default configuration. Copy this file to config.local.pm if you want
2 # to change anything instead of modifying this (so you won't have to make
5 package remoteglotconf;
7 # Set to non-undef to pick out one specific game from a PGN file with many games.
9 our $pgn_filter = undef;
10 #our $pgn_filter = sub {
12 # return $pgn->round() eq '7' && $pgn->white eq 'Carlsen,M';
15 # Set to non-undef to override the clock information with our own calculations.
16 # The example implements a simple 60+60 (with bonus added before the move).
17 # FIXME(sesse): We might not see all moves in a PGN individually, so this might
18 # skip some moves for bonus.
19 our $adjust_clocks_before_move = undef;
20 #our $adjust_clocks_before_move = sub {
21 # my ($white_clock_left, $black_clock_left, $move, $toplay) = @_;
23 # if (!defined($$white_clock_left) || !defined($$black_clock_left)) {
24 # $$white_clock_left = 3600;
25 # $$black_clock_left = 3600;
27 # if ($toplay eq 'W') {
28 # $$white_clock_left += 60;
30 # $$black_clock_left += 60;
34 our $json_output = "/srv/analysis.sesse.net/www/analysis.json";
35 our $json_history_dir = "/srv/analysis.sesse.net/www/history/"; # undef for none.
37 our $engine_cmdline = "./stockfish";
38 our %engine_config = (
39 # 'NalimovPath' => '/srv/tablebase',
40 'NalimovUsage' => 'Rarely',
44 our $engine_grpc_backend = undef; # Not used by us, but will be communicated to serve-analysis.js.
46 # Separate engine for multi-PV; can be undef for none.
47 our $engine2_cmdline = undef;
48 our %engine2_config = (
49 # 'NalimovPath' => '/srv/tablebase',
50 'NalimovUsage' => 'Rarely',
54 our $engine2_grpc_backend = undef; # Not used by us, but will be communicated to serve-analysis.js.
56 our $update_max_interval = 1.0;
57 our $update_force_after_move = 0.2;
62 # Command line to run the Fathom tablebase lookup program, if installed,
63 # including the --path= argument.
64 our $fathom_cmdline = undef;
66 # Credits to show in the footer.
67 our $engine_url = "http://www.stockfishchess.org/";
68 our $engine_details = undef; # For hardware.
69 our $move_source = "FICS";
70 our $move_source_url = "http://www.freechess.org/";
72 # Postgres configuration.
73 our $dbistr = "dbi:Pg:dbname=remoteglot";
77 # For manual moves made from the web interface.
78 our $adminpass = undef;
81 my $config_filename = $ENV{'REMOTEGLOT_CONFIG'} // 'config.local.pm';
82 require $config_filename;