{ version => '02', contest_name => '31 FLAVORS CONTEST', contest_id => '31-FLAVORS', filter => { mode => \"IN ('PSK', 'BPSK', 'QPSK', 'PSK31', 'BPSK31', 'QPSK31', 'PSK63', 'BPSK63', 'QPSK63', 'PSK125', 'BPSK125' )", band => \"IN('20M')", }, defaults => { contest_url => 'http://www.podxs070.com/31-flavors', log_cols => [qw/ call qso_date time_on mode srx dxccprefix state /], placeholders => [qw/ Name TimeZone Category Email 070-Number ADDRESS /], scoreboard_cols => [qw/ 070-number category timezone /], dropbox_options => { Category => [ 'QRP 5 watts', 'Low Power 20 watts', 'Medium Power 100 watts' ], TimeZone => [ (map {sprintf '-%02d00',$_} reverse 1 .. 12), '0000', (map {sprintf '+%02d00',$_} 1 .. 12 ), ], }, update => sub { my $row = shift; my %h; my ($offset) = $INPUT{TimeZone} =~ /(\d\d)/; $offset *= $INPUT{TimeZone} =~ /-/ ? -1 : 1; # cast to int and assign sign. my ($hr) = $row->{time_on} =~ /(\d\d)/; $hr = (24 + $hr + $offset) % 24; if ( $hr < 12 || $hr >= 18 ){ # outside of the 12:00-18:00 localtime window $h{contest_use} = "Check-log contact: (local hour=${hr})"; } $h{state} = '' unless $row->{state}; $h{state} = 'MD' if $row->{state} =~ /^(MDC|DC)$/i; return \%h; }, Qs => [ { label => 'BPSK31 Contacts', weight => 1, group_by => 'call', where => {contest_use => 1,mode=>[qw/PSK BPSK PSK31 BPSK31/]} }, { label => 'QPSK31 Contacts', weight => 1, group_by => 'call', where => {contest_use => 1,mode=>[qw/QPSK QPSK31/]} }, { label => 'BPSK63 Contacts', weight => 1, group_by => 'call', where => {contest_use => 1,mode=>[qw/PSK63 BPSK63/]} }, { label => 'QPSK63 Contacts', weight => 1, group_by => 'call', where => {contest_use => 1,mode=>[qw/QPSK63/]} }, { label => 'BPSK125 Contacts', weight => 1, group_by => 'call', where => {contest_use => 1,mode=>[qw/PSK125 BPSK125/]} }, { label => "ERRORS", weight => 0, group_by => 'call,qso_date,time_on,rst_rcvd,srx, contest_use', where => { contest_use => {'!='=>1} } }, { label => "ERRORS - unknown DXCC; no mult credit", weight => 0, group_by => 'qso_date,time_on,band,call', where => {dxccprefix=>'??'} }, { label => "ERRORS - unknown state/province; no mult credit", weight => 0, group_by => 'qso_date,time_on,band,call,dxccprefix', where => {dxccprefix=>[qw/K KH6 KL7 VE/],state=>''} }, ], mults => [ map { my ($s, $modes) = @$_; ( { label => "$s DXCC", group_by => 'dxccprefix', where=>{mode=>$modes, dxccprefix=>{'!='=>'??'}} }, { label => "$s States", group_by => 'state', where => {mode=>$modes, dxccprefix => [qw/K KH6 KL7/], state=>{'!='=>''}} }, { label => "$s Provinces", group_by => 'state', where => {mode=>$modes, dxccprefix => 'VE', state=>{'!='=>''}} }, ) } ( [ 'BPSK31', [qw/PSK BPSK PSK31 BPSK31/] ], [ 'QPSK31', [qw/QPSK QPSK31/] ], [ 'BPSK63', [qw/PSK63 BPSK63/] ], [ 'QPSK63', [qw/QPSK63/] ], [ 'BPSK125', [qw/PSK125 BPSK125/] ], ) ], }, years => { 2010 => { filter => { qso_date => { -between => [20100410, 20100411] }, }, closed => 1, }, 2011 => { filter => { qso_date => { -between => [20110409, 20110410] }, }, }, }, }