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.
Files changed (51) hide show
  1. not1mm/__main__.py +9 -3
  2. not1mm/bandmap.py +6 -1
  3. not1mm/data/main.ui +23 -3
  4. not1mm/lib/version.py +1 -1
  5. not1mm/plugins/10_10_fall_cw.py +109 -82
  6. not1mm/plugins/10_10_spring_cw.py +109 -82
  7. not1mm/plugins/10_10_summer_phone.py +109 -82
  8. not1mm/plugins/10_10_winter_phone.py +109 -82
  9. not1mm/plugins/arrl_10m.py +109 -82
  10. not1mm/plugins/arrl_dx_cw.py +109 -82
  11. not1mm/plugins/arrl_dx_ssb.py +109 -82
  12. not1mm/plugins/arrl_field_day.py +109 -82
  13. not1mm/plugins/arrl_ss_cw.py +109 -82
  14. not1mm/plugins/arrl_ss_phone.py +109 -82
  15. not1mm/plugins/arrl_vhf_jan.py +109 -82
  16. not1mm/plugins/arrl_vhf_jun.py +109 -82
  17. not1mm/plugins/arrl_vhf_sep.py +109 -82
  18. not1mm/plugins/canada_day.py +109 -82
  19. not1mm/plugins/cq_160_cw.py +109 -74
  20. not1mm/plugins/cq_160_ssb.py +109 -74
  21. not1mm/plugins/cq_wpx_cw.py +109 -82
  22. not1mm/plugins/cq_wpx_rtty.py +109 -82
  23. not1mm/plugins/cq_wpx_ssb.py +109 -82
  24. not1mm/plugins/cq_ww_cw.py +115 -83
  25. not1mm/plugins/cq_ww_rtty.py +110 -73
  26. not1mm/plugins/cq_ww_ssb.py +109 -82
  27. not1mm/plugins/cwt.py +109 -82
  28. not1mm/plugins/general_logging.py +1 -1
  29. not1mm/plugins/helvetia.py +109 -82
  30. not1mm/plugins/iaru_fieldday_r1_cw.py +109 -82
  31. not1mm/plugins/iaru_fieldday_r1_ssb.py +109 -82
  32. not1mm/plugins/iaru_hf.py +109 -82
  33. not1mm/plugins/icwc_mst.py +109 -82
  34. not1mm/plugins/jidx_cw.py +74 -48
  35. not1mm/plugins/jidx_ph.py +74 -48
  36. not1mm/plugins/k1usn_sst.py +109 -82
  37. not1mm/plugins/naqp_cw.py +109 -82
  38. not1mm/plugins/naqp_rtty.py +109 -82
  39. not1mm/plugins/naqp_ssb.py +109 -82
  40. not1mm/plugins/phone_weekly_test.py +109 -82
  41. not1mm/plugins/ref_cw.py +109 -82
  42. not1mm/plugins/ref_ssb.py +109 -82
  43. not1mm/plugins/stew_perry_topband.py +109 -82
  44. not1mm/plugins/weekly_rtty.py +109 -82
  45. not1mm/plugins/winter_field_day.py +109 -82
  46. {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/METADATA +3 -1
  47. {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/RECORD +51 -51
  48. {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/LICENSE +0 -0
  49. {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/WHEEL +0 -0
  50. {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/entry_points.txt +0 -0
  51. {not1mm-24.10.24.1.dist-info → not1mm-24.10.26.dist-info}/top_level.txt +0 -0
@@ -241,7 +241,16 @@ def adif(self):
241
241
  gen_adif(self, cabrillo_name, "CQ-WPX-CW")
242
242
 
243
243
 
244
- def cabrillo(self):
244
+ def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
245
+ """"""
246
+ print(
247
+ line_to_output.encode(file_encoding, errors="ignore").decode(),
248
+ end=ending,
249
+ file=file_descriptor,
250
+ )
251
+
252
+
253
+ def cabrillo(self, file_encoding):
245
254
  """Generates Cabrillo file. Maybe."""
246
255
  # https://www.cqwpx.com/cabrillo.htm
247
256
  logger.debug("******Cabrillo*****")
@@ -258,133 +267,150 @@ def cabrillo(self):
258
267
  log = self.database.fetch_all_contacts_asc()
259
268
  try:
260
269
  with open(filename, "w", encoding="utf-8") as file_descriptor:
261
- print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
262
- print(
270
+ output_cabrillo_line(
271
+ "START-OF-LOG: 3.0",
272
+ "\r\n",
273
+ file_descriptor,
274
+ file_encoding,
275
+ )
276
+ output_cabrillo_line(
263
277
  f"CREATED-BY: Not1MM v{__version__}",
264
- end="\r\n",
265
- file=file_descriptor,
278
+ "\r\n",
279
+ file_descriptor,
280
+ file_encoding,
266
281
  )
267
- print(
282
+ output_cabrillo_line(
268
283
  f"CONTEST: {cabrillo_name}",
269
- end="\r\n",
270
- file=file_descriptor,
284
+ "\r\n",
285
+ file_descriptor,
286
+ file_encoding,
271
287
  )
272
288
  if self.station.get("Club", ""):
273
- print(
289
+ output_cabrillo_line(
274
290
  f"CLUB: {self.station.get('Club', '').upper()}",
275
- end="\r\n",
276
- file=file_descriptor,
291
+ "\r\n",
292
+ file_descriptor,
293
+ file_encoding,
277
294
  )
278
- print(
295
+ output_cabrillo_line(
279
296
  f"CALLSIGN: {self.station.get('Call','')}",
280
- end="\r\n",
281
- file=file_descriptor,
297
+ "\r\n",
298
+ file_descriptor,
299
+ file_encoding,
282
300
  )
283
- print(
301
+ output_cabrillo_line(
284
302
  f"LOCATION: {self.station.get('ARRLSection', '')}",
285
- end="\r\n",
286
- file=file_descriptor,
303
+ "\r\n",
304
+ file_descriptor,
305
+ file_encoding,
287
306
  )
288
- # print(
289
- # f"ARRL-SECTION: {self.pref.get('section', '')}",
290
- # end="\r\n",
291
- # file=file_descriptor,
292
- # )
293
- print(
307
+ output_cabrillo_line(
294
308
  f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
295
- end="\r\n",
296
- file=file_descriptor,
309
+ "\r\n",
310
+ file_descriptor,
311
+ file_encoding,
297
312
  )
298
- print(
313
+ output_cabrillo_line(
299
314
  f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
300
- end="\r\n",
301
- file=file_descriptor,
315
+ "\r\n",
316
+ file_descriptor,
317
+ file_encoding,
302
318
  )
303
- print(
319
+ output_cabrillo_line(
304
320
  f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
305
- end="\r\n",
306
- file=file_descriptor,
321
+ "\r\n",
322
+ file_descriptor,
323
+ file_encoding,
307
324
  )
308
- print(
325
+ output_cabrillo_line(
309
326
  f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
310
- end="\r\n",
311
- file=file_descriptor,
327
+ "\r\n",
328
+ file_descriptor,
329
+ file_encoding,
312
330
  )
313
- print(
331
+ output_cabrillo_line(
314
332
  f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
315
- end="\r\n",
316
- file=file_descriptor,
333
+ "\r\n",
334
+ file_descriptor,
335
+ file_encoding,
317
336
  )
318
337
  if self.contest_settings.get("OverlayCategory", "") != "N/A":
319
- print(
338
+ output_cabrillo_line(
320
339
  f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
321
- end="\r\n",
322
- file=file_descriptor,
340
+ "\r\n",
341
+ file_descriptor,
342
+ file_encoding,
323
343
  )
324
- print(
344
+ output_cabrillo_line(
325
345
  f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
326
- end="\r\n",
327
- file=file_descriptor,
346
+ "\r\n",
347
+ file_descriptor,
348
+ file_encoding,
328
349
  )
329
- # print(
330
- # f"CATEGORY: {None}",
331
- # end="\r\n",
332
- # file=file_descriptor,
333
- # )
334
- print(
350
+ output_cabrillo_line(
335
351
  f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
336
- end="\r\n",
337
- file=file_descriptor,
352
+ "\r\n",
353
+ file_descriptor,
354
+ file_encoding,
338
355
  )
339
356
 
340
- print(
357
+ output_cabrillo_line(
341
358
  f"CLAIMED-SCORE: {calc_score(self)}",
342
- end="\r\n",
343
- file=file_descriptor,
359
+ "\r\n",
360
+ file_descriptor,
361
+ file_encoding,
344
362
  )
345
363
  ops = f"@{self.station.get('Call','')}"
346
364
  list_of_ops = self.database.get_ops()
347
365
  for op in list_of_ops:
348
366
  ops += f", {op.get('Operator', '')}"
349
- print(
367
+ output_cabrillo_line(
350
368
  f"OPERATORS: {ops}",
351
- end="\r\n",
352
- file=file_descriptor,
369
+ "\r\n",
370
+ file_descriptor,
371
+ file_encoding,
353
372
  )
354
- print(
373
+ output_cabrillo_line(
355
374
  f"NAME: {self.station.get('Name', '')}",
356
- end="\r\n",
357
- file=file_descriptor,
375
+ "\r\n",
376
+ file_descriptor,
377
+ file_encoding,
358
378
  )
359
- print(
379
+ output_cabrillo_line(
360
380
  f"ADDRESS: {self.station.get('Street1', '')}",
361
- end="\r\n",
362
- file=file_descriptor,
381
+ "\r\n",
382
+ file_descriptor,
383
+ file_encoding,
363
384
  )
364
- print(
385
+ output_cabrillo_line(
365
386
  f"ADDRESS-CITY: {self.station.get('City', '')}",
366
- end="\r\n",
367
- file=file_descriptor,
387
+ "\r\n",
388
+ file_descriptor,
389
+ file_encoding,
368
390
  )
369
- print(
391
+ output_cabrillo_line(
370
392
  f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
371
- end="\r\n",
372
- file=file_descriptor,
393
+ "\r\n",
394
+ file_descriptor,
395
+ file_encoding,
373
396
  )
374
- print(
397
+ output_cabrillo_line(
375
398
  f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
376
- end="\r\n",
377
- file=file_descriptor,
399
+ "\r\n",
400
+ file_descriptor,
401
+ file_encoding,
378
402
  )
379
- print(
403
+ output_cabrillo_line(
380
404
  f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
381
- end="\r\n",
382
- file=file_descriptor,
405
+ "\r\n",
406
+ file_descriptor,
407
+ file_encoding,
383
408
  )
384
- print(
409
+ output_cabrillo_line(
385
410
  f"EMAIL: {self.station.get('Email', '')}",
386
- end="\r\n",
387
- file=file_descriptor,
411
+ "\r\n",
412
+ file_descriptor,
413
+ file_encoding,
388
414
  )
389
415
  for contact in log:
390
416
  the_date_and_time = contact.get("TS", "")
@@ -395,7 +421,7 @@ def cabrillo(self):
395
421
 
396
422
  loggeddate = the_date_and_time[:10]
397
423
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
398
- print(
424
+ output_cabrillo_line(
399
425
  f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
400
426
  f"{contact.get('StationPrefix', '').ljust(13)} "
401
427
  f"{str(contact.get('SNT', '')).ljust(3)} "
@@ -403,10 +429,11 @@ def cabrillo(self):
403
429
  f"{contact.get('Call', '').ljust(13)} "
404
430
  f"{str(contact.get('RCV', '')).ljust(3)} "
405
431
  f"{str(contact.get('NR', '')).ljust(6)}",
406
- end="\r\n",
407
- file=file_descriptor,
432
+ "\r\n",
433
+ file_descriptor,
434
+ file_encoding,
408
435
  )
409
- print("END-OF-LOG:", end="\r\n", file=file_descriptor)
436
+ output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
410
437
  self.show_message_box(f"Cabrillo saved to: {filename}")
411
438
  except IOError as exception:
412
439
  logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
@@ -240,7 +240,16 @@ def adif(self):
240
240
  gen_adif(self, cabrillo_name, "CQ-WPX-RTTY")
241
241
 
242
242
 
243
- def cabrillo(self):
243
+ def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
244
+ """"""
245
+ print(
246
+ line_to_output.encode(file_encoding, errors="ignore").decode(),
247
+ end=ending,
248
+ file=file_descriptor,
249
+ )
250
+
251
+
252
+ def cabrillo(self, file_encoding):
244
253
  """Generates Cabrillo file. Maybe."""
245
254
  # https://www.cqwpx.com/cabrillo.htm
246
255
  logger.debug("******Cabrillo*****")
@@ -257,133 +266,150 @@ def cabrillo(self):
257
266
  log = self.database.fetch_all_contacts_asc()
258
267
  try:
259
268
  with open(filename, "w", encoding="utf-8") as file_descriptor:
260
- print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
261
- print(
269
+ output_cabrillo_line(
270
+ "START-OF-LOG: 3.0",
271
+ "\r\n",
272
+ file_descriptor,
273
+ file_encoding,
274
+ )
275
+ output_cabrillo_line(
262
276
  f"CREATED-BY: Not1MM v{__version__}",
263
- end="\r\n",
264
- file=file_descriptor,
277
+ "\r\n",
278
+ file_descriptor,
279
+ file_encoding,
265
280
  )
266
- print(
281
+ output_cabrillo_line(
267
282
  f"CONTEST: {cabrillo_name}",
268
- end="\r\n",
269
- file=file_descriptor,
283
+ "\r\n",
284
+ file_descriptor,
285
+ file_encoding,
270
286
  )
271
287
  if self.station.get("Club", ""):
272
- print(
288
+ output_cabrillo_line(
273
289
  f"CLUB: {self.station.get('Club', '').upper()}",
274
- end="\r\n",
275
- file=file_descriptor,
290
+ "\r\n",
291
+ file_descriptor,
292
+ file_encoding,
276
293
  )
277
- print(
294
+ output_cabrillo_line(
278
295
  f"CALLSIGN: {self.station.get('Call','')}",
279
- end="\r\n",
280
- file=file_descriptor,
296
+ "\r\n",
297
+ file_descriptor,
298
+ file_encoding,
281
299
  )
282
- print(
300
+ output_cabrillo_line(
283
301
  f"LOCATION: {self.station.get('ARRLSection', '')}",
284
- end="\r\n",
285
- file=file_descriptor,
302
+ "\r\n",
303
+ file_descriptor,
304
+ file_encoding,
286
305
  )
287
- # print(
288
- # f"ARRL-SECTION: {self.pref.get('section', '')}",
289
- # end="\r\n",
290
- # file=file_descriptor,
291
- # )
292
- print(
306
+ output_cabrillo_line(
293
307
  f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
294
- end="\r\n",
295
- file=file_descriptor,
308
+ "\r\n",
309
+ file_descriptor,
310
+ file_encoding,
296
311
  )
297
- print(
312
+ output_cabrillo_line(
298
313
  f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
299
- end="\r\n",
300
- file=file_descriptor,
314
+ "\r\n",
315
+ file_descriptor,
316
+ file_encoding,
301
317
  )
302
- print(
318
+ output_cabrillo_line(
303
319
  f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
304
- end="\r\n",
305
- file=file_descriptor,
320
+ "\r\n",
321
+ file_descriptor,
322
+ file_encoding,
306
323
  )
307
- print(
324
+ output_cabrillo_line(
308
325
  f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
309
- end="\r\n",
310
- file=file_descriptor,
326
+ "\r\n",
327
+ file_descriptor,
328
+ file_encoding,
311
329
  )
312
- print(
330
+ output_cabrillo_line(
313
331
  f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
314
- end="\r\n",
315
- file=file_descriptor,
332
+ "\r\n",
333
+ file_descriptor,
334
+ file_encoding,
316
335
  )
317
336
  if self.contest_settings.get("OverlayCategory", "") != "N/A":
318
- print(
337
+ output_cabrillo_line(
319
338
  f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
320
- end="\r\n",
321
- file=file_descriptor,
339
+ "\r\n",
340
+ file_descriptor,
341
+ file_encoding,
322
342
  )
323
- print(
343
+ output_cabrillo_line(
324
344
  f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
325
- end="\r\n",
326
- file=file_descriptor,
345
+ "\r\n",
346
+ file_descriptor,
347
+ file_encoding,
327
348
  )
328
- # print(
329
- # f"CATEGORY: {None}",
330
- # end="\r\n",
331
- # file=file_descriptor,
332
- # )
333
- print(
349
+ output_cabrillo_line(
334
350
  f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
335
- end="\r\n",
336
- file=file_descriptor,
351
+ "\r\n",
352
+ file_descriptor,
353
+ file_encoding,
337
354
  )
338
355
 
339
- print(
356
+ output_cabrillo_line(
340
357
  f"CLAIMED-SCORE: {calc_score(self)}",
341
- end="\r\n",
342
- file=file_descriptor,
358
+ "\r\n",
359
+ file_descriptor,
360
+ file_encoding,
343
361
  )
344
362
  ops = f"@{self.station.get('Call','')}"
345
363
  list_of_ops = self.database.get_ops()
346
364
  for op in list_of_ops:
347
365
  ops += f", {op.get('Operator', '')}"
348
- print(
366
+ output_cabrillo_line(
349
367
  f"OPERATORS: {ops}",
350
- end="\r\n",
351
- file=file_descriptor,
368
+ "\r\n",
369
+ file_descriptor,
370
+ file_encoding,
352
371
  )
353
- print(
372
+ output_cabrillo_line(
354
373
  f"NAME: {self.station.get('Name', '')}",
355
- end="\r\n",
356
- file=file_descriptor,
374
+ "\r\n",
375
+ file_descriptor,
376
+ file_encoding,
357
377
  )
358
- print(
378
+ output_cabrillo_line(
359
379
  f"ADDRESS: {self.station.get('Street1', '')}",
360
- end="\r\n",
361
- file=file_descriptor,
380
+ "\r\n",
381
+ file_descriptor,
382
+ file_encoding,
362
383
  )
363
- print(
384
+ output_cabrillo_line(
364
385
  f"ADDRESS-CITY: {self.station.get('City', '')}",
365
- end="\r\n",
366
- file=file_descriptor,
386
+ "\r\n",
387
+ file_descriptor,
388
+ file_encoding,
367
389
  )
368
- print(
390
+ output_cabrillo_line(
369
391
  f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
370
- end="\r\n",
371
- file=file_descriptor,
392
+ "\r\n",
393
+ file_descriptor,
394
+ file_encoding,
372
395
  )
373
- print(
396
+ output_cabrillo_line(
374
397
  f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
375
- end="\r\n",
376
- file=file_descriptor,
398
+ "\r\n",
399
+ file_descriptor,
400
+ file_encoding,
377
401
  )
378
- print(
402
+ output_cabrillo_line(
379
403
  f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
380
- end="\r\n",
381
- file=file_descriptor,
404
+ "\r\n",
405
+ file_descriptor,
406
+ file_encoding,
382
407
  )
383
- print(
408
+ output_cabrillo_line(
384
409
  f"EMAIL: {self.station.get('Email', '')}",
385
- end="\r\n",
386
- file=file_descriptor,
410
+ "\r\n",
411
+ file_descriptor,
412
+ file_encoding,
387
413
  )
388
414
  for contact in log:
389
415
  the_date_and_time = contact.get("TS", "")
@@ -394,7 +420,7 @@ def cabrillo(self):
394
420
 
395
421
  loggeddate = the_date_and_time[:10]
396
422
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
397
- print(
423
+ output_cabrillo_line(
398
424
  f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
399
425
  f"{contact.get('StationPrefix', '').ljust(13)} "
400
426
  f"{str(contact.get('SNT', '')).ljust(3)} "
@@ -402,10 +428,11 @@ def cabrillo(self):
402
428
  f"{contact.get('Call', '').ljust(13)} "
403
429
  f"{str(contact.get('RCV', '')).ljust(3)} "
404
430
  f"{str(contact.get('NR', '')).ljust(6)}",
405
- end="\r\n",
406
- file=file_descriptor,
431
+ "\r\n",
432
+ file_descriptor,
433
+ file_encoding,
407
434
  )
408
- print("END-OF-LOG:", end="\r\n", file=file_descriptor)
435
+ output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
409
436
  self.show_message_box(f"Cabrillo saved to: {filename}")
410
437
  except IOError as exception:
411
438
  logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)