not1mm 23.12.19__py3-none-any.whl → 23.12.24__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.
@@ -0,0 +1,357 @@
1
+ """ARRL Sep VHF"""
2
+
3
+ # Cabrillo name: ARRL-VHF-SEP
4
+ # Cabrillo name aliases: ARRL-VHF
5
+
6
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
7
+
8
+ import datetime
9
+ import logging
10
+
11
+ from pathlib import Path
12
+ from PyQt5 import QtWidgets
13
+
14
+ from not1mm.lib.plugin_common import gen_adif, get_points
15
+ from not1mm.lib.version import __version__
16
+
17
+ logger = logging.getLogger("__main__")
18
+
19
+ name = "ARRL VHF SEP"
20
+ mode = "BOTH" # CW SSB BOTH RTTY
21
+ cabrillo_name = "ARRL-VHF-SEP"
22
+
23
+ columns = [
24
+ "YYYY-MM-DD HH:MM:SS",
25
+ "Call",
26
+ "Freq",
27
+ "SentNr",
28
+ "RcvNr",
29
+ "PTS",
30
+ ]
31
+
32
+ advance_on_space = [True, True, True, True, True]
33
+
34
+ # 1 once per contest, 2 work each band, 3 each band/mode, 4 no dupe checking
35
+ dupe_type = 2
36
+
37
+
38
+ def init_contest(self):
39
+ """setup plugin"""
40
+ set_tab_next(self)
41
+ set_tab_prev(self)
42
+ interface(self)
43
+ self.next_field = self.other_2
44
+
45
+
46
+ def interface(self):
47
+ """Setup user interface"""
48
+ self.field1.show()
49
+ self.field2.show()
50
+ self.field3.show()
51
+ self.field4.show()
52
+ label = self.field3.findChild(QtWidgets.QLabel)
53
+ label.setText("SentNR")
54
+ self.field3.setAccessibleName("Sent Grid")
55
+ label = self.field4.findChild(QtWidgets.QLabel)
56
+ label.setText("Grid")
57
+ self.field4.setAccessibleName("Gridsquare")
58
+
59
+
60
+ def reset_label(self):
61
+ """reset label after field cleared"""
62
+
63
+
64
+ def set_tab_next(self):
65
+ """Set TAB Advances"""
66
+ self.tab_next = {
67
+ self.callsign: self.field1.findChild(QtWidgets.QLineEdit),
68
+ self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild(
69
+ QtWidgets.QLineEdit
70
+ ),
71
+ self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild(
72
+ QtWidgets.QLineEdit
73
+ ),
74
+ self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
75
+ QtWidgets.QLineEdit
76
+ ),
77
+ self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
78
+ }
79
+
80
+
81
+ def set_tab_prev(self):
82
+ """Set TAB Advances"""
83
+ self.tab_prev = {
84
+ self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
85
+ self.field1.findChild(QtWidgets.QLineEdit): self.callsign,
86
+ self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild(
87
+ QtWidgets.QLineEdit
88
+ ),
89
+ self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild(
90
+ QtWidgets.QLineEdit
91
+ ),
92
+ self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
93
+ QtWidgets.QLineEdit
94
+ ),
95
+ }
96
+
97
+
98
+ def validate(self):
99
+ """doc"""
100
+ # exchange = self.other_2.text().upper().split()
101
+ # if len(exchange) == 3:
102
+ # if exchange[0].isalpha() and exchange[1].isdigit() and exchange[2].isalpha():
103
+ # return True
104
+ # return False
105
+ return True
106
+
107
+
108
+ def set_contact_vars(self):
109
+ """Contest Specific"""
110
+ self.contact["SNT"] = self.sent.text()
111
+ self.contact["RCV"] = self.receive.text()
112
+ self.contact["NR"] = self.other_2.text().upper()
113
+ self.contact["SentNr"] = self.other_1.text()
114
+
115
+
116
+ def predupe(self):
117
+ """called after callsign entered"""
118
+
119
+
120
+ def prefill(self):
121
+ """Fill sentnr"""
122
+ result = self.database.get_serial()
123
+ serial_nr = str(result.get("serial_nr", "1"))
124
+ if serial_nr == "None":
125
+ serial_nr = "1"
126
+
127
+ exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr)
128
+ field = self.field3.findChild(QtWidgets.QLineEdit)
129
+ if len(field.text()) == 0:
130
+ field.setText(exchange)
131
+
132
+
133
+ def points(self):
134
+ """Calc point"""
135
+
136
+ # QSO Points: 1 point per 50 or 144 MHz QSO
137
+ # 2 points per 222 or 432 MHz QSO
138
+ # 3 points per 902 or 1296 MHz QSO
139
+ # 4 points per 2.3 GHz or higher QSO
140
+
141
+ _band = self.contact.get("Band", "")
142
+ if _band in ["50", "144"]:
143
+ return 1
144
+ if _band in ["222", "432"]:
145
+ return 2
146
+ if _band in ["902", "1296"]:
147
+ return 3
148
+ if _band in ["2300+"]:
149
+ return 4
150
+ return 0
151
+
152
+
153
+ def show_mults(self):
154
+ """Return display string for mults"""
155
+ # Multipliers: Grid squares once per band
156
+
157
+ dx = 0
158
+
159
+ sql = (
160
+ "select count(DISTINCT(NR || ':' || Band)) as mult_count "
161
+ f"from dxlog where ContestNR = {self.database.current_contest} and typeof(NR) = 'text';"
162
+ )
163
+ result = self.database.exec_sql(sql)
164
+
165
+ if result:
166
+ dx = result.get("mult_count", 0)
167
+
168
+ return dx
169
+
170
+
171
+ def show_qso(self):
172
+ """Return qso count"""
173
+ result = self.database.fetch_qso_count()
174
+ if result:
175
+ return int(result.get("qsos", 0))
176
+ return 0
177
+
178
+
179
+ def calc_score(self):
180
+ """Return calculated score"""
181
+ # Multipliers: Each US State + DC once per mode
182
+ _points = get_points(self)
183
+ _mults = show_mults(self)
184
+ _power_mult = 1
185
+ # if self.contest_settings.get("PowerCategory", "") == "QRP":
186
+ # _power_mult = 2
187
+ return _points * _power_mult * _mults
188
+
189
+
190
+ def adif(self):
191
+ """Call the generate ADIF function"""
192
+ gen_adif(self, cabrillo_name)
193
+
194
+
195
+ def cabrillo(self):
196
+ """Generates Cabrillo file. Maybe."""
197
+ # https://www.cqwpx.com/cabrillo.htm
198
+ logger.debug("******Cabrillo*****")
199
+ logger.debug("Station: %s", f"{self.station}")
200
+ logger.debug("Contest: %s", f"{self.contest_settings}")
201
+ now = datetime.datetime.now()
202
+ date_time = now.strftime("%Y-%m-%d_%H-%M-%S")
203
+ filename = (
204
+ str(Path.home())
205
+ + "/"
206
+ + f"{self.station.get('Call').upper()}_{cabrillo_name}_{date_time}.log"
207
+ )
208
+ logger.debug("%s", filename)
209
+ log = self.database.fetch_all_contacts_asc()
210
+ try:
211
+ with open(filename, "w", encoding="ascii") as file_descriptor:
212
+ print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
213
+ print(
214
+ f"CREATED-BY: Not1MM v{__version__}",
215
+ end="\r\n",
216
+ file=file_descriptor,
217
+ )
218
+ print(
219
+ f"CONTEST: {cabrillo_name}",
220
+ end="\r\n",
221
+ file=file_descriptor,
222
+ )
223
+ print(
224
+ f"CALLSIGN: {self.station.get('Call','')}",
225
+ end="\r\n",
226
+ file=file_descriptor,
227
+ )
228
+ print(
229
+ f"LOCATION: {self.station.get('ARRLSection', '')}",
230
+ end="\r\n",
231
+ file=file_descriptor,
232
+ )
233
+ # print(
234
+ # f"ARRL-SECTION: {self.pref.get('section', '')}",
235
+ # end="\r\n",
236
+ # file=file_descriptor,
237
+ # )
238
+ print(
239
+ f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
240
+ end="\r\n",
241
+ file=file_descriptor,
242
+ )
243
+ print(
244
+ f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
245
+ end="\r\n",
246
+ file=file_descriptor,
247
+ )
248
+ print(
249
+ f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
250
+ end="\r\n",
251
+ file=file_descriptor,
252
+ )
253
+ print(
254
+ f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
255
+ end="\r\n",
256
+ file=file_descriptor,
257
+ )
258
+ print(
259
+ f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
260
+ end="\r\n",
261
+ file=file_descriptor,
262
+ )
263
+ if self.contest_settings.get("OverlayCategory", "") != "N/A":
264
+ print(
265
+ f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
266
+ end="\r\n",
267
+ file=file_descriptor,
268
+ )
269
+ print(
270
+ f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
271
+ end="\r\n",
272
+ file=file_descriptor,
273
+ )
274
+ # print(
275
+ # f"CATEGORY: {None}",
276
+ # end="\r\n",
277
+ # file=file_descriptor,
278
+ # )
279
+ print(
280
+ f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
281
+ end="\r\n",
282
+ file=file_descriptor,
283
+ )
284
+
285
+ print(
286
+ f"CLAIMED-SCORE: {calc_score(self)}",
287
+ end="\r\n",
288
+ file=file_descriptor,
289
+ )
290
+ print(
291
+ f"OPERATORS: {self.contest_settings.get('Operators','')}",
292
+ end="\r\n",
293
+ file=file_descriptor,
294
+ )
295
+ print(
296
+ f"NAME: {self.station.get('Name', '')}",
297
+ end="\r\n",
298
+ file=file_descriptor,
299
+ )
300
+ print(
301
+ f"ADDRESS: {self.station.get('Street1', '')}",
302
+ end="\r\n",
303
+ file=file_descriptor,
304
+ )
305
+ print(
306
+ f"ADDRESS-CITY: {self.station.get('City', '')}",
307
+ end="\r\n",
308
+ file=file_descriptor,
309
+ )
310
+ print(
311
+ f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
312
+ end="\r\n",
313
+ file=file_descriptor,
314
+ )
315
+ print(
316
+ f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
317
+ end="\r\n",
318
+ file=file_descriptor,
319
+ )
320
+ print(
321
+ f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
322
+ end="\r\n",
323
+ file=file_descriptor,
324
+ )
325
+ print(
326
+ f"EMAIL: {self.station.get('Email', '')}",
327
+ end="\r\n",
328
+ file=file_descriptor,
329
+ )
330
+ for contact in log:
331
+ the_date_and_time = contact.get("TS", "")
332
+ themode = contact.get("Mode", "")
333
+ if themode == "LSB" or themode == "USB":
334
+ themode = "PH"
335
+ frequency = str(int(contact.get("Freq", "0"))).rjust(5)
336
+
337
+ loggeddate = the_date_and_time[:10]
338
+ loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
339
+ print(
340
+ f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
341
+ f"{contact.get('StationPrefix', '').ljust(13)} "
342
+ f"{str(contact.get('SNT', '')).ljust(3)} "
343
+ f"{str(contact.get('SentNr', '')).ljust(6)} "
344
+ f"{contact.get('Call', '').ljust(13)} "
345
+ f"{str(contact.get('RCV', '')).ljust(3)} "
346
+ f"{str(contact.get('NR', '')).ljust(6)}",
347
+ end="\r\n",
348
+ file=file_descriptor,
349
+ )
350
+ print("END-OF-LOG:", end="\r\n", file=file_descriptor)
351
+ except IOError as exception:
352
+ logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
353
+ return
354
+
355
+
356
+ def recalculate_mults(self):
357
+ """Recalculates multipliers after change in logged qso."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: not1mm
3
- Version: 23.12.19
3
+ Version: 23.12.24
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
@@ -146,6 +146,8 @@ I wish to thank those who've contributed to the project.
146
146
  - ARRL Sweepstakes CW
147
147
  - ARRL Sweepstakes SSB
148
148
  - ARRL VHF January
149
+ - ARRL VHF June
150
+ - ARRL VHF September
149
151
  - CQ WPX CW
150
152
  - CQ WPX SSB
151
153
  - CQ World Wide CW
@@ -161,6 +163,9 @@ I wish to thank those who've contributed to the project.
161
163
 
162
164
  ## Recent Changes
163
165
 
166
+ - [23-12-24] Fixed bug where no bands showed onscreen during initial launch.
167
+ - [23-12-22] Refactored a bunch of code.
168
+ - [23-12-20] Add ARRL VHF Jun and Sep.
164
169
  - [23-12-19] Add ARRL VHF contest. Add VHF frequencies. Add Bands TAB to configuration dialog to select active bands you want displayed.
165
170
  - [23-12-17] Add ARRL 10M contest. Fixed crash in RAC Canada Day
166
171
  - [23-12-5] Removed deprecated datetime.utcnow()
@@ -1,5 +1,5 @@
1
1
  not1mm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- not1mm/__main__.py,sha256=xqXClbUKw1kN2J6cNhtipRU-yVkHQMRmtMvUDIjM9oU,106935
2
+ not1mm/__main__.py,sha256=-5tC2r82VbzfBPIlFbw_dhlNFWyqLyRb2kfezzDRrtI,98409
3
3
  not1mm/bandmap.py,sha256=WBCy3erbsmDTNQ5e3H7e1Fl1iQcYljeJRvW5Yqg32sc,28917
4
4
  not1mm/checkwindow.py,sha256=CbdE_q2Ozo3mL04R18gSwjrP2Tr3pFRFXcCkr92IH60,7249
5
5
  not1mm/logwindow.py,sha256=Rw2393HcyXvP5MQXI0nPxEoD0eCT_PiD3S2Ni9dJS38,41889
@@ -25,7 +25,7 @@ not1mm/data/k6gte.not1mm-32.png,sha256=yucSwzlmqv3NegdWUvPvZzSgP7G22Ky3se8TWRXvz
25
25
  not1mm/data/k6gte.not1mm-64.png,sha256=1KQvk0WBckUds79BvIFUt-KdTwQKKvTz6hiJu8MiT68,2152
26
26
  not1mm/data/logwindow.ui,sha256=_-wobHhIjALzCswyXIrqNadnLdc88eay1GNF23a-Qh0,970
27
27
  not1mm/data/main.ui,sha256=zhF00NG9BL6EDr7159GNvvU8vb0oH9FUsdTGli9xY58,53841
28
- not1mm/data/new_contest.ui,sha256=KtZ1fogOX9IflurDhq07O2COV5zxGttKOvaDV5gU7-o,21163
28
+ not1mm/data/new_contest.ui,sha256=pJ0uPXwCsaC5fP8D7XJJCsVPMW7juR3PXdP0ju6tHI0,21380
29
29
  not1mm/data/not1mm.html,sha256=YfPiT9SrSZfsxShbiLTtdCa3rSY6M2haZ2eKV8kmU3c,25793
30
30
  not1mm/data/opon.ui,sha256=mC4OhoVIfR1H9IqHAKXliPMm8VOVmxSEadpsFQ7XnS4,2247
31
31
  not1mm/data/pickcontest.ui,sha256=_9JFiJw4l-bRRgNDtVg1DpxreylYd_UqEq0wfcr9gJc,1600
@@ -102,7 +102,7 @@ not1mm/lib/plugin_common.py,sha256=5IWIy24NpAuuzzPEjmaqeKyFHllkOgVN1gEu8vkCZsg,7
102
102
  not1mm/lib/select_contest.py,sha256=XQdRUkPAIHIMVsilm82M54b_v9yWpYrZ1nfInJrtZoo,363
103
103
  not1mm/lib/settings.py,sha256=t_JLJPnDBtMGAvJMAF1AL1eVB7MyucqlksVTU47yxvk,8933
104
104
  not1mm/lib/super_check_partial.py,sha256=GlXgtIblL602iW-V6Mmdf5S4FxtzJ95TbPMMa9xXUfg,1692
105
- not1mm/lib/version.py,sha256=38SVLfd1zDKNp-6QUCbU0opQ2HmUOCbdKRWHeDDFcuo,48
105
+ not1mm/lib/version.py,sha256=3WnTu2qu8QdFaxkHJJ9eZvjyCrfoPEspL1IZ_vQOy1k,48
106
106
  not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
107
107
  not1mm/plugins/10_10_fall_cw.py,sha256=yGMRxMXE6NW2Qie4olq1E9YziHOLCXp4_ZP7LXvbYf0,10307
108
108
  not1mm/plugins/10_10_spring_cw.py,sha256=J3FrRQbkA3dMEQiY7-cWJ0lGCakT1hhl8yynNszQ9qI,10313
@@ -117,6 +117,8 @@ not1mm/plugins/arrl_rtty_ru.py,sha256=9v9wApmUZHAKX4t_O6hVqBnT7v5bqAGV8SjgDhfOuM
117
117
  not1mm/plugins/arrl_ss_cw.py,sha256=ayixJrnRLVbH0Ml9MnrCl3Jz-o_kPBqjn7Ds0DEOwRM,12612
118
118
  not1mm/plugins/arrl_ss_phone.py,sha256=p40pxEhcBQ__USXD-3BZXgnmPN3xcFsFdjAZU5tLVRo,12618
119
119
  not1mm/plugins/arrl_vhf_jan.py,sha256=HmRGsLcU1-sVlI1RaSSzlr8pqtwwkBI4TqH8T3qk07k,11912
120
+ not1mm/plugins/arrl_vhf_jun.py,sha256=byLkxRHN-aP-LOGCzTEFfCOI3dj9B8DDYJ7s23MW_GQ,10931
121
+ not1mm/plugins/arrl_vhf_sep.py,sha256=2txIDgGm06e3kKRZ0qQsWoOf1ZHwMKfPPwYB6GmJfqw,10930
120
122
  not1mm/plugins/canada_day.py,sha256=luLkEmD1UEhSRgBBAgFPhg5d-h4tRCLOAU7qGt9Mbt4,11342
121
123
  not1mm/plugins/cq_wpx_cw.py,sha256=CSrHr-byJ-ZsOl8fyiQwhk629okgLZPNwBPnPRQNavI,11840
122
124
  not1mm/plugins/cq_wpx_ssb.py,sha256=IHUrb2MFA8H6yWU1Ma_NN0TSqk8tLGiC5lXFW_nBooE,11928
@@ -137,9 +139,9 @@ not1mm/testing/n1mm_listener.py,sha256=UD-qyKEnppQua330WEFKMvMJaNjnYKi7dDuX_RGB5
137
139
  not1mm/testing/test.py,sha256=wGblvMlyOCVkEiHbxE6wvLsorim15ehL72_EZLQeWkk,1660
138
140
  testing/test.py,sha256=q7socQaMu46q-I-1fYgmQhnygrrC5NjAUM5yuySo4fA,249
139
141
  usb_vfo_knob/code.py,sha256=h59iPPlcYbkXmRcYPQHDBP0yfLEl7fY3VkiIszdQeyI,1057
140
- not1mm-23.12.19.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
141
- not1mm-23.12.19.dist-info/METADATA,sha256=hZ6FKBh4HemNEddMOH8AK9Bb_B2-4gkH199Lf0aZERs,25696
142
- not1mm-23.12.19.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
143
- not1mm-23.12.19.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
144
- not1mm-23.12.19.dist-info/top_level.txt,sha256=PBUZJeDgW5ta7ghk__UYh_ygOFIhe9ymJDaxEuVumFU,28
145
- not1mm-23.12.19.dist-info/RECORD,,
142
+ not1mm-23.12.24.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
143
+ not1mm-23.12.24.dist-info/METADATA,sha256=QJ2imQYe9VIapjvSkVSnQiRmFKs42Zne_X_uySJNVwI,25890
144
+ not1mm-23.12.24.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
145
+ not1mm-23.12.24.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
146
+ not1mm-23.12.24.dist-info/top_level.txt,sha256=PBUZJeDgW5ta7ghk__UYh_ygOFIhe9ymJDaxEuVumFU,28
147
+ not1mm-23.12.24.dist-info/RECORD,,