@@ -204,3 +204,86 @@ def extract_exchange(exchange: str) -> ExchangeData | None:
204204 @staticmethod
205205 def prepare_exchange (exchange : ExchangeData ):
206206 return f'{ exchange .darc_dok } '
207+
208+
209+ class DARCXMASContest (ContestLogCBR ):
210+ contest_name = 'DARC Weihnachtscontest'
211+ contest_year = '2025'
212+ contest_update = '2025-08-29'
213+ contest_exch_fmt = 'DOK'
214+
215+ def __init__ (self , callsign : str , name : str , club : str , address : Address , email : str , locator : str ,
216+ band : type [CategoryBand ], mode : type [CategoryMode ],
217+ pwr : type [CategoryPower ] = CategoryPower .HIGH ,
218+ cat_operator : type [CategoryOperator ] = CategoryOperator .SINGLE_OP ,
219+ assisted : type [CategoryAssisted ] = CategoryAssisted .NON_ASSISTED ,
220+ tx : type [CategoryTransmitter ] = CategoryTransmitter .ONE ,
221+ operators : list [str ] = None , specific : str = '' , skip_id : bool = False ,
222+ skip_warn : bool = False , logger = None , cty = None ):
223+ super ().__init__ (callsign , name , club , address , email , locator ,
224+ band , mode , pwr , cat_operator ,
225+ assisted , tx , operators , specific , skip_id , skip_warn , logger , cty )
226+
227+ self .__band_multis__ : dict [str , set [str ]] = {'80m' : set (), '40m' : set ()}
228+ self .__band_multis2__ : dict [str , set [str ]] = {'80m' : set (), '40m' : set ()}
229+
230+ @classmethod
231+ def valid_modes (cls ) -> tuple [CategoryMode , ...]:
232+ return CategoryMode .MIXED , CategoryMode .SSB , CategoryMode .CW
233+
234+ @classmethod
235+ def valid_bands (cls ) -> tuple [CategoryBand , ...]:
236+ return CategoryBand .B_ALL , CategoryBand .B_80M , CategoryBand .B_40M
237+
238+ @classmethod
239+ def descr_specific (cls ) -> str :
240+ return 'DOK'
241+
242+ def process_points (self , rec : CBRRecord ):
243+ # noinspection PyBroadException
244+ try :
245+ qso_point = 1
246+
247+ self .__rated__ += 1
248+ band = BAND_FROM_CBR [rec .band ]
249+
250+ if rec .rcvd_exch .upper () != 'NM' :
251+ self .__multis__ .add (rec .rcvd_exch .upper ())
252+ self .__band_multis__ [band ].add (rec .rcvd_exch .upper ())
253+ else :
254+ self .info (f'DOK not counted as multi "{ rec .rcvd_exch .upper ()} "' )
255+
256+ if self .cty :
257+ pfx = self .cty .prefix (rec .call )
258+ if pfx :
259+ self .__multis2__ .add (pfx )
260+ self .__band_multis2__ [band ].add (pfx )
261+ else :
262+ self .log .warning ('Could not process prefix due to missing cty data' )
263+
264+ self .__points__ += qso_point
265+
266+ self .__stats__ [band ].qsos += 1
267+ self .__stats__ [band ].rated += 1
268+ self .__stats__ [band ].points += qso_point
269+ self .__stats__ [band ].multis = len (self .__band_multis__ [band ])
270+ self .__stats__ [band ].multis2 = len (self .__band_multis2__ [band ])
271+
272+ self .__header__ ['CLAIMED-SCORE' ] = str (self .claimed_points )
273+ except Exception :
274+ self .exception ()
275+
276+
277+ class DARCCWAContest (DARCXMASContest ):
278+ contest_name = 'DARC CW Ausbildungscontest'
279+ contest_year = '2025'
280+ contest_update = '2025-08-29'
281+ contest_exch_fmt = 'DOK'
282+
283+ @classmethod
284+ def valid_modes (cls ) -> tuple [CategoryMode , ...]:
285+ return CategoryMode .CW ,
286+
287+ @classmethod
288+ def valid_bands (cls ) -> tuple [CategoryBand , ...]:
289+ return CategoryBand .B_80M ,
0 commit comments