# ARI -- inputs: Cont, Country # cqz ; call area calc # TODO: input: CQZ, Cont, Country, Call Area # http://drcg.de/index2.php?option=com_docman&task=doc_view&gid=76&Itemid=61 my %pts_table = map { my @v = split /,\s*/, $_; my $z = shift @v; $z => \@v } split "\n", < '01', contest_name => 'The DRCG Long Distance Contest', contest_id => 'DLDC-RTTY', filter => { mode => \"IN ('RTTY')", band => \"IN('80M','40M','20M','15M','10M')", }, defaults => { contest_url => 'http://drcg.de/index.php?option=com_content&task=view&id=124&Itemid=84', log_cols => [qw/ mycall call qso_date time_on freq band mode rst_sent stx rst_rcvd srx cqz cont pfx dxccprefix calc2 /], placeholders => [qw/ cqz /], dropbox_options => { cqz => [ 1 .. 40 ], CATEGORY => [ 'SINGLE-OP', 'MULTI-ONE', 'CHECKLOG', 'SWL', ], 'CATEGORY-TIME' => [ '', '6-HOURS', ], }, update => sub { my $row = shift; my $s = $row->{dxccprefix}; if( $s =~ /^(K|VE|JA|VK)$/ ){ my $n = ( $row->{pfx} =~ /(\d+)/g )[-1]; $s .= $n; } my $pts = $pts_table[ $row->{cqz} - 1 ]; return { calc1 => $s, # the "country". DXCC, or Call area (e.g. K4) for K/VE/JA/VK calc2 => $pts, # Q-pts }; }, # TODO --- support scoring of single-band class, # where qso's on other bands count as 0 points, 0 # multipliers, 0 QSOs. Qs => [ (map { my $z = $_; { label => "Zone $z", weight => $pts_table[$_-1], group_by => 'call, band', where => {cqz=>$z} }, } 1..40), ], mults => [ { label => 'DXCC', group_by => 'calc1,band' }, { label => 'cont', weight=>0, group_by => 'cont' }, # TODO: super_mults ... use weight => -1 ?? # TODO: LIMIT 6 for super_mult ], cabrillo => { cabrillo_url => 'http://drcg.de/index.php?option=com_content&task=view&id=125&Itemid=86', version => '2.0', headers => [qw/ CATEGORY CATEGORY-TIME CLUB NAME ADDRESS OPERATORS SOAPBOX /], qso_cols => [qw/cab_freq cab_mode cab_date cab_time mycall rst_sent stx call rst_rcvd cqz srx /], qso_fmt => do { my $zn = sprintf '%02d', $INPUT{cqz}; "%-5s %-2s %-10s %-04s %-12s %-3s $zn %04d %-12s %-3s %02d %04d" }, # 0000000001111111111222222222233333333334444444444555555555566666666667777777777 # 1234567890123456789012345678901234567890123456789012345678901234567890123456789 # -----INFORMATION SENT--- --INFORMATION RECEIVED-- # Call Sent Recd Recd # QSO: Freq Mo Date Time Sent Rst Zn Time Call Rst Zn Time # QSO: ***** ** yyyy-mm-dd nnnn ************ nnn nn nnnn ************ nnn nn nnnn # QSO: 7049 RY 2010-06-12 0815 DC3HB 599 14 0815 DL4RCK 599 14 0815 # 0000000001111111111222222222233333333334444444444555555555566666666667777777777 # 1234567890123456789012345678901234567890123456789012345678901234567890123456789 }, }, years => { 2010 => { sample => '5a6770f61d2662201caad4231ec66bb1', filter => { qso_date => { -between => [20100612, 20100613] }, }, }, }, }