not1mm 24.10.24.1__py3-none-any.whl → 24.10.26__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 +9 -3
- not1mm/bandmap.py +6 -1
- not1mm/data/main.ui +23 -3
- not1mm/lib/version.py +1 -1
- not1mm/plugins/10_10_fall_cw.py +109 -82
- not1mm/plugins/10_10_spring_cw.py +109 -82
- not1mm/plugins/10_10_summer_phone.py +109 -82
- not1mm/plugins/10_10_winter_phone.py +109 -82
- not1mm/plugins/arrl_10m.py +109 -82
- not1mm/plugins/arrl_dx_cw.py +109 -82
- not1mm/plugins/arrl_dx_ssb.py +109 -82
- not1mm/plugins/arrl_field_day.py +109 -82
- not1mm/plugins/arrl_ss_cw.py +109 -82
- not1mm/plugins/arrl_ss_phone.py +109 -82
- not1mm/plugins/arrl_vhf_jan.py +109 -82
- not1mm/plugins/arrl_vhf_jun.py +109 -82
- not1mm/plugins/arrl_vhf_sep.py +109 -82
- not1mm/plugins/canada_day.py +109 -82
- not1mm/plugins/cq_160_cw.py +109 -74
- not1mm/plugins/cq_160_ssb.py +109 -74
- not1mm/plugins/cq_wpx_cw.py +109 -82
- not1mm/plugins/cq_wpx_rtty.py +109 -82
- not1mm/plugins/cq_wpx_ssb.py +109 -82
- not1mm/plugins/cq_ww_cw.py +115 -83
- not1mm/plugins/cq_ww_rtty.py +110 -73
- not1mm/plugins/cq_ww_ssb.py +109 -82
- not1mm/plugins/cwt.py +109 -82
- not1mm/plugins/general_logging.py +1 -1
- not1mm/plugins/helvetia.py +109 -82
- not1mm/plugins/iaru_fieldday_r1_cw.py +109 -82
- not1mm/plugins/iaru_fieldday_r1_ssb.py +109 -82
- not1mm/plugins/iaru_hf.py +109 -82
- not1mm/plugins/icwc_mst.py +109 -82
- not1mm/plugins/jidx_cw.py +74 -48
- not1mm/plugins/jidx_ph.py +74 -48
- not1mm/plugins/k1usn_sst.py +109 -82
- not1mm/plugins/naqp_cw.py +109 -82
- not1mm/plugins/naqp_rtty.py +109 -82
- not1mm/plugins/naqp_ssb.py +109 -82
- not1mm/plugins/phone_weekly_test.py +109 -82
- not1mm/plugins/ref_cw.py +109 -82
- not1mm/plugins/ref_ssb.py +109 -82
- not1mm/plugins/stew_perry_topband.py +109 -82
- not1mm/plugins/weekly_rtty.py +109 -82
- not1mm/plugins/winter_field_day.py +109 -82
- {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/METADATA +3 -1
- {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/RECORD +51 -51
- {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/LICENSE +0 -0
- {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/WHEEL +0 -0
- {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/entry_points.txt +0 -0
- {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/top_level.txt +0 -0
not1mm/__main__.py
CHANGED
@@ -230,7 +230,12 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
230
230
|
self.actionVFO.triggered.connect(self.launch_vfo)
|
231
231
|
self.actionRecalculate_Mults.triggered.connect(self.recalculate_mults)
|
232
232
|
|
233
|
-
self.
|
233
|
+
self.actionGenerate_Cabrillo_ASCII.triggered.connect(
|
234
|
+
lambda x: self.generate_cabrillo("ascii")
|
235
|
+
)
|
236
|
+
self.actionGenerate_Cabrillo_UTF8.triggered.connect(
|
237
|
+
lambda x: self.generate_cabrillo("utf-8")
|
238
|
+
)
|
234
239
|
self.actionGenerate_ADIF.triggered.connect(self.generate_adif)
|
235
240
|
|
236
241
|
self.actionConfiguration_Settings.triggered.connect(
|
@@ -746,6 +751,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
746
751
|
return
|
747
752
|
if msg.get("cmd", "") == "TUNE":
|
748
753
|
# b'{"cmd": "TUNE", "freq": 7.0235, "spot": "MM0DGI"}'
|
754
|
+
self.clearinputs()
|
749
755
|
if self.vfo_window:
|
750
756
|
self.vfo_window.msg_from_main(msg)
|
751
757
|
vfo = msg.get("freq")
|
@@ -3629,7 +3635,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
3629
3635
|
logger.debug("******ADIF*****")
|
3630
3636
|
self.contest.adif(self)
|
3631
3637
|
|
3632
|
-
def generate_cabrillo(self) -> None:
|
3638
|
+
def generate_cabrillo(self, file_encoding: str) -> None:
|
3633
3639
|
"""
|
3634
3640
|
Calls the contest Cabrillo file generator. Maybe.
|
3635
3641
|
|
@@ -3643,7 +3649,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
3643
3649
|
"""
|
3644
3650
|
|
3645
3651
|
logger.debug("******Cabrillo*****")
|
3646
|
-
self.contest.cabrillo(self)
|
3652
|
+
self.contest.cabrillo(self, file_encoding)
|
3647
3653
|
|
3648
3654
|
|
3649
3655
|
def load_fonts_from_dir(directory: str) -> set:
|
not1mm/bandmap.py
CHANGED
@@ -809,7 +809,10 @@ class BandMapWindow(QDockWidget):
|
|
809
809
|
"""Process waiting bytes"""
|
810
810
|
while self.socket.bytesAvailable():
|
811
811
|
data = self.socket.readLine(1000)
|
812
|
-
|
812
|
+
try:
|
813
|
+
data = str(data, "utf-8").strip()
|
814
|
+
except UnicodeDecodeError:
|
815
|
+
continue
|
813
816
|
|
814
817
|
if "login:" in data or "call:" in data or "callsign:" in data:
|
815
818
|
self.send_command(self.callsignField.text())
|
@@ -819,6 +822,8 @@ class BandMapWindow(QDockWidget):
|
|
819
822
|
"set dx mode " + self.settings.get("cluster_mode", "OPEN")
|
820
823
|
)
|
821
824
|
return
|
825
|
+
if "BEACON" in data:
|
826
|
+
return
|
822
827
|
if "DX de" in data:
|
823
828
|
parts = data.split()
|
824
829
|
spotter = parts[2]
|
not1mm/data/main.ui
CHANGED
@@ -1471,7 +1471,8 @@
|
|
1471
1471
|
<addaction name="actionStationSettings"/>
|
1472
1472
|
<addaction name="separator"/>
|
1473
1473
|
<addaction name="actionGenerate_ADIF"/>
|
1474
|
-
<addaction name="
|
1474
|
+
<addaction name="actionGenerate_Cabrillo_ASCII"/>
|
1475
|
+
<addaction name="actionGenerate_Cabrillo_UTF8"/>
|
1475
1476
|
<addaction name="separator"/>
|
1476
1477
|
<addaction name="actionEdit_Macros"/>
|
1477
1478
|
<addaction name="separator"/>
|
@@ -1684,9 +1685,28 @@
|
|
1684
1685
|
<bool>false</bool>
|
1685
1686
|
</property>
|
1686
1687
|
</action>
|
1687
|
-
<action name="
|
1688
|
+
<action name="actionGenerate_Cabrillo_ASCII">
|
1688
1689
|
<property name="text">
|
1689
|
-
<string>Generate Cabrillo</string>
|
1690
|
+
<string>Generate Cabrillo ASCII</string>
|
1691
|
+
</property>
|
1692
|
+
<property name="font">
|
1693
|
+
<font>
|
1694
|
+
<family>JetBrains Mono ExtraLight</family>
|
1695
|
+
</font>
|
1696
|
+
</property>
|
1697
|
+
<property name="autoRepeat">
|
1698
|
+
<bool>false</bool>
|
1699
|
+
</property>
|
1700
|
+
<property name="iconVisibleInMenu">
|
1701
|
+
<bool>false</bool>
|
1702
|
+
</property>
|
1703
|
+
<property name="shortcutVisibleInContextMenu">
|
1704
|
+
<bool>false</bool>
|
1705
|
+
</property>
|
1706
|
+
</action>
|
1707
|
+
<action name="actionGenerate_Cabrillo_UTF8">
|
1708
|
+
<property name="text">
|
1709
|
+
<string>Generate Cabrillo UTF-8</string>
|
1690
1710
|
</property>
|
1691
1711
|
<property name="font">
|
1692
1712
|
<font>
|
not1mm/lib/version.py
CHANGED
not1mm/plugins/10_10_fall_cw.py
CHANGED
@@ -169,7 +169,16 @@ def adif(self):
|
|
169
169
|
gen_adif(self, cabrillo_name)
|
170
170
|
|
171
171
|
|
172
|
-
def
|
172
|
+
def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
|
173
|
+
""""""
|
174
|
+
print(
|
175
|
+
line_to_output.encode(file_encoding, errors="ignore").decode(),
|
176
|
+
end=ending,
|
177
|
+
file=file_descriptor,
|
178
|
+
)
|
179
|
+
|
180
|
+
|
181
|
+
def cabrillo(self, file_encoding):
|
173
182
|
"""Generates Cabrillo file. Maybe."""
|
174
183
|
# https://www.cqwpx.com/cabrillo.htm
|
175
184
|
logger.debug("******Cabrillo*****")
|
@@ -186,133 +195,150 @@ def cabrillo(self):
|
|
186
195
|
log = self.database.fetch_all_contacts_asc()
|
187
196
|
try:
|
188
197
|
with open(filename, "w", encoding="utf-8") as file_descriptor:
|
189
|
-
|
190
|
-
|
198
|
+
output_cabrillo_line(
|
199
|
+
"START-OF-LOG: 3.0",
|
200
|
+
"\r\n",
|
201
|
+
file_descriptor,
|
202
|
+
file_encoding,
|
203
|
+
)
|
204
|
+
output_cabrillo_line(
|
191
205
|
f"CREATED-BY: Not1MM v{__version__}",
|
192
|
-
|
193
|
-
|
206
|
+
"\r\n",
|
207
|
+
file_descriptor,
|
208
|
+
file_encoding,
|
194
209
|
)
|
195
|
-
|
210
|
+
output_cabrillo_line(
|
196
211
|
f"CONTEST: {cabrillo_name}",
|
197
|
-
|
198
|
-
|
212
|
+
"\r\n",
|
213
|
+
file_descriptor,
|
214
|
+
file_encoding,
|
199
215
|
)
|
200
216
|
if self.station.get("Club", ""):
|
201
|
-
|
217
|
+
output_cabrillo_line(
|
202
218
|
f"CLUB: {self.station.get('Club', '').upper()}",
|
203
|
-
|
204
|
-
|
219
|
+
"\r\n",
|
220
|
+
file_descriptor,
|
221
|
+
file_encoding,
|
205
222
|
)
|
206
|
-
|
223
|
+
output_cabrillo_line(
|
207
224
|
f"CALLSIGN: {self.station.get('Call','')}",
|
208
|
-
|
209
|
-
|
225
|
+
"\r\n",
|
226
|
+
file_descriptor,
|
227
|
+
file_encoding,
|
210
228
|
)
|
211
|
-
|
229
|
+
output_cabrillo_line(
|
212
230
|
f"LOCATION: {self.station.get('ARRLSection', '')}",
|
213
|
-
|
214
|
-
|
231
|
+
"\r\n",
|
232
|
+
file_descriptor,
|
233
|
+
file_encoding,
|
215
234
|
)
|
216
|
-
|
217
|
-
# f"ARRL-SECTION: {self.pref.get('section', '')}",
|
218
|
-
# end="\r\n",
|
219
|
-
# file=file_descriptor,
|
220
|
-
# )
|
221
|
-
print(
|
235
|
+
output_cabrillo_line(
|
222
236
|
f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
|
223
|
-
|
224
|
-
|
237
|
+
"\r\n",
|
238
|
+
file_descriptor,
|
239
|
+
file_encoding,
|
225
240
|
)
|
226
|
-
|
241
|
+
output_cabrillo_line(
|
227
242
|
f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
|
228
|
-
|
229
|
-
|
243
|
+
"\r\n",
|
244
|
+
file_descriptor,
|
245
|
+
file_encoding,
|
230
246
|
)
|
231
|
-
|
247
|
+
output_cabrillo_line(
|
232
248
|
f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
|
233
|
-
|
234
|
-
|
249
|
+
"\r\n",
|
250
|
+
file_descriptor,
|
251
|
+
file_encoding,
|
235
252
|
)
|
236
|
-
|
253
|
+
output_cabrillo_line(
|
237
254
|
f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
|
238
|
-
|
239
|
-
|
255
|
+
"\r\n",
|
256
|
+
file_descriptor,
|
257
|
+
file_encoding,
|
240
258
|
)
|
241
|
-
|
259
|
+
output_cabrillo_line(
|
242
260
|
f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
|
243
|
-
|
244
|
-
|
261
|
+
"\r\n",
|
262
|
+
file_descriptor,
|
263
|
+
file_encoding,
|
245
264
|
)
|
246
265
|
if self.contest_settings.get("OverlayCategory", "") != "N/A":
|
247
|
-
|
266
|
+
output_cabrillo_line(
|
248
267
|
f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
|
249
|
-
|
250
|
-
|
268
|
+
"\r\n",
|
269
|
+
file_descriptor,
|
270
|
+
file_encoding,
|
251
271
|
)
|
252
|
-
|
272
|
+
output_cabrillo_line(
|
253
273
|
f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
|
254
|
-
|
255
|
-
|
274
|
+
"\r\n",
|
275
|
+
file_descriptor,
|
276
|
+
file_encoding,
|
256
277
|
)
|
257
|
-
|
258
|
-
# f"CATEGORY: {None}",
|
259
|
-
# end="\r\n",
|
260
|
-
# file=file_descriptor,
|
261
|
-
# )
|
262
|
-
print(
|
278
|
+
output_cabrillo_line(
|
263
279
|
f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
|
264
|
-
|
265
|
-
|
280
|
+
"\r\n",
|
281
|
+
file_descriptor,
|
282
|
+
file_encoding,
|
266
283
|
)
|
267
284
|
|
268
|
-
|
285
|
+
output_cabrillo_line(
|
269
286
|
f"CLAIMED-SCORE: {calc_score(self)}",
|
270
|
-
|
271
|
-
|
287
|
+
"\r\n",
|
288
|
+
file_descriptor,
|
289
|
+
file_encoding,
|
272
290
|
)
|
273
291
|
ops = f"@{self.station.get('Call','')}"
|
274
292
|
list_of_ops = self.database.get_ops()
|
275
293
|
for op in list_of_ops:
|
276
294
|
ops += f", {op.get('Operator', '')}"
|
277
|
-
|
295
|
+
output_cabrillo_line(
|
278
296
|
f"OPERATORS: {ops}",
|
279
|
-
|
280
|
-
|
297
|
+
"\r\n",
|
298
|
+
file_descriptor,
|
299
|
+
file_encoding,
|
281
300
|
)
|
282
|
-
|
301
|
+
output_cabrillo_line(
|
283
302
|
f"NAME: {self.station.get('Name', '')}",
|
284
|
-
|
285
|
-
|
303
|
+
"\r\n",
|
304
|
+
file_descriptor,
|
305
|
+
file_encoding,
|
286
306
|
)
|
287
|
-
|
307
|
+
output_cabrillo_line(
|
288
308
|
f"ADDRESS: {self.station.get('Street1', '')}",
|
289
|
-
|
290
|
-
|
309
|
+
"\r\n",
|
310
|
+
file_descriptor,
|
311
|
+
file_encoding,
|
291
312
|
)
|
292
|
-
|
313
|
+
output_cabrillo_line(
|
293
314
|
f"ADDRESS-CITY: {self.station.get('City', '')}",
|
294
|
-
|
295
|
-
|
315
|
+
"\r\n",
|
316
|
+
file_descriptor,
|
317
|
+
file_encoding,
|
296
318
|
)
|
297
|
-
|
319
|
+
output_cabrillo_line(
|
298
320
|
f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
|
299
|
-
|
300
|
-
|
321
|
+
"\r\n",
|
322
|
+
file_descriptor,
|
323
|
+
file_encoding,
|
301
324
|
)
|
302
|
-
|
325
|
+
output_cabrillo_line(
|
303
326
|
f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
|
304
|
-
|
305
|
-
|
327
|
+
"\r\n",
|
328
|
+
file_descriptor,
|
329
|
+
file_encoding,
|
306
330
|
)
|
307
|
-
|
331
|
+
output_cabrillo_line(
|
308
332
|
f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
|
309
|
-
|
310
|
-
|
333
|
+
"\r\n",
|
334
|
+
file_descriptor,
|
335
|
+
file_encoding,
|
311
336
|
)
|
312
|
-
|
337
|
+
output_cabrillo_line(
|
313
338
|
f"EMAIL: {self.station.get('Email', '')}",
|
314
|
-
|
315
|
-
|
339
|
+
"\r\n",
|
340
|
+
file_descriptor,
|
341
|
+
file_encoding,
|
316
342
|
)
|
317
343
|
for contact in log:
|
318
344
|
the_date_and_time = contact.get("TS", "")
|
@@ -323,7 +349,7 @@ def cabrillo(self):
|
|
323
349
|
|
324
350
|
loggeddate = the_date_and_time[:10]
|
325
351
|
loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
|
326
|
-
|
352
|
+
output_cabrillo_line(
|
327
353
|
f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
|
328
354
|
f"{contact.get('StationPrefix', '').ljust(13)} "
|
329
355
|
f"{str(contact.get('SNT', '')).ljust(3)} "
|
@@ -331,10 +357,11 @@ def cabrillo(self):
|
|
331
357
|
f"{contact.get('Call', '').ljust(13)} "
|
332
358
|
f"{str(contact.get('RCV', '')).ljust(3)} "
|
333
359
|
f"{str(contact.get('NR', '')).ljust(6)}",
|
334
|
-
|
335
|
-
|
360
|
+
"\r\n",
|
361
|
+
file_descriptor,
|
362
|
+
file_encoding,
|
336
363
|
)
|
337
|
-
|
364
|
+
output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
|
338
365
|
self.show_message_box(f"Cabrillo saved to: {filename}")
|
339
366
|
except IOError as exception:
|
340
367
|
logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
|
@@ -168,7 +168,16 @@ def adif(self):
|
|
168
168
|
gen_adif(self, cabrillo_name)
|
169
169
|
|
170
170
|
|
171
|
-
def
|
171
|
+
def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
|
172
|
+
""""""
|
173
|
+
print(
|
174
|
+
line_to_output.encode(file_encoding, errors="ignore").decode(),
|
175
|
+
end=ending,
|
176
|
+
file=file_descriptor,
|
177
|
+
)
|
178
|
+
|
179
|
+
|
180
|
+
def cabrillo(self, file_encoding):
|
172
181
|
"""Generates Cabrillo file. Maybe."""
|
173
182
|
# https://www.cqwpx.com/cabrillo.htm
|
174
183
|
logger.debug("******Cabrillo*****")
|
@@ -185,133 +194,150 @@ def cabrillo(self):
|
|
185
194
|
log = self.database.fetch_all_contacts_asc()
|
186
195
|
try:
|
187
196
|
with open(filename, "w", encoding="utf-8") as file_descriptor:
|
188
|
-
|
189
|
-
|
197
|
+
output_cabrillo_line(
|
198
|
+
"START-OF-LOG: 3.0",
|
199
|
+
"\r\n",
|
200
|
+
file_descriptor,
|
201
|
+
file_encoding,
|
202
|
+
)
|
203
|
+
output_cabrillo_line(
|
190
204
|
f"CREATED-BY: Not1MM v{__version__}",
|
191
|
-
|
192
|
-
|
205
|
+
"\r\n",
|
206
|
+
file_descriptor,
|
207
|
+
file_encoding,
|
193
208
|
)
|
194
|
-
|
209
|
+
output_cabrillo_line(
|
195
210
|
f"CONTEST: {cabrillo_name}",
|
196
|
-
|
197
|
-
|
211
|
+
"\r\n",
|
212
|
+
file_descriptor,
|
213
|
+
file_encoding,
|
198
214
|
)
|
199
215
|
if self.station.get("Club", ""):
|
200
|
-
|
216
|
+
output_cabrillo_line(
|
201
217
|
f"CLUB: {self.station.get('Club', '').upper()}",
|
202
|
-
|
203
|
-
|
218
|
+
"\r\n",
|
219
|
+
file_descriptor,
|
220
|
+
file_encoding,
|
204
221
|
)
|
205
|
-
|
222
|
+
output_cabrillo_line(
|
206
223
|
f"CALLSIGN: {self.station.get('Call','')}",
|
207
|
-
|
208
|
-
|
224
|
+
"\r\n",
|
225
|
+
file_descriptor,
|
226
|
+
file_encoding,
|
209
227
|
)
|
210
|
-
|
228
|
+
output_cabrillo_line(
|
211
229
|
f"LOCATION: {self.station.get('ARRLSection', '')}",
|
212
|
-
|
213
|
-
|
230
|
+
"\r\n",
|
231
|
+
file_descriptor,
|
232
|
+
file_encoding,
|
214
233
|
)
|
215
|
-
|
216
|
-
# f"ARRL-SECTION: {self.pref.get('section', '')}",
|
217
|
-
# end="\r\n",
|
218
|
-
# file=file_descriptor,
|
219
|
-
# )
|
220
|
-
print(
|
234
|
+
output_cabrillo_line(
|
221
235
|
f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
|
222
|
-
|
223
|
-
|
236
|
+
"\r\n",
|
237
|
+
file_descriptor,
|
238
|
+
file_encoding,
|
224
239
|
)
|
225
|
-
|
240
|
+
output_cabrillo_line(
|
226
241
|
f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
|
227
|
-
|
228
|
-
|
242
|
+
"\r\n",
|
243
|
+
file_descriptor,
|
244
|
+
file_encoding,
|
229
245
|
)
|
230
|
-
|
246
|
+
output_cabrillo_line(
|
231
247
|
f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
|
232
|
-
|
233
|
-
|
248
|
+
"\r\n",
|
249
|
+
file_descriptor,
|
250
|
+
file_encoding,
|
234
251
|
)
|
235
|
-
|
252
|
+
output_cabrillo_line(
|
236
253
|
f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
|
237
|
-
|
238
|
-
|
254
|
+
"\r\n",
|
255
|
+
file_descriptor,
|
256
|
+
file_encoding,
|
239
257
|
)
|
240
|
-
|
258
|
+
output_cabrillo_line(
|
241
259
|
f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
|
242
|
-
|
243
|
-
|
260
|
+
"\r\n",
|
261
|
+
file_descriptor,
|
262
|
+
file_encoding,
|
244
263
|
)
|
245
264
|
if self.contest_settings.get("OverlayCategory", "") != "N/A":
|
246
|
-
|
265
|
+
output_cabrillo_line(
|
247
266
|
f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
|
248
|
-
|
249
|
-
|
267
|
+
"\r\n",
|
268
|
+
file_descriptor,
|
269
|
+
file_encoding,
|
250
270
|
)
|
251
|
-
|
271
|
+
output_cabrillo_line(
|
252
272
|
f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
|
253
|
-
|
254
|
-
|
273
|
+
"\r\n",
|
274
|
+
file_descriptor,
|
275
|
+
file_encoding,
|
255
276
|
)
|
256
|
-
|
257
|
-
# f"CATEGORY: {None}",
|
258
|
-
# end="\r\n",
|
259
|
-
# file=file_descriptor,
|
260
|
-
# )
|
261
|
-
print(
|
277
|
+
output_cabrillo_line(
|
262
278
|
f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
|
263
|
-
|
264
|
-
|
279
|
+
"\r\n",
|
280
|
+
file_descriptor,
|
281
|
+
file_encoding,
|
265
282
|
)
|
266
283
|
|
267
|
-
|
284
|
+
output_cabrillo_line(
|
268
285
|
f"CLAIMED-SCORE: {calc_score(self)}",
|
269
|
-
|
270
|
-
|
286
|
+
"\r\n",
|
287
|
+
file_descriptor,
|
288
|
+
file_encoding,
|
271
289
|
)
|
272
290
|
ops = f"@{self.station.get('Call','')}"
|
273
291
|
list_of_ops = self.database.get_ops()
|
274
292
|
for op in list_of_ops:
|
275
293
|
ops += f", {op.get('Operator', '')}"
|
276
|
-
|
294
|
+
output_cabrillo_line(
|
277
295
|
f"OPERATORS: {ops}",
|
278
|
-
|
279
|
-
|
296
|
+
"\r\n",
|
297
|
+
file_descriptor,
|
298
|
+
file_encoding,
|
280
299
|
)
|
281
|
-
|
300
|
+
output_cabrillo_line(
|
282
301
|
f"NAME: {self.station.get('Name', '')}",
|
283
|
-
|
284
|
-
|
302
|
+
"\r\n",
|
303
|
+
file_descriptor,
|
304
|
+
file_encoding,
|
285
305
|
)
|
286
|
-
|
306
|
+
output_cabrillo_line(
|
287
307
|
f"ADDRESS: {self.station.get('Street1', '')}",
|
288
|
-
|
289
|
-
|
308
|
+
"\r\n",
|
309
|
+
file_descriptor,
|
310
|
+
file_encoding,
|
290
311
|
)
|
291
|
-
|
312
|
+
output_cabrillo_line(
|
292
313
|
f"ADDRESS-CITY: {self.station.get('City', '')}",
|
293
|
-
|
294
|
-
|
314
|
+
"\r\n",
|
315
|
+
file_descriptor,
|
316
|
+
file_encoding,
|
295
317
|
)
|
296
|
-
|
318
|
+
output_cabrillo_line(
|
297
319
|
f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
|
298
|
-
|
299
|
-
|
320
|
+
"\r\n",
|
321
|
+
file_descriptor,
|
322
|
+
file_encoding,
|
300
323
|
)
|
301
|
-
|
324
|
+
output_cabrillo_line(
|
302
325
|
f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
|
303
|
-
|
304
|
-
|
326
|
+
"\r\n",
|
327
|
+
file_descriptor,
|
328
|
+
file_encoding,
|
305
329
|
)
|
306
|
-
|
330
|
+
output_cabrillo_line(
|
307
331
|
f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
|
308
|
-
|
309
|
-
|
332
|
+
"\r\n",
|
333
|
+
file_descriptor,
|
334
|
+
file_encoding,
|
310
335
|
)
|
311
|
-
|
336
|
+
output_cabrillo_line(
|
312
337
|
f"EMAIL: {self.station.get('Email', '')}",
|
313
|
-
|
314
|
-
|
338
|
+
"\r\n",
|
339
|
+
file_descriptor,
|
340
|
+
file_encoding,
|
315
341
|
)
|
316
342
|
for contact in log:
|
317
343
|
the_date_and_time = contact.get("TS", "")
|
@@ -322,7 +348,7 @@ def cabrillo(self):
|
|
322
348
|
|
323
349
|
loggeddate = the_date_and_time[:10]
|
324
350
|
loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
|
325
|
-
|
351
|
+
output_cabrillo_line(
|
326
352
|
f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
|
327
353
|
f"{contact.get('StationPrefix', '').ljust(13)} "
|
328
354
|
f"{str(contact.get('SNT', '')).ljust(3)} "
|
@@ -330,10 +356,11 @@ def cabrillo(self):
|
|
330
356
|
f"{contact.get('Call', '').ljust(13)} "
|
331
357
|
f"{str(contact.get('RCV', '')).ljust(3)} "
|
332
358
|
f"{str(contact.get('NR', '')).ljust(6)}",
|
333
|
-
|
334
|
-
|
359
|
+
"\r\n",
|
360
|
+
file_descriptor,
|
361
|
+
file_encoding,
|
335
362
|
)
|
336
|
-
|
363
|
+
output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
|
337
364
|
self.show_message_box(f"Cabrillo saved to: {filename}")
|
338
365
|
except IOError as exception:
|
339
366
|
logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
|