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
not1mm/plugins/ref_cw.py CHANGED
@@ -329,7 +329,16 @@ def adif(self):
329
329
  gen_adif(self, cabrillo_name, "REF-CW")
330
330
 
331
331
 
332
- def cabrillo(self):
332
+ def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
333
+ """"""
334
+ print(
335
+ line_to_output.encode(file_encoding, errors="ignore").decode(),
336
+ end=ending,
337
+ file=file_descriptor,
338
+ )
339
+
340
+
341
+ def cabrillo(self, file_encoding):
333
342
  """Generates Cabrillo file. Maybe."""
334
343
  # https://www.cqwpx.com/cabrillo.htm
335
344
  logger.debug("******Cabrillo*****")
@@ -346,133 +355,150 @@ def cabrillo(self):
346
355
  log = self.database.fetch_all_contacts_asc()
347
356
  try:
348
357
  with open(filename, "w", encoding="utf-8") as file_descriptor:
349
- print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
350
- print(
358
+ output_cabrillo_line(
359
+ "START-OF-LOG: 3.0",
360
+ "\r\n",
361
+ file_descriptor,
362
+ file_encoding,
363
+ )
364
+ output_cabrillo_line(
351
365
  f"CREATED-BY: Not1MM v{__version__}",
352
- end="\r\n",
353
- file=file_descriptor,
366
+ "\r\n",
367
+ file_descriptor,
368
+ file_encoding,
354
369
  )
355
- print(
370
+ output_cabrillo_line(
356
371
  f"CONTEST: {cabrillo_name}",
357
- end="\r\n",
358
- file=file_descriptor,
372
+ "\r\n",
373
+ file_descriptor,
374
+ file_encoding,
359
375
  )
360
376
  if self.station.get("Club", ""):
361
- print(
377
+ output_cabrillo_line(
362
378
  f"CLUB: {self.station.get('Club', '').upper()}",
363
- end="\r\n",
364
- file=file_descriptor,
379
+ "\r\n",
380
+ file_descriptor,
381
+ file_encoding,
365
382
  )
366
- print(
383
+ output_cabrillo_line(
367
384
  f"CALLSIGN: {self.station.get('Call','')}",
368
- end="\r\n",
369
- file=file_descriptor,
385
+ "\r\n",
386
+ file_descriptor,
387
+ file_encoding,
370
388
  )
371
- print(
389
+ output_cabrillo_line(
372
390
  f"LOCATION: {self.station.get('ARRLSection', '')}",
373
- end="\r\n",
374
- file=file_descriptor,
391
+ "\r\n",
392
+ file_descriptor,
393
+ file_encoding,
375
394
  )
376
- # print(
377
- # f"ARRL-SECTION: {self.pref.get('section', '')}",
378
- # end="\r\n",
379
- # file=file_descriptor,
380
- # )
381
- print(
395
+ output_cabrillo_line(
382
396
  f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
383
- end="\r\n",
384
- file=file_descriptor,
397
+ "\r\n",
398
+ file_descriptor,
399
+ file_encoding,
385
400
  )
386
- print(
401
+ output_cabrillo_line(
387
402
  f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
388
- end="\r\n",
389
- file=file_descriptor,
403
+ "\r\n",
404
+ file_descriptor,
405
+ file_encoding,
390
406
  )
391
- print(
407
+ output_cabrillo_line(
392
408
  f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
393
- end="\r\n",
394
- file=file_descriptor,
409
+ "\r\n",
410
+ file_descriptor,
411
+ file_encoding,
395
412
  )
396
- print(
413
+ output_cabrillo_line(
397
414
  f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
398
- end="\r\n",
399
- file=file_descriptor,
415
+ "\r\n",
416
+ file_descriptor,
417
+ file_encoding,
400
418
  )
401
- print(
419
+ output_cabrillo_line(
402
420
  f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
403
- end="\r\n",
404
- file=file_descriptor,
421
+ "\r\n",
422
+ file_descriptor,
423
+ file_encoding,
405
424
  )
406
425
  if self.contest_settings.get("OverlayCategory", "") != "N/A":
407
- print(
426
+ output_cabrillo_line(
408
427
  f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
409
- end="\r\n",
410
- file=file_descriptor,
428
+ "\r\n",
429
+ file_descriptor,
430
+ file_encoding,
411
431
  )
412
- print(
432
+ output_cabrillo_line(
413
433
  f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
414
- end="\r\n",
415
- file=file_descriptor,
434
+ "\r\n",
435
+ file_descriptor,
436
+ file_encoding,
416
437
  )
417
- # print(
418
- # f"CATEGORY: {None}",
419
- # end="\r\n",
420
- # file=file_descriptor,
421
- # )
422
- print(
438
+ output_cabrillo_line(
423
439
  f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
424
- end="\r\n",
425
- file=file_descriptor,
440
+ "\r\n",
441
+ file_descriptor,
442
+ file_encoding,
426
443
  )
427
444
 
428
- print(
445
+ output_cabrillo_line(
429
446
  f"CLAIMED-SCORE: {calc_score(self)}",
430
- end="\r\n",
431
- file=file_descriptor,
447
+ "\r\n",
448
+ file_descriptor,
449
+ file_encoding,
432
450
  )
433
451
  ops = f"@{self.station.get('Call','')}"
434
452
  list_of_ops = self.database.get_ops()
435
453
  for op in list_of_ops:
436
454
  ops += f", {op.get('Operator', '')}"
437
- print(
455
+ output_cabrillo_line(
438
456
  f"OPERATORS: {ops}",
439
- end="\r\n",
440
- file=file_descriptor,
457
+ "\r\n",
458
+ file_descriptor,
459
+ file_encoding,
441
460
  )
442
- print(
461
+ output_cabrillo_line(
443
462
  f"NAME: {self.station.get('Name', '')}",
444
- end="\r\n",
445
- file=file_descriptor,
463
+ "\r\n",
464
+ file_descriptor,
465
+ file_encoding,
446
466
  )
447
- print(
467
+ output_cabrillo_line(
448
468
  f"ADDRESS: {self.station.get('Street1', '')}",
449
- end="\r\n",
450
- file=file_descriptor,
469
+ "\r\n",
470
+ file_descriptor,
471
+ file_encoding,
451
472
  )
452
- print(
473
+ output_cabrillo_line(
453
474
  f"ADDRESS-CITY: {self.station.get('City', '')}",
454
- end="\r\n",
455
- file=file_descriptor,
475
+ "\r\n",
476
+ file_descriptor,
477
+ file_encoding,
456
478
  )
457
- print(
479
+ output_cabrillo_line(
458
480
  f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
459
- end="\r\n",
460
- file=file_descriptor,
481
+ "\r\n",
482
+ file_descriptor,
483
+ file_encoding,
461
484
  )
462
- print(
485
+ output_cabrillo_line(
463
486
  f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
464
- end="\r\n",
465
- file=file_descriptor,
487
+ "\r\n",
488
+ file_descriptor,
489
+ file_encoding,
466
490
  )
467
- print(
491
+ output_cabrillo_line(
468
492
  f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
469
- end="\r\n",
470
- file=file_descriptor,
493
+ "\r\n",
494
+ file_descriptor,
495
+ file_encoding,
471
496
  )
472
- print(
497
+ output_cabrillo_line(
473
498
  f"EMAIL: {self.station.get('Email', '')}",
474
- end="\r\n",
475
- file=file_descriptor,
499
+ "\r\n",
500
+ file_descriptor,
501
+ file_encoding,
476
502
  )
477
503
  for contact in log:
478
504
  the_date_and_time = contact.get("TS", "")
@@ -483,7 +509,7 @@ def cabrillo(self):
483
509
 
484
510
  loggeddate = the_date_and_time[:10]
485
511
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
486
- print(
512
+ output_cabrillo_line(
487
513
  f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
488
514
  f"{contact.get('StationPrefix', '').ljust(13)} "
489
515
  f"{str(contact.get('SNT', '')).ljust(3)} "
@@ -491,10 +517,11 @@ def cabrillo(self):
491
517
  f"{contact.get('Call', '').ljust(13)} "
492
518
  f"{str(contact.get('RCV', '')).ljust(3)} "
493
519
  f"{str(contact.get('NR', '')).ljust(6)}",
494
- end="\r\n",
495
- file=file_descriptor,
520
+ "\r\n",
521
+ file_descriptor,
522
+ file_encoding,
496
523
  )
497
- print("END-OF-LOG:", end="\r\n", file=file_descriptor)
524
+ output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
498
525
  self.show_message_box(f"Cabrillo saved to: {filename}")
499
526
  except IOError as exception:
500
527
  logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
not1mm/plugins/ref_ssb.py CHANGED
@@ -329,7 +329,16 @@ def adif(self):
329
329
  gen_adif(self, cabrillo_name, "REF-SSB")
330
330
 
331
331
 
332
- def cabrillo(self):
332
+ def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
333
+ """"""
334
+ print(
335
+ line_to_output.encode(file_encoding, errors="ignore").decode(),
336
+ end=ending,
337
+ file=file_descriptor,
338
+ )
339
+
340
+
341
+ def cabrillo(self, file_encoding):
333
342
  """Generates Cabrillo file. Maybe."""
334
343
  # https://www.cqwpx.com/cabrillo.htm
335
344
  logger.debug("******Cabrillo*****")
@@ -346,133 +355,150 @@ def cabrillo(self):
346
355
  log = self.database.fetch_all_contacts_asc()
347
356
  try:
348
357
  with open(filename, "w", encoding="utf-8") as file_descriptor:
349
- print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
350
- print(
358
+ output_cabrillo_line(
359
+ "START-OF-LOG: 3.0",
360
+ "\r\n",
361
+ file_descriptor,
362
+ file_encoding,
363
+ )
364
+ output_cabrillo_line(
351
365
  f"CREATED-BY: Not1MM v{__version__}",
352
- end="\r\n",
353
- file=file_descriptor,
366
+ "\r\n",
367
+ file_descriptor,
368
+ file_encoding,
354
369
  )
355
- print(
370
+ output_cabrillo_line(
356
371
  f"CONTEST: {cabrillo_name}",
357
- end="\r\n",
358
- file=file_descriptor,
372
+ "\r\n",
373
+ file_descriptor,
374
+ file_encoding,
359
375
  )
360
376
  if self.station.get("Club", ""):
361
- print(
377
+ output_cabrillo_line(
362
378
  f"CLUB: {self.station.get('Club', '').upper()}",
363
- end="\r\n",
364
- file=file_descriptor,
379
+ "\r\n",
380
+ file_descriptor,
381
+ file_encoding,
365
382
  )
366
- print(
383
+ output_cabrillo_line(
367
384
  f"CALLSIGN: {self.station.get('Call','')}",
368
- end="\r\n",
369
- file=file_descriptor,
385
+ "\r\n",
386
+ file_descriptor,
387
+ file_encoding,
370
388
  )
371
- print(
389
+ output_cabrillo_line(
372
390
  f"LOCATION: {self.station.get('ARRLSection', '')}",
373
- end="\r\n",
374
- file=file_descriptor,
391
+ "\r\n",
392
+ file_descriptor,
393
+ file_encoding,
375
394
  )
376
- # print(
377
- # f"ARRL-SECTION: {self.pref.get('section', '')}",
378
- # end="\r\n",
379
- # file=file_descriptor,
380
- # )
381
- print(
395
+ output_cabrillo_line(
382
396
  f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
383
- end="\r\n",
384
- file=file_descriptor,
397
+ "\r\n",
398
+ file_descriptor,
399
+ file_encoding,
385
400
  )
386
- print(
401
+ output_cabrillo_line(
387
402
  f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
388
- end="\r\n",
389
- file=file_descriptor,
403
+ "\r\n",
404
+ file_descriptor,
405
+ file_encoding,
390
406
  )
391
- print(
407
+ output_cabrillo_line(
392
408
  f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
393
- end="\r\n",
394
- file=file_descriptor,
409
+ "\r\n",
410
+ file_descriptor,
411
+ file_encoding,
395
412
  )
396
- print(
413
+ output_cabrillo_line(
397
414
  f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
398
- end="\r\n",
399
- file=file_descriptor,
415
+ "\r\n",
416
+ file_descriptor,
417
+ file_encoding,
400
418
  )
401
- print(
419
+ output_cabrillo_line(
402
420
  f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
403
- end="\r\n",
404
- file=file_descriptor,
421
+ "\r\n",
422
+ file_descriptor,
423
+ file_encoding,
405
424
  )
406
425
  if self.contest_settings.get("OverlayCategory", "") != "N/A":
407
- print(
426
+ output_cabrillo_line(
408
427
  f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
409
- end="\r\n",
410
- file=file_descriptor,
428
+ "\r\n",
429
+ file_descriptor,
430
+ file_encoding,
411
431
  )
412
- print(
432
+ output_cabrillo_line(
413
433
  f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
414
- end="\r\n",
415
- file=file_descriptor,
434
+ "\r\n",
435
+ file_descriptor,
436
+ file_encoding,
416
437
  )
417
- # print(
418
- # f"CATEGORY: {None}",
419
- # end="\r\n",
420
- # file=file_descriptor,
421
- # )
422
- print(
438
+ output_cabrillo_line(
423
439
  f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
424
- end="\r\n",
425
- file=file_descriptor,
440
+ "\r\n",
441
+ file_descriptor,
442
+ file_encoding,
426
443
  )
427
444
 
428
- print(
445
+ output_cabrillo_line(
429
446
  f"CLAIMED-SCORE: {calc_score(self)}",
430
- end="\r\n",
431
- file=file_descriptor,
447
+ "\r\n",
448
+ file_descriptor,
449
+ file_encoding,
432
450
  )
433
451
  ops = f"@{self.station.get('Call','')}"
434
452
  list_of_ops = self.database.get_ops()
435
453
  for op in list_of_ops:
436
454
  ops += f", {op.get('Operator', '')}"
437
- print(
455
+ output_cabrillo_line(
438
456
  f"OPERATORS: {ops}",
439
- end="\r\n",
440
- file=file_descriptor,
457
+ "\r\n",
458
+ file_descriptor,
459
+ file_encoding,
441
460
  )
442
- print(
461
+ output_cabrillo_line(
443
462
  f"NAME: {self.station.get('Name', '')}",
444
- end="\r\n",
445
- file=file_descriptor,
463
+ "\r\n",
464
+ file_descriptor,
465
+ file_encoding,
446
466
  )
447
- print(
467
+ output_cabrillo_line(
448
468
  f"ADDRESS: {self.station.get('Street1', '')}",
449
- end="\r\n",
450
- file=file_descriptor,
469
+ "\r\n",
470
+ file_descriptor,
471
+ file_encoding,
451
472
  )
452
- print(
473
+ output_cabrillo_line(
453
474
  f"ADDRESS-CITY: {self.station.get('City', '')}",
454
- end="\r\n",
455
- file=file_descriptor,
475
+ "\r\n",
476
+ file_descriptor,
477
+ file_encoding,
456
478
  )
457
- print(
479
+ output_cabrillo_line(
458
480
  f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
459
- end="\r\n",
460
- file=file_descriptor,
481
+ "\r\n",
482
+ file_descriptor,
483
+ file_encoding,
461
484
  )
462
- print(
485
+ output_cabrillo_line(
463
486
  f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
464
- end="\r\n",
465
- file=file_descriptor,
487
+ "\r\n",
488
+ file_descriptor,
489
+ file_encoding,
466
490
  )
467
- print(
491
+ output_cabrillo_line(
468
492
  f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
469
- end="\r\n",
470
- file=file_descriptor,
493
+ "\r\n",
494
+ file_descriptor,
495
+ file_encoding,
471
496
  )
472
- print(
497
+ output_cabrillo_line(
473
498
  f"EMAIL: {self.station.get('Email', '')}",
474
- end="\r\n",
475
- file=file_descriptor,
499
+ "\r\n",
500
+ file_descriptor,
501
+ file_encoding,
476
502
  )
477
503
  for contact in log:
478
504
  the_date_and_time = contact.get("TS", "")
@@ -483,7 +509,7 @@ def cabrillo(self):
483
509
 
484
510
  loggeddate = the_date_and_time[:10]
485
511
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
486
- print(
512
+ output_cabrillo_line(
487
513
  f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
488
514
  f"{contact.get('StationPrefix', '').ljust(13)} "
489
515
  f"{str(contact.get('SNT', '')).ljust(3)} "
@@ -491,10 +517,11 @@ def cabrillo(self):
491
517
  f"{contact.get('Call', '').ljust(13)} "
492
518
  f"{str(contact.get('RCV', '')).ljust(3)} "
493
519
  f"{str(contact.get('NR', '')).ljust(6)}",
494
- end="\r\n",
495
- file=file_descriptor,
520
+ "\r\n",
521
+ file_descriptor,
522
+ file_encoding,
496
523
  )
497
- print("END-OF-LOG:", end="\r\n", file=file_descriptor)
524
+ output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
498
525
  self.show_message_box(f"Cabrillo saved to: {filename}")
499
526
  except IOError as exception:
500
527
  logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)