not1mm 23.12.20__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.
@@ -0,0 +1,336 @@
1
+ """Stew Perry Topband plugin"""
2
+
3
+ # Geographic Focus: Worldwide
4
+ # Participation: Worldwide
5
+ # Awards: Worldwide
6
+ # Mode: CW
7
+ # Bands: 160m Only
8
+ # Classes: Single Op (QRP/Low/High)
9
+ # Multi-Op (QRP/Low/High)
10
+ # Max operating hours: 14 hours
11
+ # Max power: HP: >100 watts
12
+ # LP: 5-100 watts
13
+ # QRP: <5 watts
14
+ # Exchange: 4-Character grid square
15
+ # QSO Points: 1 point per QSO plus 1 point per 500 km
16
+ # multiply QSO points by 2 if low power station
17
+ # multiply QSO points by 4 if QRP station
18
+ # Multipliers: (none)
19
+ # Score Calculation: Total score = total QSO points x power multiplier
20
+ # Submit logs by: January 15, 2024
21
+ # E-mail logs to: (none)
22
+ # Upload log at: http://www.b4h.net/stew/tbdcsubmitlog.php
23
+ # Mail logs to: BARC
24
+ # 50335 NW Hayward Rd
25
+ # Manning, OR 97125
26
+ # USA
27
+ # Find rules at: http://www.kkn.net/stew/
28
+
29
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
30
+
31
+ import datetime
32
+ import logging
33
+
34
+ from pathlib import Path
35
+ from PyQt5 import QtWidgets
36
+ from not1mm.lib.plugin_common import gen_adif, get_points
37
+ from not1mm.lib.version import __version__
38
+
39
+ logger = logging.getLogger("__main__")
40
+
41
+ cabrillo_name = "STEW-PERRY"
42
+ name = "Stew Perry Topband"
43
+
44
+ mode = "CW" # CW SSB BOTH RTTY
45
+
46
+ columns = [
47
+ "YYYY-MM-DD HH:MM:SS",
48
+ "Call",
49
+ "Freq",
50
+ "Mode",
51
+ "Exchange1",
52
+ "Sect",
53
+ "PTS",
54
+ ]
55
+
56
+ advance_on_space = [True, True, True, True, True]
57
+
58
+ # 1 once per contest, 2 work each band, 3 each band/mode, 4 no dupe checking
59
+ dupe_type = 1
60
+
61
+
62
+ def init_contest(self):
63
+ """setup plugin"""
64
+ set_tab_next(self)
65
+ set_tab_prev(self)
66
+ interface(self)
67
+ self.next_field = self.other_1
68
+
69
+
70
+ def interface(self):
71
+ """Setup user interface"""
72
+ self.field1.hide()
73
+ self.field2.hide()
74
+ self.field3.show()
75
+ self.field4.show()
76
+ label = self.field3.findChild(QtWidgets.QLabel)
77
+ label.setText("Class")
78
+ self.field3.setAccessibleName("Class")
79
+ label = self.field4.findChild(QtWidgets.QLabel)
80
+ label.setText("Section")
81
+ self.field4.setAccessibleName("Section")
82
+
83
+
84
+ def reset_label(self):
85
+ """reset label after field cleared"""
86
+
87
+
88
+ def set_tab_next(self):
89
+ """Set TAB Advances"""
90
+ self.tab_next = {
91
+ self.callsign: self.field3.findChild(QtWidgets.QLineEdit),
92
+ self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild(
93
+ QtWidgets.QLineEdit
94
+ ),
95
+ self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild(
96
+ QtWidgets.QLineEdit
97
+ ),
98
+ self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
99
+ QtWidgets.QLineEdit
100
+ ),
101
+ self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
102
+ }
103
+
104
+
105
+ def set_tab_prev(self):
106
+ """Set TAB Advances"""
107
+ self.tab_prev = {
108
+ self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
109
+ self.field1.findChild(QtWidgets.QLineEdit): self.callsign,
110
+ self.field2.findChild(QtWidgets.QLineEdit): self.callsign,
111
+ self.field3.findChild(QtWidgets.QLineEdit): self.callsign,
112
+ self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
113
+ QtWidgets.QLineEdit
114
+ ),
115
+ }
116
+
117
+
118
+ def set_contact_vars(self):
119
+ """Contest Specific"""
120
+ self.contact["SNT"] = self.sent.text()
121
+ self.contact["RCV"] = self.receive.text()
122
+ self.contact["Exchange1"] = self.other_1.text().upper()
123
+ self.contact["Sect"] = self.other_2.text().upper()
124
+
125
+
126
+ def predupe(self):
127
+ """called after callsign entered"""
128
+
129
+
130
+ def prefill(self):
131
+ """Fill SentNR"""
132
+
133
+
134
+ def points(self):
135
+ """Calc point"""
136
+ _mode = self.contact.get("Mode", "")
137
+ if _mode in "SSB, USB, LSB, FM, AM":
138
+ return 1
139
+ if _mode in "CW, RTTY":
140
+ return 2
141
+ return 0
142
+
143
+
144
+ def show_mults(self):
145
+ """Return display string for mults"""
146
+ result = self.database.get_unique_band_and_mode()
147
+ if result:
148
+ return int(result.get("mult", 0))
149
+ return 0
150
+
151
+
152
+ def show_qso(self):
153
+ """Return qso count"""
154
+ result = self.database.fetch_qso_count()
155
+ if result:
156
+ return int(result.get("qsos", 0))
157
+ return 0
158
+
159
+
160
+ def calc_score(self):
161
+ """Return calculated score"""
162
+ _points = get_points(self)
163
+ _mults = show_mults(self)
164
+ _power_mult = 1
165
+ if self.contest_settings.get("PowerCategory", "") == "QRP":
166
+ _power_mult = 2
167
+ return _points * _power_mult * _mults
168
+
169
+
170
+ def adif(self):
171
+ """Call the generate ADIF function"""
172
+ gen_adif(self, cabrillo_name, "STEW-PERRY")
173
+
174
+
175
+ def cabrillo(self):
176
+ """Generates Cabrillo file. Maybe."""
177
+ # https://www.cqwpx.com/cabrillo.htm
178
+ logger.debug("******Cabrillo*****")
179
+ logger.debug("Station: %s", f"{self.station}")
180
+ logger.debug("Contest: %s", f"{self.contest_settings}")
181
+ now = datetime.datetime.now()
182
+ date_time = now.strftime("%Y-%m-%d_%H-%M-%S")
183
+ filename = (
184
+ str(Path.home())
185
+ + "/"
186
+ + f"{self.station.get('Call').upper()}_{cabrillo_name}_{date_time}.log"
187
+ )
188
+ logger.debug("%s", filename)
189
+ log = self.database.fetch_all_contacts_asc()
190
+ try:
191
+ with open(filename, "w", encoding="ascii") as file_descriptor:
192
+ print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
193
+ print(
194
+ f"CREATED-BY: Not1MM v{__version__}",
195
+ end="\r\n",
196
+ file=file_descriptor,
197
+ )
198
+ print(
199
+ f"CONTEST: {cabrillo_name}",
200
+ end="\r\n",
201
+ file=file_descriptor,
202
+ )
203
+ print(
204
+ f"CALLSIGN: {self.station.get('Call','')}",
205
+ end="\r\n",
206
+ file=file_descriptor,
207
+ )
208
+ print(
209
+ f"LOCATION: {self.station.get('ARRLSection', '')}",
210
+ end="\r\n",
211
+ file=file_descriptor,
212
+ )
213
+ # print(
214
+ # f"ARRL-SECTION: {self.pref.get('section', '')}",
215
+ # end="\r\n",
216
+ # file=file_descriptor,
217
+ # )
218
+ print(
219
+ f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
220
+ end="\r\n",
221
+ file=file_descriptor,
222
+ )
223
+ print(
224
+ f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
225
+ end="\r\n",
226
+ file=file_descriptor,
227
+ )
228
+ print(
229
+ f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
230
+ end="\r\n",
231
+ file=file_descriptor,
232
+ )
233
+ print(
234
+ f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
235
+ end="\r\n",
236
+ file=file_descriptor,
237
+ )
238
+ print(
239
+ f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
240
+ end="\r\n",
241
+ file=file_descriptor,
242
+ )
243
+ if self.contest_settings.get("OverlayCategory", "") != "N/A":
244
+ print(
245
+ f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
246
+ end="\r\n",
247
+ file=file_descriptor,
248
+ )
249
+ print(
250
+ f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
251
+ end="\r\n",
252
+ file=file_descriptor,
253
+ )
254
+ # print(
255
+ # f"CATEGORY: {None}",
256
+ # end="\r\n",
257
+ # file=file_descriptor,
258
+ # )
259
+ print(
260
+ f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
261
+ end="\r\n",
262
+ file=file_descriptor,
263
+ )
264
+
265
+ print(
266
+ f"CLAIMED-SCORE: {calc_score(self)}",
267
+ end="\r\n",
268
+ file=file_descriptor,
269
+ )
270
+ print(
271
+ "OPERATORS: ",
272
+ end="\r\n",
273
+ file=file_descriptor,
274
+ )
275
+ print(
276
+ f"NAME: {self.station.get('Name', '')}",
277
+ end="\r\n",
278
+ file=file_descriptor,
279
+ )
280
+ print(
281
+ f"ADDRESS: {self.station.get('Street1', '')}",
282
+ end="\r\n",
283
+ file=file_descriptor,
284
+ )
285
+ print(
286
+ f"ADDRESS-CITY: {self.station.get('City', '')}",
287
+ end="\r\n",
288
+ file=file_descriptor,
289
+ )
290
+ print(
291
+ f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
292
+ end="\r\n",
293
+ file=file_descriptor,
294
+ )
295
+ print(
296
+ f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
297
+ end="\r\n",
298
+ file=file_descriptor,
299
+ )
300
+ print(
301
+ f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
302
+ end="\r\n",
303
+ file=file_descriptor,
304
+ )
305
+ print(
306
+ f"EMAIL: {self.station.get('Email', '')}",
307
+ end="\r\n",
308
+ file=file_descriptor,
309
+ )
310
+ for contact in log:
311
+ the_date_and_time = contact.get("TS", "")
312
+ themode = contact.get("Mode", "")
313
+ if themode == "LSB" or themode == "USB":
314
+ themode = "PH"
315
+ frequency = str(int(contact.get("Freq", "0"))).rjust(5)
316
+
317
+ loggeddate = the_date_and_time[:10]
318
+ loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
319
+ print(
320
+ f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
321
+ f"{contact.get('StationPrefix', '').ljust(13)} "
322
+ f"{self.contest_settings.get('SentExchange', '').ljust(9).upper()}"
323
+ f"{contact.get('Call', '').ljust(13)} "
324
+ f"{str(contact.get('Exchange1', '')).ljust(3)} "
325
+ f"{str(contact.get('Sect', '')).ljust(6)}",
326
+ end="\r\n",
327
+ file=file_descriptor,
328
+ )
329
+ print("END-OF-LOG:", end="\r\n", file=file_descriptor)
330
+ except IOError as exception:
331
+ logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
332
+ return
333
+
334
+
335
+ def recalculate_mults(self):
336
+ """Recalculates multipliers after change in logged qso."""
not1mm/weee.py ADDED
@@ -0,0 +1,10 @@
1
+ import flet as ft
2
+
3
+
4
+ def main(page: ft.Page):
5
+ t = ft.Text(value="Hello, world!", color="green")
6
+ page.controls.append(t)
7
+ page.update()
8
+
9
+
10
+ ft.app(target=main)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: not1mm
3
- Version: 23.12.20
3
+ Version: 24.1.15
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
@@ -158,17 +158,13 @@ I wish to thank those who've contributed to the project.
158
158
  - Japan International DX SSB
159
159
  - NAQP CW
160
160
  - NAQP SSB
161
+ - Phone Weekly Test
161
162
  - RAC Canada Day
162
163
  - Winter Field Day
163
164
 
164
165
  ## Recent Changes
165
166
 
166
- - [23-12-20] Add ARRL VHF Jun and Sep.
167
- - [23-12-19] Add ARRL VHF contest. Add VHF frequencies. Add Bands TAB to configuration dialog to select active bands you want displayed.
168
- - [23-12-17] Add ARRL 10M contest. Fixed crash in RAC Canada Day
169
- - [23-12-5] Removed deprecated datetime.utcnow()
170
- - [23-12-4] Moved get_points to plugin_common, fixing crash.
171
- - [23-12-3] Initial WFD plugin.
167
+ - [24-1-15] Added the Phone Weekly Test.
172
168
 
173
169
  See [CHANGELOG.md](CHANGELOG.md) for prior changes.
174
170
 
@@ -1,9 +1,10 @@
1
1
  not1mm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- not1mm/__main__.py,sha256=xqXClbUKw1kN2J6cNhtipRU-yVkHQMRmtMvUDIjM9oU,106935
2
+ not1mm/__main__.py,sha256=KWJHlEDYQKXJG1cDPPKeEAK12KjX1YnxsFuDU68FBI4,98755
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
6
6
  not1mm/vfo.py,sha256=UzQMvI7gc6HyBAhPYCZY1hsDDBM4uygxBRPCl4E_wfQ,10296
7
+ not1mm/weee.py,sha256=BEvubqsIu18QqFcqnreSSwBVsaNCXu2rU_no7brdwq4,167
7
8
  not1mm/data/JetBrainsMono-Regular.ttf,sha256=UOHctAKY_PzCGh7zy-6f6egnCcSK0wzmF0csBqO9lDY,203952
8
9
  not1mm/data/MASTER.SCP,sha256=kFAOdDe52-pTKrWdi97LvqWVmfc1HYNTnUINKiwURWA,362318
9
10
  not1mm/data/about.ui,sha256=7TqvtXFFm0Rmcu0bmLupwpO1CsK8MekfZ09_xn6kZrQ,2067
@@ -25,7 +26,7 @@ not1mm/data/k6gte.not1mm-32.png,sha256=yucSwzlmqv3NegdWUvPvZzSgP7G22Ky3se8TWRXvz
25
26
  not1mm/data/k6gte.not1mm-64.png,sha256=1KQvk0WBckUds79BvIFUt-KdTwQKKvTz6hiJu8MiT68,2152
26
27
  not1mm/data/logwindow.ui,sha256=_-wobHhIjALzCswyXIrqNadnLdc88eay1GNF23a-Qh0,970
27
28
  not1mm/data/main.ui,sha256=zhF00NG9BL6EDr7159GNvvU8vb0oH9FUsdTGli9xY58,53841
28
- not1mm/data/new_contest.ui,sha256=pJ0uPXwCsaC5fP8D7XJJCsVPMW7juR3PXdP0ju6tHI0,21380
29
+ not1mm/data/new_contest.ui,sha256=-oQyUshivOcXz30dKtnBTmoENOMnrlOXbKXcQeIr6fk,21495
29
30
  not1mm/data/not1mm.html,sha256=YfPiT9SrSZfsxShbiLTtdCa3rSY6M2haZ2eKV8kmU3c,25793
30
31
  not1mm/data/opon.ui,sha256=mC4OhoVIfR1H9IqHAKXliPMm8VOVmxSEadpsFQ7XnS4,2247
31
32
  not1mm/data/pickcontest.ui,sha256=_9JFiJw4l-bRRgNDtVg1DpxreylYd_UqEq0wfcr9gJc,1600
@@ -102,7 +103,7 @@ not1mm/lib/plugin_common.py,sha256=5IWIy24NpAuuzzPEjmaqeKyFHllkOgVN1gEu8vkCZsg,7
102
103
  not1mm/lib/select_contest.py,sha256=XQdRUkPAIHIMVsilm82M54b_v9yWpYrZ1nfInJrtZoo,363
103
104
  not1mm/lib/settings.py,sha256=t_JLJPnDBtMGAvJMAF1AL1eVB7MyucqlksVTU47yxvk,8933
104
105
  not1mm/lib/super_check_partial.py,sha256=GlXgtIblL602iW-V6Mmdf5S4FxtzJ95TbPMMa9xXUfg,1692
105
- not1mm/lib/version.py,sha256=yutKiLqpElTLpXV05cIZkNlqZqTS_YWHci05JjIyUng,48
106
+ not1mm/lib/version.py,sha256=Mzm384jrlXQpJcJUHrGSvWZ-wqW_puY2tyzxFHHCt84,47
106
107
  not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
107
108
  not1mm/plugins/10_10_fall_cw.py,sha256=yGMRxMXE6NW2Qie4olq1E9YziHOLCXp4_ZP7LXvbYf0,10307
108
109
  not1mm/plugins/10_10_spring_cw.py,sha256=J3FrRQbkA3dMEQiY7-cWJ0lGCakT1hhl8yynNszQ9qI,10313
@@ -131,6 +132,8 @@ not1mm/plugins/jidx_cw.py,sha256=1QJj5mfuxLjqxv3L3Gi-F5tcuG4cUXtHrI4noGhC5-Y,105
131
132
  not1mm/plugins/jidx_ph.py,sha256=cTaPoCGYhS8jjTFAP0rnKb_EeO20ssv1dWJsLpWdiWg,10506
132
133
  not1mm/plugins/naqp_cw.py,sha256=Dba9YqJroq9d10lrFLD57Zpgv9kmoF5Y0bJFW_xx0vs,11115
133
134
  not1mm/plugins/naqp_ssb.py,sha256=Wm07zXkWzLTgc09Uq7M-XTQ7NavYmKJrzKuYt87OL-U,11120
135
+ not1mm/plugins/phone_weekly_test.py,sha256=Zpqm8NnKIP31TcJfCqgAuIi_l7ckXqBwPNiEacJNScs,11922
136
+ not1mm/plugins/stew_perry_topband.py,sha256=TagxHrgY-dDN5JCsIrGE0Xe1zYAQXKgVcENzT0nNc3o,10349
134
137
  not1mm/plugins/winter_field_day.py,sha256=GIwH26HdVlaui_EfuzjlTDrDbrGCxaY0m02XmgzjqDQ,9641
135
138
  not1mm/testing/fakeflrig.py,sha256=_vJHGjARpSNxSZngkHNO_kkHoVnqtf--T6gwTAYnnZQ,2083
136
139
  not1mm/testing/flrigclient.py,sha256=24r_0HqpoTjyJ6Bqg_HIC8Nn9wjtnwwWQ26I7UprwgA,1658
@@ -139,9 +142,9 @@ not1mm/testing/n1mm_listener.py,sha256=UD-qyKEnppQua330WEFKMvMJaNjnYKi7dDuX_RGB5
139
142
  not1mm/testing/test.py,sha256=wGblvMlyOCVkEiHbxE6wvLsorim15ehL72_EZLQeWkk,1660
140
143
  testing/test.py,sha256=q7socQaMu46q-I-1fYgmQhnygrrC5NjAUM5yuySo4fA,249
141
144
  usb_vfo_knob/code.py,sha256=h59iPPlcYbkXmRcYPQHDBP0yfLEl7fY3VkiIszdQeyI,1057
142
- not1mm-23.12.20.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
143
- not1mm-23.12.20.dist-info/METADATA,sha256=oLFBE9CpHNPS80SGF2WGdO5F5XGXlD8LxRTF7_5jnNk,25772
144
- not1mm-23.12.20.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
145
- not1mm-23.12.20.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
146
- not1mm-23.12.20.dist-info/top_level.txt,sha256=PBUZJeDgW5ta7ghk__UYh_ygOFIhe9ymJDaxEuVumFU,28
147
- not1mm-23.12.20.dist-info/RECORD,,
145
+ not1mm-24.1.15.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
146
+ not1mm-24.1.15.dist-info/METADATA,sha256=joggG62rkUxY0OhSWaY74D7rD07tOoi8V3MUQ2XNnEU,25449
147
+ not1mm-24.1.15.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
148
+ not1mm-24.1.15.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
149
+ not1mm-24.1.15.dist-info/top_level.txt,sha256=PBUZJeDgW5ta7ghk__UYh_ygOFIhe9ymJDaxEuVumFU,28
150
+ not1mm-24.1.15.dist-info/RECORD,,