not1mm 24.11.2__py3-none-any.whl → 24.11.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- not1mm/__main__.py +4 -1
- not1mm/data/new_contest.ui +5 -0
- not1mm/lib/version.py +1 -1
- not1mm/plugins/raem.py +592 -0
- {not1mm-24.11.2.dist-info → not1mm-24.11.3.dist-info}/METADATA +16 -3
- {not1mm-24.11.2.dist-info → not1mm-24.11.3.dist-info}/RECORD +10 -9
- {not1mm-24.11.2.dist-info → not1mm-24.11.3.dist-info}/LICENSE +0 -0
- {not1mm-24.11.2.dist-info → not1mm-24.11.3.dist-info}/WHEEL +0 -0
- {not1mm-24.11.2.dist-info → not1mm-24.11.3.dist-info}/entry_points.txt +0 -0
- {not1mm-24.11.2.dist-info → not1mm-24.11.3.dist-info}/top_level.txt +0 -0
not1mm/__main__.py
CHANGED
@@ -2294,7 +2294,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2294
2294
|
score = self.contest.calc_score(self)
|
2295
2295
|
self.score.setText(str(score))
|
2296
2296
|
self.contest.reset_label(self)
|
2297
|
-
if
|
2297
|
+
if (
|
2298
|
+
self.contest.name != "ICWC Medium Speed Test"
|
2299
|
+
and self.contest.name != "RAEM"
|
2300
|
+
):
|
2298
2301
|
if self.current_mode in ("CW", "RTTY"):
|
2299
2302
|
self.sent.setText("599")
|
2300
2303
|
self.receive.setText("599")
|
not1mm/data/new_contest.ui
CHANGED
not1mm/lib/version.py
CHANGED
not1mm/plugins/raem.py
ADDED
@@ -0,0 +1,592 @@
|
|
1
|
+
"""Ernst Krenkel Memorial"""
|
2
|
+
|
3
|
+
# pylint: disable=invalid-name, c-extension-no-member, unused-import
|
4
|
+
|
5
|
+
|
6
|
+
# RAEM Contest
|
7
|
+
# Status: Active
|
8
|
+
# Geographic Focus: Worldwide
|
9
|
+
# Participation: Worldwide
|
10
|
+
# Mode: CW
|
11
|
+
# Bands: 80, 40, 20, 15, 10m
|
12
|
+
# Classes: Single Op All Band (Low/High)
|
13
|
+
# Single Op Single Band
|
14
|
+
# Multi-Single
|
15
|
+
# Max power: HP: >100 watts
|
16
|
+
# LP: 100 watts
|
17
|
+
# Exchange: Serial No. + latitude (degs only) + hemisphere + longitude (degs only) + hemisphere (see rules)
|
18
|
+
# N=North, S=South, W=West, O=East (e.g. 57N 85O)
|
19
|
+
# Work stations: Once per band
|
20
|
+
# QSO Points: 50 points + 1 point for every degree difference in geo location, both latitude and longitude
|
21
|
+
# QSO with Polar station: 100 points additional
|
22
|
+
# QSO with RAEM Memorial Station: 300 points additional
|
23
|
+
# Multipliers: Polar stations multiply total QSO points by 1.1
|
24
|
+
# Score Calculation: Total score = total QSO points
|
25
|
+
# E-mail logs to: raem[at]srr[dot]ru
|
26
|
+
# Upload log at: http://ua9qcq.com/
|
27
|
+
# Mail logs to: (none)
|
28
|
+
# Find rules at: https://raem.srr.ru/rules/
|
29
|
+
# Cabrillo name: RAEM
|
30
|
+
|
31
|
+
import datetime
|
32
|
+
import logging
|
33
|
+
|
34
|
+
from pathlib import Path
|
35
|
+
|
36
|
+
from PyQt6 import QtWidgets
|
37
|
+
|
38
|
+
from not1mm.lib.plugin_common import gen_adif, get_points
|
39
|
+
from not1mm.lib.version import __version__
|
40
|
+
|
41
|
+
logger = logging.getLogger(__name__)
|
42
|
+
|
43
|
+
EXCHANGE_HINT = "33N117W"
|
44
|
+
|
45
|
+
name = "RAEM"
|
46
|
+
cabrillo_name = "RAEM"
|
47
|
+
mode = "CW" # CW SSB BOTH RTTY
|
48
|
+
|
49
|
+
columns = [
|
50
|
+
"YYYY-MM-DD HH:MM:SS",
|
51
|
+
"Call",
|
52
|
+
"Freq",
|
53
|
+
"SentNr",
|
54
|
+
"RcvNr",
|
55
|
+
"Exchange1",
|
56
|
+
"PTS",
|
57
|
+
]
|
58
|
+
|
59
|
+
advance_on_space = [True, True, True, True, True]
|
60
|
+
|
61
|
+
# 1 once per contest, 2 work each band, 3 each band/mode, 4 no dupe checking
|
62
|
+
dupe_type = 2
|
63
|
+
|
64
|
+
|
65
|
+
def init_contest(self):
|
66
|
+
"""setup plugin"""
|
67
|
+
set_tab_next(self)
|
68
|
+
set_tab_prev(self)
|
69
|
+
interface(self)
|
70
|
+
self.next_field = self.other_1
|
71
|
+
|
72
|
+
|
73
|
+
def interface(self):
|
74
|
+
"""Setup user interface"""
|
75
|
+
self.field1.show()
|
76
|
+
self.field2.hide()
|
77
|
+
self.field3.show()
|
78
|
+
self.field4.show()
|
79
|
+
self.snt_label.setText("Sent S/N")
|
80
|
+
self.field1.setAccessibleName("Sent Serial Number")
|
81
|
+
self.other_label.setText("Rcv S/N")
|
82
|
+
self.field3.setAccessibleName("Serial Number")
|
83
|
+
self.exch_label.setText("Exchange")
|
84
|
+
self.field4.setAccessibleName("Exchange")
|
85
|
+
self.sent.setText("")
|
86
|
+
|
87
|
+
|
88
|
+
def reset_label(self): # pylint: disable=unused-argument
|
89
|
+
"""reset label after field cleared"""
|
90
|
+
|
91
|
+
|
92
|
+
def set_tab_next(self):
|
93
|
+
"""Set TAB Advances"""
|
94
|
+
self.tab_next = {
|
95
|
+
self.callsign: self.field1.findChild(QtWidgets.QLineEdit),
|
96
|
+
self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild(
|
97
|
+
QtWidgets.QLineEdit
|
98
|
+
),
|
99
|
+
# self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild(
|
100
|
+
# QtWidgets.QLineEdit
|
101
|
+
# ),
|
102
|
+
self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
|
103
|
+
QtWidgets.QLineEdit
|
104
|
+
),
|
105
|
+
self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
|
106
|
+
}
|
107
|
+
|
108
|
+
|
109
|
+
def set_tab_prev(self):
|
110
|
+
"""Set TAB Advances"""
|
111
|
+
self.tab_prev = {
|
112
|
+
self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
|
113
|
+
self.field1.findChild(QtWidgets.QLineEdit): self.callsign,
|
114
|
+
# self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild(
|
115
|
+
# QtWidgets.QLineEdit
|
116
|
+
# ),
|
117
|
+
self.field3.findChild(QtWidgets.QLineEdit): self.field1.findChild(
|
118
|
+
QtWidgets.QLineEdit
|
119
|
+
),
|
120
|
+
self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
|
121
|
+
QtWidgets.QLineEdit
|
122
|
+
),
|
123
|
+
}
|
124
|
+
|
125
|
+
|
126
|
+
def set_contact_vars(self):
|
127
|
+
"""Contest Specific"""
|
128
|
+
self.contact["SNT"] = "599"
|
129
|
+
self.contact["RCV"] = "599"
|
130
|
+
self.contact["SentNr"] = self.sent.text()
|
131
|
+
self.contact["NR"] = self.other_1.text()
|
132
|
+
self.contact["Exchange1"] = self.other_2.text()
|
133
|
+
|
134
|
+
|
135
|
+
def predupe(self): # pylint: disable=unused-argument
|
136
|
+
"""called after callsign entered"""
|
137
|
+
|
138
|
+
|
139
|
+
def prefill(self):
|
140
|
+
"""Fill SentNR"""
|
141
|
+
field = self.sent
|
142
|
+
result = self.database.get_serial()
|
143
|
+
serial_nr = str(result.get("serial_nr", "1")).zfill(3)
|
144
|
+
if serial_nr == "None":
|
145
|
+
serial_nr = "001"
|
146
|
+
if len(field.text()) == 0:
|
147
|
+
field.setText(serial_nr)
|
148
|
+
|
149
|
+
|
150
|
+
def latlondif(self, exchange1: str):
|
151
|
+
""""""
|
152
|
+
ourexchange = self.contest_settings.get("SentExchange", None)
|
153
|
+
if ourexchange is None:
|
154
|
+
return 0, False
|
155
|
+
ourexchange = ourexchange.upper()
|
156
|
+
if len(exchange1) < 4:
|
157
|
+
return 0, False
|
158
|
+
exchange1 = exchange1.upper()
|
159
|
+
|
160
|
+
latindex = None
|
161
|
+
ourlat = None
|
162
|
+
ourlon = None
|
163
|
+
if "N" in ourexchange:
|
164
|
+
latindex = ourexchange.index("N")
|
165
|
+
lat = ourexchange[:latindex]
|
166
|
+
if lat.isnumeric():
|
167
|
+
ourlat = int(lat)
|
168
|
+
if "S" in ourexchange:
|
169
|
+
latindex = ourexchange.index("S")
|
170
|
+
lat = ourexchange[:latindex]
|
171
|
+
if lat.isnumeric():
|
172
|
+
ourlat = int(lat)
|
173
|
+
if "W" in ourexchange:
|
174
|
+
lon = ourexchange[latindex + 1 : ourexchange.index("W")]
|
175
|
+
if lon.isnumeric():
|
176
|
+
ourlon = int(lon)
|
177
|
+
if "O" in ourexchange:
|
178
|
+
lon = ourexchange[latindex + 1 : ourexchange.index("O")]
|
179
|
+
if lon.isnumeric():
|
180
|
+
ourlon = int(lon)
|
181
|
+
if ourlat is None or ourlon is None:
|
182
|
+
return 0, False
|
183
|
+
|
184
|
+
hislat = None
|
185
|
+
hislon = None
|
186
|
+
if "N" in exchange1:
|
187
|
+
latindex = exchange1.index("N")
|
188
|
+
lat = exchange1[:latindex]
|
189
|
+
if lat.isnumeric():
|
190
|
+
hislat = int(lat)
|
191
|
+
if "S" in exchange1:
|
192
|
+
latindex = exchange1.index("S")
|
193
|
+
lat = exchange1[:latindex]
|
194
|
+
if lat.isnumeric():
|
195
|
+
hislat = int(lat)
|
196
|
+
if "W" in exchange1:
|
197
|
+
lon = exchange1[latindex + 1 : exchange1.index("W")]
|
198
|
+
if lon.isnumeric():
|
199
|
+
hislon = int(lon)
|
200
|
+
if "O" in exchange1:
|
201
|
+
lon = exchange1[latindex + 1 : exchange1.index("O")]
|
202
|
+
if lon.isnumeric():
|
203
|
+
hislon = int(lon)
|
204
|
+
if hislat is None or hislon is None:
|
205
|
+
return 0, False
|
206
|
+
|
207
|
+
return abs(ourlat - hislat) + abs(ourlon - hislon), hislat >= 66
|
208
|
+
|
209
|
+
|
210
|
+
def points(self):
|
211
|
+
"""Calc point"""
|
212
|
+
# 50 points + 1 point for every degree difference in geo location, both latitude and longitude
|
213
|
+
# QSO with Polar station: 100 points additional
|
214
|
+
# QSO with RAEM Memorial Station: 300 points additional
|
215
|
+
|
216
|
+
points = 50
|
217
|
+
morepoints, ispolar = latlondif(self, self.other_2.text())
|
218
|
+
points += morepoints
|
219
|
+
if ispolar is not False:
|
220
|
+
points += 100
|
221
|
+
if self.callsign.text() == "RAEM":
|
222
|
+
points += 300
|
223
|
+
|
224
|
+
return points
|
225
|
+
|
226
|
+
|
227
|
+
def show_mults(self):
|
228
|
+
"""Return display string for mults"""
|
229
|
+
ourexchange = self.contest_settings.get("SentExchange", None)
|
230
|
+
if ourexchange is None:
|
231
|
+
return 0, False
|
232
|
+
ourexchange = ourexchange.upper()
|
233
|
+
|
234
|
+
latindex = None
|
235
|
+
ourlat = None
|
236
|
+
if "N" in ourexchange:
|
237
|
+
latindex = ourexchange.index("N")
|
238
|
+
lat = ourexchange[:latindex]
|
239
|
+
if lat.isnumeric():
|
240
|
+
ourlat = int(lat)
|
241
|
+
if "S" in ourexchange:
|
242
|
+
latindex = ourexchange.index("S")
|
243
|
+
lat = ourexchange[:latindex]
|
244
|
+
if lat.isnumeric():
|
245
|
+
ourlat = int(lat)
|
246
|
+
|
247
|
+
if ourlat is not None:
|
248
|
+
if ourlat >= 66:
|
249
|
+
return 1.1
|
250
|
+
|
251
|
+
return 1
|
252
|
+
|
253
|
+
|
254
|
+
def show_qso(self):
|
255
|
+
"""Return qso count"""
|
256
|
+
result = self.database.fetch_qso_count()
|
257
|
+
if result:
|
258
|
+
return int(result.get("qsos", 0))
|
259
|
+
return 0
|
260
|
+
|
261
|
+
|
262
|
+
def calc_score(self):
|
263
|
+
"""Return calculated score"""
|
264
|
+
result = self.database.fetch_points()
|
265
|
+
if result is not None:
|
266
|
+
score = result.get("Points", "0")
|
267
|
+
if score is None:
|
268
|
+
score = "0"
|
269
|
+
contest_points = int(score)
|
270
|
+
mults = show_mults(self)
|
271
|
+
return contest_points * mults
|
272
|
+
return 0
|
273
|
+
|
274
|
+
|
275
|
+
def adif(self):
|
276
|
+
"""Call the generate ADIF function"""
|
277
|
+
gen_adif(self, cabrillo_name, "RAEM")
|
278
|
+
|
279
|
+
|
280
|
+
def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
|
281
|
+
""""""
|
282
|
+
print(
|
283
|
+
line_to_output.encode(file_encoding, errors="ignore").decode(),
|
284
|
+
end=ending,
|
285
|
+
file=file_descriptor,
|
286
|
+
)
|
287
|
+
|
288
|
+
|
289
|
+
def cabrillo(self, file_encoding):
|
290
|
+
"""Generates Cabrillo file. Maybe."""
|
291
|
+
logger.debug("******Cabrillo*****")
|
292
|
+
logger.debug("Station: %s", f"{self.station}")
|
293
|
+
logger.debug("Contest: %s", f"{self.contest_settings}")
|
294
|
+
now = datetime.datetime.now()
|
295
|
+
date_time = now.strftime("%Y-%m-%d_%H-%M-%S")
|
296
|
+
filename = (
|
297
|
+
str(Path.home())
|
298
|
+
+ "/"
|
299
|
+
+ f"{self.station.get('Call', '').upper()}_{cabrillo_name}_{date_time}.log"
|
300
|
+
)
|
301
|
+
logger.debug("%s", filename)
|
302
|
+
log = self.database.fetch_all_contacts_asc()
|
303
|
+
try:
|
304
|
+
with open(filename, "w", encoding=file_encoding) as file_descriptor:
|
305
|
+
output_cabrillo_line(
|
306
|
+
"START-OF-LOG: 3.0",
|
307
|
+
"\r\n",
|
308
|
+
file_descriptor,
|
309
|
+
file_encoding,
|
310
|
+
)
|
311
|
+
output_cabrillo_line(
|
312
|
+
f"CREATED-BY: Not1MM v{__version__}",
|
313
|
+
"\r\n",
|
314
|
+
file_descriptor,
|
315
|
+
file_encoding,
|
316
|
+
)
|
317
|
+
output_cabrillo_line(
|
318
|
+
f"CONTEST: {cabrillo_name}",
|
319
|
+
"\r\n",
|
320
|
+
file_descriptor,
|
321
|
+
file_encoding,
|
322
|
+
)
|
323
|
+
if self.station.get("Club", ""):
|
324
|
+
output_cabrillo_line(
|
325
|
+
f"CLUB: {self.station.get('Club', '').upper()}",
|
326
|
+
"\r\n",
|
327
|
+
file_descriptor,
|
328
|
+
file_encoding,
|
329
|
+
)
|
330
|
+
output_cabrillo_line(
|
331
|
+
f"CALLSIGN: {self.station.get('Call','')}",
|
332
|
+
"\r\n",
|
333
|
+
file_descriptor,
|
334
|
+
file_encoding,
|
335
|
+
)
|
336
|
+
output_cabrillo_line(
|
337
|
+
f"LOCATION: {self.station.get('ARRLSection', '')}",
|
338
|
+
"\r\n",
|
339
|
+
file_descriptor,
|
340
|
+
file_encoding,
|
341
|
+
)
|
342
|
+
output_cabrillo_line(
|
343
|
+
f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
|
344
|
+
"\r\n",
|
345
|
+
file_descriptor,
|
346
|
+
file_encoding,
|
347
|
+
)
|
348
|
+
output_cabrillo_line(
|
349
|
+
f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
|
350
|
+
"\r\n",
|
351
|
+
file_descriptor,
|
352
|
+
file_encoding,
|
353
|
+
)
|
354
|
+
output_cabrillo_line(
|
355
|
+
f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
|
356
|
+
"\r\n",
|
357
|
+
file_descriptor,
|
358
|
+
file_encoding,
|
359
|
+
)
|
360
|
+
output_cabrillo_line(
|
361
|
+
f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
|
362
|
+
"\r\n",
|
363
|
+
file_descriptor,
|
364
|
+
file_encoding,
|
365
|
+
)
|
366
|
+
output_cabrillo_line(
|
367
|
+
f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
|
368
|
+
"\r\n",
|
369
|
+
file_descriptor,
|
370
|
+
file_encoding,
|
371
|
+
)
|
372
|
+
if self.contest_settings.get("OverlayCategory", "") != "N/A":
|
373
|
+
output_cabrillo_line(
|
374
|
+
f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
|
375
|
+
"\r\n",
|
376
|
+
file_descriptor,
|
377
|
+
file_encoding,
|
378
|
+
)
|
379
|
+
output_cabrillo_line(
|
380
|
+
f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
|
381
|
+
"\r\n",
|
382
|
+
file_descriptor,
|
383
|
+
file_encoding,
|
384
|
+
)
|
385
|
+
output_cabrillo_line(
|
386
|
+
f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
|
387
|
+
"\r\n",
|
388
|
+
file_descriptor,
|
389
|
+
file_encoding,
|
390
|
+
)
|
391
|
+
|
392
|
+
output_cabrillo_line(
|
393
|
+
f"CLAIMED-SCORE: {calc_score(self)}",
|
394
|
+
"\r\n",
|
395
|
+
file_descriptor,
|
396
|
+
file_encoding,
|
397
|
+
)
|
398
|
+
ops = f"@{self.station.get('Call','')}"
|
399
|
+
list_of_ops = self.database.get_ops()
|
400
|
+
for op in list_of_ops:
|
401
|
+
ops += f", {op.get('Operator', '')}"
|
402
|
+
output_cabrillo_line(
|
403
|
+
f"OPERATORS: {ops}",
|
404
|
+
"\r\n",
|
405
|
+
file_descriptor,
|
406
|
+
file_encoding,
|
407
|
+
)
|
408
|
+
output_cabrillo_line(
|
409
|
+
f"NAME: {self.station.get('Name', '')}",
|
410
|
+
"\r\n",
|
411
|
+
file_descriptor,
|
412
|
+
file_encoding,
|
413
|
+
)
|
414
|
+
output_cabrillo_line(
|
415
|
+
f"ADDRESS: {self.station.get('Street1', '')}",
|
416
|
+
"\r\n",
|
417
|
+
file_descriptor,
|
418
|
+
file_encoding,
|
419
|
+
)
|
420
|
+
output_cabrillo_line(
|
421
|
+
f"ADDRESS-CITY: {self.station.get('City', '')}",
|
422
|
+
"\r\n",
|
423
|
+
file_descriptor,
|
424
|
+
file_encoding,
|
425
|
+
)
|
426
|
+
output_cabrillo_line(
|
427
|
+
f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
|
428
|
+
"\r\n",
|
429
|
+
file_descriptor,
|
430
|
+
file_encoding,
|
431
|
+
)
|
432
|
+
output_cabrillo_line(
|
433
|
+
f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
|
434
|
+
"\r\n",
|
435
|
+
file_descriptor,
|
436
|
+
file_encoding,
|
437
|
+
)
|
438
|
+
output_cabrillo_line(
|
439
|
+
f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
|
440
|
+
"\r\n",
|
441
|
+
file_descriptor,
|
442
|
+
file_encoding,
|
443
|
+
)
|
444
|
+
output_cabrillo_line(
|
445
|
+
f"EMAIL: {self.station.get('Email', '')}",
|
446
|
+
"\r\n",
|
447
|
+
file_descriptor,
|
448
|
+
file_encoding,
|
449
|
+
)
|
450
|
+
for contact in log:
|
451
|
+
the_date_and_time = contact.get("TS", "")
|
452
|
+
themode = contact.get("Mode", "")
|
453
|
+
if themode == "LSB" or themode == "USB":
|
454
|
+
themode = "PH"
|
455
|
+
frequency = str(int(contact.get("Freq", "0"))).rjust(5)
|
456
|
+
|
457
|
+
loggeddate = the_date_and_time[:10]
|
458
|
+
loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
|
459
|
+
output_cabrillo_line(
|
460
|
+
f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
|
461
|
+
f"{contact.get('StationPrefix', '').ljust(13)} "
|
462
|
+
f"{str(contact.get('SentNr', '')).ljust(6)} "
|
463
|
+
f"{self.contest_settings.get('SentExchange', '').ljust(14).upper()}"
|
464
|
+
f"{contact.get('Call', '').ljust(13)} "
|
465
|
+
f"{str(contact.get('NR', '')).ljust(6)}"
|
466
|
+
f"{str(contact.get('Exchange1', '')).ljust(14)} ",
|
467
|
+
"\r\n",
|
468
|
+
file_descriptor,
|
469
|
+
file_encoding,
|
470
|
+
)
|
471
|
+
output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
|
472
|
+
self.show_message_box(f"Cabrillo saved to: {filename}")
|
473
|
+
except IOError as exception:
|
474
|
+
logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
|
475
|
+
self.show_message_box(f"Error saving Cabrillo: {exception} {filename}")
|
476
|
+
return
|
477
|
+
|
478
|
+
|
479
|
+
def recalculate_mults(self):
|
480
|
+
"""Recalculates multipliers after change in logged qso."""
|
481
|
+
# all_contacts = self.database.fetch_all_contacts_asc()
|
482
|
+
# for contact in all_contacts:
|
483
|
+
# time_stamp = contact.get("TS", "")
|
484
|
+
# wpx = contact.get("WPXPrefix", "")
|
485
|
+
# result = self.database.fetch_wpx_exists_before_me(wpx, time_stamp)
|
486
|
+
# wpx_count = result.get("wpx_count", 1)
|
487
|
+
# if wpx_count == 0:
|
488
|
+
# contact["IsMultiplier1"] = 1
|
489
|
+
# else:
|
490
|
+
# contact["IsMultiplier1"] = 0
|
491
|
+
# self.database.change_contact(contact)
|
492
|
+
|
493
|
+
|
494
|
+
def check_call_history(self):
|
495
|
+
""""""
|
496
|
+
result = self.database.fetch_call_history(self.callsign.text())
|
497
|
+
print(f"{result=}")
|
498
|
+
if result:
|
499
|
+
self.history_info.setText(f"{result.get('UserText','')}")
|
500
|
+
if self.other_2.text() == "":
|
501
|
+
self.other_2.setText(f"{result.get('Exch1', '')}")
|
502
|
+
|
503
|
+
|
504
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
505
|
+
"""ESM State Machine"""
|
506
|
+
|
507
|
+
# self.pref["run_state"]
|
508
|
+
|
509
|
+
# -----===== Assigned F-Keys =====-----
|
510
|
+
# self.esm_dict["CQ"]
|
511
|
+
# self.esm_dict["EXCH"]
|
512
|
+
# self.esm_dict["QRZ"]
|
513
|
+
# self.esm_dict["AGN"]
|
514
|
+
# self.esm_dict["HISCALL"]
|
515
|
+
# self.esm_dict["MYCALL"]
|
516
|
+
# self.esm_dict["QSOB4"]
|
517
|
+
|
518
|
+
# ----==== text fields ====----
|
519
|
+
# self.callsign
|
520
|
+
# self.sent
|
521
|
+
# self.receive
|
522
|
+
# self.other_1
|
523
|
+
# self.other_2
|
524
|
+
|
525
|
+
if new_focused_widget is not None:
|
526
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
527
|
+
|
528
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
529
|
+
|
530
|
+
for a_button in [
|
531
|
+
self.esm_dict["CQ"],
|
532
|
+
self.esm_dict["EXCH"],
|
533
|
+
self.esm_dict["QRZ"],
|
534
|
+
self.esm_dict["AGN"],
|
535
|
+
self.esm_dict["HISCALL"],
|
536
|
+
self.esm_dict["MYCALL"],
|
537
|
+
self.esm_dict["QSOB4"],
|
538
|
+
]:
|
539
|
+
if a_button is not None:
|
540
|
+
self.restore_button_color(a_button)
|
541
|
+
|
542
|
+
buttons_to_send = []
|
543
|
+
|
544
|
+
if self.pref.get("run_state"):
|
545
|
+
if self.current_widget == "callsign":
|
546
|
+
if len(self.callsign.text()) < 3:
|
547
|
+
self.make_button_green(self.esm_dict["CQ"])
|
548
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
549
|
+
elif len(self.callsign.text()) > 2:
|
550
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
551
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
552
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
553
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
554
|
+
|
555
|
+
elif self.current_widget == "other_1" or self.current_widget == "other_2":
|
556
|
+
if self.other_2.text() == "" or self.other_1.text() == "":
|
557
|
+
self.make_button_green(self.esm_dict["AGN"])
|
558
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
559
|
+
else:
|
560
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
561
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
562
|
+
buttons_to_send.append("LOGIT")
|
563
|
+
|
564
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
565
|
+
for button in buttons_to_send:
|
566
|
+
if button:
|
567
|
+
if button == "LOGIT":
|
568
|
+
self.save_contact()
|
569
|
+
continue
|
570
|
+
self.process_function_key(button)
|
571
|
+
else:
|
572
|
+
if self.current_widget == "callsign":
|
573
|
+
if len(self.callsign.text()) > 2:
|
574
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
575
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
576
|
+
|
577
|
+
elif self.current_widget == "other_1" or self.current_widget == "other_2":
|
578
|
+
if self.other_2.text() == "" or self.other_1.text() == "":
|
579
|
+
self.make_button_green(self.esm_dict["AGN"])
|
580
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
581
|
+
else:
|
582
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
583
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
584
|
+
buttons_to_send.append("LOGIT")
|
585
|
+
|
586
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
587
|
+
for button in buttons_to_send:
|
588
|
+
if button:
|
589
|
+
if button == "LOGIT":
|
590
|
+
self.save_contact()
|
591
|
+
continue
|
592
|
+
self.process_function_key(button)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: not1mm
|
3
|
-
Version: 24.11.
|
3
|
+
Version: 24.11.3
|
4
4
|
Summary: NOT1MM Logger
|
5
5
|
Author-email: Michael Bridak <michael.bridak@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/mbridak/not1mm
|
@@ -118,7 +118,7 @@ Requires-Dist: Levenshtein
|
|
118
118
|
- [Cabrillo](#cabrillo)
|
119
119
|
- [ADIF](#adif)
|
120
120
|
- [Recalulate Mults](#recalulate-mults)
|
121
|
-
- [
|
121
|
+
- [ESM](#esm)
|
122
122
|
- [Run States](#run-states)
|
123
123
|
- [CQ](#cq)
|
124
124
|
- [Call Entered send His Call and the Exchange](#call-entered-send-his-call-and-the-exchange)
|
@@ -128,10 +128,12 @@ Requires-Dist: Levenshtein
|
|
128
128
|
- [With his call entered, Send your call](#with-his-call-entered-send-your-call)
|
129
129
|
- [If no exchange entered send AGN](#if-no-exchange-entered-send-agn)
|
130
130
|
- [With exchange entered, send your exchange and log it](#with-exchange-entered-send-your-exchange-and-log-it)
|
131
|
+
- [Call History Files](#call-history-files)
|
131
132
|
- [Contest specific notes](#contest-specific-notes)
|
132
133
|
- [ARRL Sweekstakes](#arrl-sweekstakes)
|
133
134
|
- [The exchange parser](#the-exchange-parser)
|
134
135
|
- [The exchange](#the-exchange)
|
136
|
+
- [RAEM](#raem)
|
135
137
|
|
136
138
|
## What and why is Not1MM
|
137
139
|
|
@@ -224,6 +226,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
|
|
224
226
|
- **K1USN Slow Speed Test**
|
225
227
|
- **NAQP CW, RTTY, SSB**
|
226
228
|
- Phone Weekly Test
|
229
|
+
- **RAEM**
|
227
230
|
- **RAC Canada Day**
|
228
231
|
- **REF CW, SSB**
|
229
232
|
- Stew Perry Topband
|
@@ -232,6 +235,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
|
|
232
235
|
|
233
236
|
## Recent Changes (Polishing the Turd)
|
234
237
|
|
238
|
+
- [24-11-3] Added RAEM contest
|
235
239
|
- [24-11-2] Add beginning of call history files. Add command buttons.
|
236
240
|
|
237
241
|
See [CHANGELOG.md](CHANGELOG.md) for prior changes.
|
@@ -836,7 +840,7 @@ After editing a contact and before generating a Cabrillo file. There is a Misc
|
|
836
840
|
menu option that will recalculate the multipliers incase an edit had caused a
|
837
841
|
change.
|
838
842
|
|
839
|
-
##
|
843
|
+
## ESM
|
840
844
|
|
841
845
|
I caved and started working on ESM or Enter Sends Message. To test it out you can
|
842
846
|
go to `FILE -> Configuration Settings`
|
@@ -883,6 +887,10 @@ QRZ (for Run) or Exchange (for S&P) is sent.
|
|
883
887
|
|
884
888
|

|
885
889
|
|
890
|
+
## Call History Files
|
891
|
+
|
892
|
+
I've started work on using 'call history files'.
|
893
|
+
|
886
894
|
## Contest specific notes
|
887
895
|
|
888
896
|
I found it might be beneficial to have a section devoted to wierd quirky things
|
@@ -925,3 +933,8 @@ In the `Sent Exchange` field of the New Contest dialog put in the Precidence,
|
|
925
933
|
Call, Check and Section. Example: `A K6GTE 17 ORG`.
|
926
934
|
|
927
935
|
For the Run Exchange macro I'd put `{HISCALL} {SENTNR} {EXCH}`.
|
936
|
+
|
937
|
+
### RAEM
|
938
|
+
|
939
|
+
In the New/Edit Contest dialog, in the exchange field put just your Lat and Lon.
|
940
|
+
for me 33N117W. And in the exchange macro put `# {EXCH}`.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
not1mm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
not1mm/__main__.py,sha256=
|
2
|
+
not1mm/__main__.py,sha256=KQZ2wm5gDOSDcsae7H-Z5ZamZ5XnifNxcf4ohcsUXlM,140994
|
3
3
|
not1mm/bandmap.py,sha256=X6mMHXS1kXBbUPZCaKgiVJ6Dz6DE6LEQqtEXfT3telg,30811
|
4
4
|
not1mm/checkwindow.py,sha256=F6hNCbVSLG2PPY2afgmwlBWeqr1Uj4-n__AivDLVQ_0,9670
|
5
5
|
not1mm/fsutils.py,sha256=ukHKxKTeNKxKwqRaJjtzRShL4X5Xl0jRBbADyy3Ifp8,1701
|
@@ -31,7 +31,7 @@ not1mm/data/k6gte.not1mm-64.png,sha256=6ku45Gq1g5ezh04F07osoKRtanb3e4kbx5XdIEh3N
|
|
31
31
|
not1mm/data/logwindow.ui,sha256=f7vULj96tHIQuR1nJMyvPHHcmVgzkhv9D1isyojsnFU,1458
|
32
32
|
not1mm/data/logwindowx.ui,sha256=CwpI-h7cI1yqyldH9quKftsdHL5lTyL9ABOcf80nfqc,1632
|
33
33
|
not1mm/data/main.ui,sha256=pI-70TYESe85ENkRH8l1DXnKDOkwYqKXUdMk6KYaN50,63193
|
34
|
-
not1mm/data/new_contest.ui,sha256=
|
34
|
+
not1mm/data/new_contest.ui,sha256=NyeO5TCeKFWghHMC2D5OL96XPmzXF0dlFWCue-3goE8,23530
|
35
35
|
not1mm/data/not1mm.html,sha256=c9-mfjMwDt4f5pySUruz2gREW33CQ2_rCddM2z5CZQo,23273
|
36
36
|
not1mm/data/opon.ui,sha256=QDicqAk2lORG2UWsHa6jHlsGn6uzrrI2R4HSAocpPes,2258
|
37
37
|
not1mm/data/pickcontest.ui,sha256=4hPBszCglObThx_eIWtmK9CEcbr7WBjbB1rKZdI-o3I,1707
|
@@ -115,7 +115,7 @@ not1mm/lib/plugin_common.py,sha256=TbFUbftjELFt4QRdsjSHbqnXSngZOlSwlCTClqosDXA,9
|
|
115
115
|
not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
|
116
116
|
not1mm/lib/settings.py,sha256=Xt0WE2ro_kUYdugQ0Pe1SQX07MHrJ0jyQqDqAKKqxuU,13564
|
117
117
|
not1mm/lib/super_check_partial.py,sha256=hwT2NRwobu0PLDyw6ltmbmcAtGBD02CKGFbgGWjXMqA,2334
|
118
|
-
not1mm/lib/version.py,sha256=
|
118
|
+
not1mm/lib/version.py,sha256=tWIKoEtc5hmkEZ0W-tPnsLBfyaSsLJThV1LOfDbfgmw,48
|
119
119
|
not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
|
120
120
|
not1mm/plugins/10_10_fall_cw.py,sha256=QQjEgWQRT35qG1bi87QhoUIOzGbN8C27WIUhhoFNsAI,11866
|
121
121
|
not1mm/plugins/10_10_spring_cw.py,sha256=nGznP9VLooaDnHi0JXttosqAtSRH32oXwWmMrXf95A0,11871
|
@@ -155,14 +155,15 @@ not1mm/plugins/naqp_cw.py,sha256=tlS7l8bF1zoNjJ-FJacOEht47HcFjv0zIHBNkfNIfTQ,183
|
|
155
155
|
not1mm/plugins/naqp_rtty.py,sha256=JbluW-QNOyG47jlMBFmbV4UY5ABOFhd_YxYLtKPNP_4,22142
|
156
156
|
not1mm/plugins/naqp_ssb.py,sha256=Xkp_nfJziKJJTY0E2GO3szVWp21MogFp-q1rb-oWuTo,17278
|
157
157
|
not1mm/plugins/phone_weekly_test.py,sha256=4YuG-TfjX4FfDztuVlH0dB7TDMNB-pQ3KP07WL3AwKo,13238
|
158
|
+
not1mm/plugins/raem.py,sha256=yCpBRFmDZ3W4o3e2LUCgBHCGDSHtpsTCmlgWpdZPAw0,19474
|
158
159
|
not1mm/plugins/ref_cw.py,sha256=gEH1avPN5E5WG5VZcHKAZU2HxGn8RZ3tm1oR7TKmRgY,20910
|
159
160
|
not1mm/plugins/ref_ssb.py,sha256=UC8xwl4uRihTvlYsITCvfTCPVbNXpnO91T8qMDKaW8E,20916
|
160
161
|
not1mm/plugins/stew_perry_topband.py,sha256=UOK9M23eMkcEB83kL8NPHl6QDBJFCXKZpBRlhfuEH2c,11581
|
161
162
|
not1mm/plugins/weekly_rtty.py,sha256=WoMfQXJczvoHQB04i6TAvL6MF91uOOQ9ZmB9BpUkOfo,19098
|
162
163
|
not1mm/plugins/winter_field_day.py,sha256=wPxHKPPeyE2XlRT6Unnz09evFwd0ghWtXU5l-nMr3aI,14492
|
163
|
-
not1mm-24.11.
|
164
|
-
not1mm-24.11.
|
165
|
-
not1mm-24.11.
|
166
|
-
not1mm-24.11.
|
167
|
-
not1mm-24.11.
|
168
|
-
not1mm-24.11.
|
164
|
+
not1mm-24.11.3.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
165
|
+
not1mm-24.11.3.dist-info/METADATA,sha256=JLDmqbnC6kXf-dP6-U6rVDZxWvTWFnt3BblPITGcbrQ,33582
|
166
|
+
not1mm-24.11.3.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
167
|
+
not1mm-24.11.3.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
|
168
|
+
not1mm-24.11.3.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
|
169
|
+
not1mm-24.11.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|