not1mm 23.12.5__py3-none-any.whl → 24.1.15__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.
Files changed (42) hide show
  1. not1mm/__main__.py +249 -399
  2. not1mm/data/MASTER.SCP +1056 -48577
  3. not1mm/data/configuration.ui +93 -2
  4. not1mm/data/cty.json +1 -1
  5. not1mm/data/main.ui +186 -3
  6. not1mm/data/new_contest.ui +26 -1
  7. not1mm/lib/ham_utility.py +16 -4
  8. not1mm/lib/settings.py +40 -0
  9. not1mm/lib/version.py +1 -1
  10. not1mm/plugins/10_10_fall_cw.py +1 -1
  11. not1mm/plugins/10_10_spring_cw.py +1 -1
  12. not1mm/plugins/10_10_summer_phone.py +1 -1
  13. not1mm/plugins/10_10_winter_phone.py +1 -1
  14. not1mm/plugins/arrl_10m.py +413 -0
  15. not1mm/plugins/arrl_dx_cw.py +1 -1
  16. not1mm/plugins/arrl_dx_ssb.py +1 -1
  17. not1mm/plugins/arrl_ss_cw.py +4 -1
  18. not1mm/plugins/arrl_ss_phone.py +4 -1
  19. not1mm/plugins/arrl_vhf_jan.py +390 -0
  20. not1mm/plugins/arrl_vhf_jun.py +358 -0
  21. not1mm/plugins/arrl_vhf_sep.py +357 -0
  22. not1mm/plugins/canada_day.py +5 -2
  23. not1mm/plugins/cq_wpx_cw.py +1 -1
  24. not1mm/plugins/cq_wpx_ssb.py +1 -1
  25. not1mm/plugins/cq_ww_cw.py +1 -1
  26. not1mm/plugins/cq_ww_ssb.py +1 -1
  27. not1mm/plugins/cwt.py +5 -2
  28. not1mm/plugins/general_logging.py +1 -1
  29. not1mm/plugins/iaru_hf.py +1 -1
  30. not1mm/plugins/jidx_cw.py +2 -1
  31. not1mm/plugins/jidx_ph.py +2 -1
  32. not1mm/plugins/naqp_cw.py +1 -2
  33. not1mm/plugins/naqp_ssb.py +1 -2
  34. not1mm/plugins/phone_weekly_test.py +372 -0
  35. not1mm/plugins/stew_perry_topband.py +336 -0
  36. not1mm/weee.py +10 -0
  37. {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/METADATA +19 -7
  38. {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/RECORD +42 -35
  39. {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/LICENSE +0 -0
  40. {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/WHEEL +0 -0
  41. {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/entry_points.txt +0 -0
  42. {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/top_level.txt +0 -0
@@ -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
  """rac canada day"""
2
2
 
3
- # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
3
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member, unused-import
4
4
 
5
5
  import datetime
6
6
  import logging
@@ -183,7 +183,10 @@ def points(self):
183
183
  def show_mults(self):
184
184
  """Return display string for mults"""
185
185
 
186
- sql = "select count(DISTINCT(NR || ':' || Band || ':' || Mode)) as mult_count from dxlog where typeof(NR) = 'text';"
186
+ sql = (
187
+ "select count(DISTINCT(NR || ':' || Band || ':' || Mode)) as mult_count from dxlog "
188
+ "where ContestNR = {self.database.current_contest} and typeof(NR) = 'text';"
189
+ )
187
190
  result = self.database.exec_sql(sql)
188
191
  if result:
189
192
  return result.get("mult_count", 0)
@@ -1,6 +1,6 @@
1
1
  """CQ WPX CW plugin"""
2
2
 
3
- # pylint: disable=invalid-name, c-extension-no-member
3
+ # pylint: disable=invalid-name, c-extension-no-member, unused-import
4
4
 
5
5
  import datetime
6
6
  import logging
@@ -1,6 +1,6 @@
1
1
  """CQ WPX SSB plugin"""
2
2
 
3
- # pylint: disable=invalid-name, c-extension-no-member
3
+ # pylint: disable=invalid-name, c-extension-no-member, unused-import
4
4
 
5
5
  import datetime
6
6
  import logging
@@ -1,6 +1,6 @@
1
1
  """CQ World Wide DX CW plugin"""
2
2
 
3
- # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
3
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member, unused-import
4
4
 
5
5
  import datetime
6
6
  import logging
@@ -1,6 +1,6 @@
1
1
  """CQ World Wide DX SSB plugin"""
2
2
 
3
- # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
3
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member, unused-import
4
4
 
5
5
  import datetime
6
6
  import logging
not1mm/plugins/cwt.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """CWT plugin"""
2
2
 
3
- # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
3
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member, unused-import
4
4
 
5
5
  import datetime
6
6
  import logging
@@ -115,7 +115,10 @@ def predupe(self):
115
115
  """prefill his exchange with last known values"""
116
116
  if self.other_1.text() == "" and self.other_2.text() == "":
117
117
  call = self.callsign.text().upper()
118
- query = f"select NR from dxlog where Call = '{call}' and ContestName = 'CWOPS-CWT' order by ts desc;"
118
+ query = (
119
+ f"select NR from dxlog where Call = '{call}' ",
120
+ "and ContestName = 'CWOPS-CWT' order by ts desc;",
121
+ )
119
122
  logger.debug(query)
120
123
  result = self.database.exec_sql(query)
121
124
  logger.debug("%s", f"{result}")
@@ -1,6 +1,6 @@
1
1
  """General Logging plugin"""
2
2
 
3
- # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
3
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member, unused-import
4
4
 
5
5
  import logging
6
6
 
not1mm/plugins/iaru_hf.py CHANGED
@@ -14,7 +14,7 @@ Multipliers: Each ITU zone once per band
14
14
  Each IARU HQ and each IARU official once per band
15
15
  """
16
16
 
17
- # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
17
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member, unused-import
18
18
 
19
19
  import datetime
20
20
  import logging
not1mm/plugins/jidx_cw.py CHANGED
@@ -279,7 +279,8 @@ def cabrillo(self):
279
279
  file=file_descriptor,
280
280
  )
281
281
  print(
282
- f"ADDRESS: {self.station.get('City', '')}, {self.station.get('State', '')} {self.station.get('Zip', '')}",
282
+ f"ADDRESS: {self.station.get('City', '')}, {self.station.get('State', '')} ",
283
+ f"{self.station.get('Zip', '')}",
283
284
  end="\r\n",
284
285
  file=file_descriptor,
285
286
  )
not1mm/plugins/jidx_ph.py CHANGED
@@ -279,7 +279,8 @@ def cabrillo(self):
279
279
  file=file_descriptor,
280
280
  )
281
281
  print(
282
- f"ADDRESS: {self.station.get('City', '')}, {self.station.get('State', '')} {self.station.get('Zip', '')}",
282
+ f"ADDRESS: {self.station.get('City', '')}, {self.station.get('State', '')} ",
283
+ f"{self.station.get('Zip', '')}",
283
284
  end="\r\n",
284
285
  file=file_descriptor,
285
286
  )
not1mm/plugins/naqp_cw.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """NAQP CW plugin"""
2
2
 
3
- # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
3
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member, unused-import
4
4
 
5
5
  import datetime
6
6
  import logging
@@ -299,7 +299,6 @@ def cabrillo(self):
299
299
  file=file_descriptor,
300
300
  )
301
301
  for contact in log:
302
- # QSO: 28048 CW 2014-01-11 1804 N5KO TREY CA K8JQ STEVE WV
303
302
  the_date_and_time = contact.get("TS", "")
304
303
  themode = contact.get("Mode", "")
305
304
  if themode == "LSB" or themode == "USB":
@@ -1,6 +1,6 @@
1
1
  """NAQP SSB plugin"""
2
2
 
3
- # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
3
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member, unused-import
4
4
 
5
5
  import datetime
6
6
  import logging
@@ -299,7 +299,6 @@ def cabrillo(self):
299
299
  file=file_descriptor,
300
300
  )
301
301
  for contact in log:
302
- # QSO: 28048 CW 2014-01-11 1804 N5KO TREY CA K8JQ STEVE WV
303
302
  the_date_and_time = contact.get("TS", "")
304
303
  themode = contact.get("Mode", "")
305
304
  if themode == "LSB" or themode == "USB":