Skip to content

Commit 7b714df

Browse files
authored
Marconi Club QSO Party Day rules (#420)
* add Marconi Club QSO Party Day * set bandindex in qso created for a spot * use initial exchanges for bandmap
1 parent 5125397 commit 7b714df

File tree

9 files changed

+1063
-0
lines changed

9 files changed

+1063
-0
lines changed

rules/mcd/mcd

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
##############################
2+
# Marconi Club QSO Party Day #
3+
##############################
4+
# http://www.ariloano.it/marconiclub/
5+
#
6+
# Provided by: Zoltan Csahok HA5CQZ
7+
#
8+
9+
LOGFILE=mcd.log
10+
CONTEST_MODE
11+
12+
CABRILLO=UNIVERSAL
13+
CABRILLO-CONTEST= MCD-QSO-PARTY
14+
CABRILLO-CATEGORY-BAND= ALL
15+
CABRILLO-CATEGORY-MODE= CW
16+
CABRILLO-CATEGORY-TRANSMITTER= ONE
17+
CABRILLO-CATEGORY-OPERATOR= ONE
18+
19+
CABRILLO-CATEGORY-ASSISTED= -
20+
CABRILLO-CATEGORY-POWER= -
21+
CABRILLO-CATEGORY-TIME= -
22+
CABRILLO-CATEGORY-STATION=-
23+
CABRILLO-CATEGORY-OVERLAY=-
24+
CABRILLO-LOCATION=-
25+
CABRILLO-OFFTIME=-
26+
CABRILLO-CLUB=-
27+
CABRILLO-OPERATORS=-
28+
29+
#================================
30+
# Select one of following blocks:
31+
#--------------------------------
32+
#
33+
# non-members send serial number
34+
#
35+
CABRILLO-EXCHANGE=#
36+
F3=@ ++5NN-- #
37+
S&P_TU_MSG=TU ++5NN-- #
38+
#--------------------------------
39+
#
40+
# Marconi Club members send membership number
41+
#
42+
##CABRILLO-EXCHANGE= MC123
43+
##F3=@ ++5NN-- MC123
44+
##S&P_TU_MSG=TU ++5NN-- MC123
45+
#================================
46+
47+
# Scoring:
48+
# (handled by mcd.py)
49+
50+
51+
# Multipliers:
52+
# The multiplier total is the sum of worked MC members on each band
53+
# (handled by mcd.py)
54+
55+
GENERIC_MULT=BAND
56+
57+
58+
RECALL_MULTS
59+
INITIAL_EXCHANGE=rules/mcd.txt
60+
61+
PLUGIN_CONFIG=rules/mcd.txt
62+

rules/mcd/mcd.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"""
2+
Marconi Club QSO Party Day
3+
http://www.ariloano.it/marconiclub/
4+
"""
5+
6+
import re
7+
8+
MEMBERS = {}
9+
10+
def init(cfg):
11+
# read initial exchange file
12+
global MEMBERS
13+
comment = re.compile("(^#|^$)") # starts with a hash or empty
14+
with open(cfg) as file:
15+
for line in file:
16+
line = line.strip()
17+
if comment.match(line):
18+
continue
19+
[call, exchange] = line.split(',')
20+
MEMBERS[call] = exchange
21+
22+
23+
def get_member_id(exchange):
24+
if exchange.startswith('MC'):
25+
return exchange
26+
27+
return ''
28+
29+
30+
# - 5 points for a QSO with a member of Marconi Club A.R.I. Loano
31+
# - 1 point for a QSO with a non-member
32+
def score(qso):
33+
34+
if get_member_id(qso.exchange):
35+
points = 5
36+
else:
37+
points = 1
38+
39+
return points
40+
41+
42+
def check_exchange(qso):
43+
mult = get_member_id(qso.exchange)
44+
if not mult and qso.call in MEMBERS:
45+
mult = MEMBERS[qso.call]
46+
47+
return {'mult1_value': mult}
48+

0 commit comments

Comments
 (0)