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/plugins/jidx_cw.py
CHANGED
@@ -211,7 +211,16 @@ def adif(self):
|
|
211
211
|
gen_adif(self, cabrillo_name, "JIDX-CW")
|
212
212
|
|
213
213
|
|
214
|
-
def
|
214
|
+
def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
|
215
|
+
""""""
|
216
|
+
print(
|
217
|
+
line_to_output.encode(file_encoding, errors="ignore").decode(),
|
218
|
+
end=ending,
|
219
|
+
file=file_descriptor,
|
220
|
+
)
|
221
|
+
|
222
|
+
|
223
|
+
def cabrillo(self, file_encoding):
|
215
224
|
"""Generates Cabrillo file. Maybe."""
|
216
225
|
# https://www.cqwpx.com/cabrillo.htm
|
217
226
|
logger.debug("******Cabrillo*****")
|
@@ -264,83 +273,99 @@ def cabrillo(self):
|
|
264
273
|
log = self.database.fetch_all_contacts_asc()
|
265
274
|
try:
|
266
275
|
with open(filename, "w", encoding="utf-8") as file_descriptor:
|
267
|
-
|
276
|
+
output_cabrillo_line(
|
277
|
+
"START-OF-LOG: 2.0", "\r\n", file_descriptor, file_encoding
|
278
|
+
)
|
268
279
|
|
269
|
-
|
280
|
+
output_cabrillo_line(
|
270
281
|
f"CONTEST: {cabrillo_name}",
|
271
|
-
|
272
|
-
|
282
|
+
"\r\n",
|
283
|
+
file_descriptor,
|
284
|
+
file_encoding,
|
273
285
|
)
|
274
286
|
if self.station.get("Club", ""):
|
275
|
-
|
287
|
+
output_cabrillo_line(
|
276
288
|
f"CLUB: {self.station.get('Club', '').upper()}",
|
277
|
-
|
278
|
-
|
289
|
+
"\r\n",
|
290
|
+
file_descriptor,
|
291
|
+
file_encoding,
|
279
292
|
)
|
280
|
-
|
293
|
+
output_cabrillo_line(
|
281
294
|
f"CALLSIGN: {self.station.get('Call','')}",
|
282
|
-
|
283
|
-
|
295
|
+
"\r\n",
|
296
|
+
file_descriptor,
|
297
|
+
file_encoding,
|
284
298
|
)
|
285
|
-
|
299
|
+
output_cabrillo_line(
|
286
300
|
f"CATEGORY: {category}",
|
287
|
-
|
288
|
-
|
301
|
+
"\r\n",
|
302
|
+
file_descriptor,
|
303
|
+
file_encoding,
|
289
304
|
)
|
290
|
-
|
305
|
+
output_cabrillo_line(
|
291
306
|
f"CLAIMED-SCORE: {calc_score(self)} ({qsos}-{raw_points}-{mults})",
|
292
|
-
|
293
|
-
|
307
|
+
"\r\n",
|
308
|
+
file_descriptor,
|
309
|
+
file_encoding,
|
294
310
|
)
|
295
311
|
ops = f"@{self.station.get('Call','')}"
|
296
312
|
list_of_ops = self.database.get_ops()
|
297
313
|
for op in list_of_ops:
|
298
314
|
ops += f", {op.get('Operator', '')}"
|
299
|
-
|
315
|
+
output_cabrillo_line(
|
300
316
|
f"OPERATORS: {ops}",
|
301
|
-
|
302
|
-
|
317
|
+
"\r\n",
|
318
|
+
file_descriptor,
|
319
|
+
file_encoding,
|
303
320
|
)
|
304
|
-
|
321
|
+
output_cabrillo_line(
|
305
322
|
f"CREATED-BY: Not1MM v{__version__}",
|
306
|
-
|
307
|
-
|
323
|
+
"\r\n",
|
324
|
+
file_descriptor,
|
325
|
+
file_encoding,
|
308
326
|
)
|
309
|
-
|
327
|
+
output_cabrillo_line(
|
310
328
|
f"ENTITY: {mycountry}",
|
311
|
-
|
312
|
-
|
329
|
+
"\r\n",
|
330
|
+
file_descriptor,
|
331
|
+
file_encoding,
|
313
332
|
)
|
314
|
-
|
333
|
+
output_cabrillo_line(
|
315
334
|
f"NAME: {self.station.get('Name', '')}",
|
316
|
-
|
317
|
-
|
335
|
+
"\r\n",
|
336
|
+
file_descriptor,
|
337
|
+
file_encoding,
|
318
338
|
)
|
319
|
-
|
339
|
+
output_cabrillo_line(
|
320
340
|
f"ADDRESS: {self.station.get('Street1', '')}",
|
321
|
-
|
322
|
-
|
341
|
+
"\r\n",
|
342
|
+
file_descriptor,
|
343
|
+
file_encoding,
|
323
344
|
)
|
324
|
-
|
345
|
+
output_cabrillo_line(
|
325
346
|
f"ADDRESS: {self.station.get('City', '')}, {self.station.get('State', '')} ",
|
326
347
|
f"{self.station.get('Zip', '')}",
|
327
|
-
|
328
|
-
|
348
|
+
"\r\n",
|
349
|
+
file_descriptor,
|
350
|
+
file_encoding,
|
329
351
|
)
|
330
|
-
|
352
|
+
output_cabrillo_line(
|
331
353
|
f"ADDRESS: {self.station.get('Country', '')}",
|
332
|
-
|
333
|
-
|
354
|
+
"\r\n",
|
355
|
+
file_descriptor,
|
356
|
+
file_encoding,
|
334
357
|
)
|
335
|
-
|
358
|
+
output_cabrillo_line(
|
336
359
|
f"EMAIL: {self.station.get('Email', '')}",
|
337
|
-
|
338
|
-
|
360
|
+
"\r\n",
|
361
|
+
file_descriptor,
|
362
|
+
file_encoding,
|
339
363
|
)
|
340
|
-
|
364
|
+
output_cabrillo_line(
|
341
365
|
f'SENTNR: {self.contest_settings.get("SentExchange", "")}',
|
342
|
-
|
343
|
-
|
366
|
+
"\r\n",
|
367
|
+
file_descriptor,
|
368
|
+
file_encoding,
|
344
369
|
)
|
345
370
|
for contact in log:
|
346
371
|
the_date_and_time = contact.get("TS", "")
|
@@ -351,7 +376,7 @@ def cabrillo(self):
|
|
351
376
|
|
352
377
|
loggeddate = the_date_and_time[:10]
|
353
378
|
loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
|
354
|
-
|
379
|
+
output_cabrillo_line(
|
355
380
|
f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
|
356
381
|
f"{contact.get('StationPrefix', '').ljust(13)} "
|
357
382
|
f"{str(contact.get('SNT', '')).ljust(3)} "
|
@@ -359,10 +384,11 @@ def cabrillo(self):
|
|
359
384
|
f"{contact.get('Call', '').ljust(13)} "
|
360
385
|
f"{str(contact.get('RCV', '')).ljust(3)} "
|
361
386
|
f"{str(contact.get('NR', '')).ljust(6)}",
|
362
|
-
|
363
|
-
|
387
|
+
"\r\n",
|
388
|
+
file_descriptor,
|
389
|
+
file_encoding,
|
364
390
|
)
|
365
|
-
|
391
|
+
output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
|
366
392
|
self.show_message_box(f"Cabrillo saved to: {filename}")
|
367
393
|
except IOError as exception:
|
368
394
|
logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
|
not1mm/plugins/jidx_ph.py
CHANGED
@@ -182,7 +182,16 @@ def adif(self):
|
|
182
182
|
gen_adif(self, cabrillo_name, "JIDX-SSB")
|
183
183
|
|
184
184
|
|
185
|
-
def
|
185
|
+
def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
|
186
|
+
""""""
|
187
|
+
print(
|
188
|
+
line_to_output.encode(file_encoding, errors="ignore").decode(),
|
189
|
+
end=ending,
|
190
|
+
file=file_descriptor,
|
191
|
+
)
|
192
|
+
|
193
|
+
|
194
|
+
def cabrillo(self, file_encoding):
|
186
195
|
"""Generates Cabrillo file. Maybe."""
|
187
196
|
# https://www.cqwpx.com/cabrillo.htm
|
188
197
|
logger.debug("******Cabrillo*****")
|
@@ -235,83 +244,99 @@ def cabrillo(self):
|
|
235
244
|
log = self.database.fetch_all_contacts_asc()
|
236
245
|
try:
|
237
246
|
with open(filename, "w", encoding="utf-8") as file_descriptor:
|
238
|
-
|
247
|
+
output_cabrillo_line(
|
248
|
+
"START-OF-LOG: 2.0", "\r\n", file_descriptor, file_encoding
|
249
|
+
)
|
239
250
|
|
240
|
-
|
251
|
+
output_cabrillo_line(
|
241
252
|
f"CONTEST: {cabrillo_name}",
|
242
|
-
|
243
|
-
|
253
|
+
"\r\n",
|
254
|
+
file_descriptor,
|
255
|
+
file_encoding,
|
244
256
|
)
|
245
257
|
if self.station.get("Club", ""):
|
246
|
-
|
258
|
+
output_cabrillo_line(
|
247
259
|
f"CLUB: {self.station.get('Club', '').upper()}",
|
248
|
-
|
249
|
-
|
260
|
+
"\r\n",
|
261
|
+
file_descriptor,
|
262
|
+
file_encoding,
|
250
263
|
)
|
251
|
-
|
264
|
+
output_cabrillo_line(
|
252
265
|
f"CALLSIGN: {self.station.get('Call','')}",
|
253
|
-
|
254
|
-
|
266
|
+
"\r\n",
|
267
|
+
file_descriptor,
|
268
|
+
file_encoding,
|
255
269
|
)
|
256
|
-
|
270
|
+
output_cabrillo_line(
|
257
271
|
f"CATEGORY: {category}",
|
258
|
-
|
259
|
-
|
272
|
+
"\r\n",
|
273
|
+
file_descriptor,
|
274
|
+
file_encoding,
|
260
275
|
)
|
261
|
-
|
276
|
+
output_cabrillo_line(
|
262
277
|
f"CLAIMED-SCORE: {calc_score(self)} ({qsos}-{raw_points}-{mults})",
|
263
|
-
|
264
|
-
|
278
|
+
"\r\n",
|
279
|
+
file_descriptor,
|
280
|
+
file_encoding,
|
265
281
|
)
|
266
282
|
ops = f"@{self.station.get('Call','')}"
|
267
283
|
list_of_ops = self.database.get_ops()
|
268
284
|
for op in list_of_ops:
|
269
285
|
ops += f", {op.get('Operator', '')}"
|
270
|
-
|
286
|
+
output_cabrillo_line(
|
271
287
|
f"OPERATORS: {ops}",
|
272
|
-
|
273
|
-
|
288
|
+
"\r\n",
|
289
|
+
file_descriptor,
|
290
|
+
file_encoding,
|
274
291
|
)
|
275
|
-
|
292
|
+
output_cabrillo_line(
|
276
293
|
f"CREATED-BY: Not1MM v{__version__}",
|
277
|
-
|
278
|
-
|
294
|
+
"\r\n",
|
295
|
+
file_descriptor,
|
296
|
+
file_encoding,
|
279
297
|
)
|
280
|
-
|
298
|
+
output_cabrillo_line(
|
281
299
|
f"ENTITY: {mycountry}",
|
282
|
-
|
283
|
-
|
300
|
+
"\r\n",
|
301
|
+
file_descriptor,
|
302
|
+
file_encoding,
|
284
303
|
)
|
285
|
-
|
304
|
+
output_cabrillo_line(
|
286
305
|
f"NAME: {self.station.get('Name', '')}",
|
287
|
-
|
288
|
-
|
306
|
+
"\r\n",
|
307
|
+
file_descriptor,
|
308
|
+
file_encoding,
|
289
309
|
)
|
290
|
-
|
310
|
+
output_cabrillo_line(
|
291
311
|
f"ADDRESS: {self.station.get('Street1', '')}",
|
292
|
-
|
293
|
-
|
312
|
+
"\r\n",
|
313
|
+
file_descriptor,
|
314
|
+
file_encoding,
|
294
315
|
)
|
295
|
-
|
316
|
+
output_cabrillo_line(
|
296
317
|
f"ADDRESS: {self.station.get('City', '')}, {self.station.get('State', '')} ",
|
297
318
|
f"{self.station.get('Zip', '')}",
|
298
|
-
|
299
|
-
|
319
|
+
"\r\n",
|
320
|
+
file_descriptor,
|
321
|
+
file_encoding,
|
300
322
|
)
|
301
|
-
|
323
|
+
output_cabrillo_line(
|
302
324
|
f"ADDRESS: {self.station.get('Country', '')}",
|
303
|
-
|
304
|
-
|
325
|
+
"\r\n",
|
326
|
+
file_descriptor,
|
327
|
+
file_encoding,
|
305
328
|
)
|
306
|
-
|
329
|
+
output_cabrillo_line(
|
307
330
|
f"EMAIL: {self.station.get('Email', '')}",
|
308
|
-
|
309
|
-
|
331
|
+
"\r\n",
|
332
|
+
file_descriptor,
|
333
|
+
file_encoding,
|
310
334
|
)
|
311
|
-
|
335
|
+
output_cabrillo_line(
|
312
336
|
f'SENTNR: {self.contest_settings.get("SentExchange", "")}',
|
313
|
-
|
314
|
-
|
337
|
+
"\r\n",
|
338
|
+
file_descriptor,
|
339
|
+
file_encoding,
|
315
340
|
)
|
316
341
|
for contact in log:
|
317
342
|
the_date_and_time = contact.get("TS", "")
|
@@ -322,7 +347,7 @@ def cabrillo(self):
|
|
322
347
|
|
323
348
|
loggeddate = the_date_and_time[:10]
|
324
349
|
loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
|
325
|
-
|
350
|
+
output_cabrillo_line(
|
326
351
|
f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
|
327
352
|
f"{contact.get('StationPrefix', '').ljust(13)} "
|
328
353
|
f"{str(contact.get('SNT', '')).ljust(3)} "
|
@@ -330,10 +355,11 @@ def cabrillo(self):
|
|
330
355
|
f"{contact.get('Call', '').ljust(13)} "
|
331
356
|
f"{str(contact.get('RCV', '')).ljust(3)} "
|
332
357
|
f"{str(contact.get('NR', '')).ljust(6)}",
|
333
|
-
|
334
|
-
|
358
|
+
"\r\n",
|
359
|
+
file_descriptor,
|
360
|
+
file_encoding,
|
335
361
|
)
|
336
|
-
|
362
|
+
output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
|
337
363
|
self.show_message_box(f"Cabrillo saved to: {filename}")
|
338
364
|
except IOError as exception:
|
339
365
|
logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
|
not1mm/plugins/k1usn_sst.py
CHANGED
@@ -168,7 +168,16 @@ def adif(self):
|
|
168
168
|
gen_adif(self, cabrillo_name, "K1USN-SST")
|
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,17 +348,18 @@ 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('SentNr', '')).upper()} "
|
329
355
|
f"{contact.get('Call', '').ljust(13)} "
|
330
356
|
f"{str(contact.get('Name', '')).ljust(11)} "
|
331
357
|
f"{str(contact.get('Sect', '')).ljust(5)}",
|
332
|
-
|
333
|
-
|
358
|
+
"\r\n",
|
359
|
+
file_descriptor,
|
360
|
+
file_encoding,
|
334
361
|
)
|
335
|
-
|
362
|
+
output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
|
336
363
|
self.show_message_box(f"Cabrillo saved to: {filename}")
|
337
364
|
except IOError as exception:
|
338
365
|
logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
|