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
@@ -229,7 +229,16 @@ def adif(self):
229
229
  gen_adif(self, cabrillo_name, "CQ-WW-RTTY")
230
230
 
231
231
 
232
- def cabrillo(self):
232
+ def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
233
+ """"""
234
+ print(
235
+ line_to_output.encode(file_encoding, errors="ignore").decode(),
236
+ end=ending,
237
+ file=file_descriptor,
238
+ )
239
+
240
+
241
+ def cabrillo(self, file_encoding):
233
242
  """Generates Cabrillo file. Maybe."""
234
243
  # https://www.cqwpx.com/cabrillo.htm
235
244
  logger.debug("******Cabrillo*****")
@@ -246,123 +255,150 @@ def cabrillo(self):
246
255
  log = self.database.fetch_all_contacts_asc()
247
256
  try:
248
257
  with open(filename, "w", encoding="utf-8") as file_descriptor:
249
- print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
250
- print(
258
+ output_cabrillo_line(
259
+ "START-OF-LOG: 3.0",
260
+ "\r\n",
261
+ file_descriptor,
262
+ file_encoding,
263
+ )
264
+ output_cabrillo_line(
251
265
  f"CREATED-BY: Not1MM v{__version__}",
252
- end="\r\n",
253
- file=file_descriptor,
266
+ "\r\n",
267
+ file_descriptor,
268
+ file_encoding,
254
269
  )
255
- print(
270
+ output_cabrillo_line(
256
271
  f"CONTEST: {cabrillo_name}",
257
- end="\r\n",
258
- file=file_descriptor,
272
+ "\r\n",
273
+ file_descriptor,
274
+ file_encoding,
259
275
  )
260
276
  if self.station.get("Club", ""):
261
- print(
277
+ output_cabrillo_line(
262
278
  f"CLUB: {self.station.get('Club', '').upper()}",
263
- end="\r\n",
264
- file=file_descriptor,
279
+ "\r\n",
280
+ file_descriptor,
281
+ file_encoding,
265
282
  )
266
- print(
283
+ output_cabrillo_line(
267
284
  f"CALLSIGN: {self.station.get('Call','')}",
268
- end="\r\n",
269
- file=file_descriptor,
285
+ "\r\n",
286
+ file_descriptor,
287
+ file_encoding,
270
288
  )
271
- print(
289
+ output_cabrillo_line(
272
290
  f"LOCATION: {self.station.get('ARRLSection', '')}",
273
- end="\r\n",
274
- file=file_descriptor,
291
+ "\r\n",
292
+ file_descriptor,
293
+ file_encoding,
275
294
  )
276
- print(
295
+ output_cabrillo_line(
277
296
  f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
278
- end="\r\n",
279
- file=file_descriptor,
297
+ "\r\n",
298
+ file_descriptor,
299
+ file_encoding,
280
300
  )
281
- print(
301
+ output_cabrillo_line(
282
302
  f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
283
- end="\r\n",
284
- file=file_descriptor,
303
+ "\r\n",
304
+ file_descriptor,
305
+ file_encoding,
285
306
  )
286
- print(
307
+ output_cabrillo_line(
287
308
  f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
288
- end="\r\n",
289
- file=file_descriptor,
309
+ "\r\n",
310
+ file_descriptor,
311
+ file_encoding,
290
312
  )
291
- print(
313
+ output_cabrillo_line(
292
314
  f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
293
- end="\r\n",
294
- file=file_descriptor,
315
+ "\r\n",
316
+ file_descriptor,
317
+ file_encoding,
295
318
  )
296
- print(
319
+ output_cabrillo_line(
297
320
  f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
298
- end="\r\n",
299
- file=file_descriptor,
321
+ "\r\n",
322
+ file_descriptor,
323
+ file_encoding,
300
324
  )
301
325
  if self.contest_settings.get("OverlayCategory", "") != "N/A":
302
- print(
326
+ output_cabrillo_line(
303
327
  f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
304
- end="\r\n",
305
- file=file_descriptor,
328
+ "\r\n",
329
+ file_descriptor,
330
+ file_encoding,
306
331
  )
307
- print(
332
+ output_cabrillo_line(
308
333
  f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
309
- end="\r\n",
310
- file=file_descriptor,
334
+ "\r\n",
335
+ file_descriptor,
336
+ file_encoding,
311
337
  )
312
- print(
338
+ output_cabrillo_line(
313
339
  f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
314
- end="\r\n",
315
- file=file_descriptor,
340
+ "\r\n",
341
+ file_descriptor,
342
+ file_encoding,
316
343
  )
317
344
 
318
- print(
345
+ output_cabrillo_line(
319
346
  f"CLAIMED-SCORE: {calc_score(self)}",
320
- end="\r\n",
321
- file=file_descriptor,
347
+ "\r\n",
348
+ file_descriptor,
349
+ file_encoding,
322
350
  )
323
351
  ops = f"@{self.station.get('Call','')}"
324
352
  list_of_ops = self.database.get_ops()
325
353
  for op in list_of_ops:
326
354
  ops += f", {op.get('Operator', '')}"
327
- print(
355
+ output_cabrillo_line(
328
356
  f"OPERATORS: {ops}",
329
- end="\r\n",
330
- file=file_descriptor,
357
+ "\r\n",
358
+ file_descriptor,
359
+ file_encoding,
331
360
  )
332
- print(
361
+ output_cabrillo_line(
333
362
  f"NAME: {self.station.get('Name', '')}",
334
- end="\r\n",
335
- file=file_descriptor,
363
+ "\r\n",
364
+ file_descriptor,
365
+ file_encoding,
336
366
  )
337
- print(
367
+ output_cabrillo_line(
338
368
  f"ADDRESS: {self.station.get('Street1', '')}",
339
- end="\r\n",
340
- file=file_descriptor,
369
+ "\r\n",
370
+ file_descriptor,
371
+ file_encoding,
341
372
  )
342
- print(
373
+ output_cabrillo_line(
343
374
  f"ADDRESS-CITY: {self.station.get('City', '')}",
344
- end="\r\n",
345
- file=file_descriptor,
375
+ "\r\n",
376
+ file_descriptor,
377
+ file_encoding,
346
378
  )
347
- print(
379
+ output_cabrillo_line(
348
380
  f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
349
- end="\r\n",
350
- file=file_descriptor,
381
+ "\r\n",
382
+ file_descriptor,
383
+ file_encoding,
351
384
  )
352
- print(
385
+ output_cabrillo_line(
353
386
  f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
354
- end="\r\n",
355
- file=file_descriptor,
387
+ "\r\n",
388
+ file_descriptor,
389
+ file_encoding,
356
390
  )
357
- print(
391
+ output_cabrillo_line(
358
392
  f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
359
- end="\r\n",
360
- file=file_descriptor,
393
+ "\r\n",
394
+ file_descriptor,
395
+ file_encoding,
361
396
  )
362
- print(
397
+ output_cabrillo_line(
363
398
  f"EMAIL: {self.station.get('Email', '')}",
364
- end="\r\n",
365
- file=file_descriptor,
399
+ "\r\n",
400
+ file_descriptor,
401
+ file_encoding,
366
402
  )
367
403
  for contact in log:
368
404
  the_date_and_time = contact.get("TS", "")
@@ -390,19 +426,20 @@ def cabrillo(self):
390
426
 
391
427
  loggeddate = the_date_and_time[:10]
392
428
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
393
- print(
429
+ output_cabrillo_line(
394
430
  f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
395
431
  f"{contact.get('StationPrefix', '').ljust(13)} "
396
432
  f"{str(contact.get('SNT', '')).ljust(3)} "
397
433
  f"{str(contact.get('SentNr', '')).ljust(6)} "
398
434
  f"{contact.get('Call', '').ljust(13)} "
399
435
  f"{str(contact.get('RCV', '')).ljust(3)} "
400
- f"{str(contact.get('ZN', '')).zfill(2)}",
436
+ f"{str(contact.get('ZN', '')).zfill(2)}"
401
437
  f"{str(exchange1).ljust(2)}",
402
- end="\r\n",
403
- file=file_descriptor,
438
+ "\r\n",
439
+ file_descriptor,
440
+ file_encoding,
404
441
  )
405
- print("END-OF-LOG:", end="\r\n", file=file_descriptor)
442
+ output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
406
443
  self.show_message_box(f"Cabrillo saved to: {filename}")
407
444
  except IOError as exception:
408
445
  logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
@@ -205,7 +205,16 @@ def adif(self):
205
205
  gen_adif(self, cabrillo_name, "CQ-WW-SSB")
206
206
 
207
207
 
208
- def cabrillo(self):
208
+ def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
209
+ """"""
210
+ print(
211
+ line_to_output.encode(file_encoding, errors="ignore").decode(),
212
+ end=ending,
213
+ file=file_descriptor,
214
+ )
215
+
216
+
217
+ def cabrillo(self, file_encoding):
209
218
  """Generates Cabrillo file. Maybe."""
210
219
  # https://www.cqwpx.com/cabrillo.htm
211
220
  logger.debug("******Cabrillo*****")
@@ -222,133 +231,150 @@ def cabrillo(self):
222
231
  log = self.database.fetch_all_contacts_asc()
223
232
  try:
224
233
  with open(filename, "w", encoding="utf-8") as file_descriptor:
225
- print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
226
- print(
234
+ output_cabrillo_line(
235
+ "START-OF-LOG: 3.0",
236
+ "\r\n",
237
+ file_descriptor,
238
+ file_encoding,
239
+ )
240
+ output_cabrillo_line(
227
241
  f"CREATED-BY: Not1MM v{__version__}",
228
- end="\r\n",
229
- file=file_descriptor,
242
+ "\r\n",
243
+ file_descriptor,
244
+ file_encoding,
230
245
  )
231
- print(
246
+ output_cabrillo_line(
232
247
  f"CONTEST: {cabrillo_name}",
233
- end="\r\n",
234
- file=file_descriptor,
248
+ "\r\n",
249
+ file_descriptor,
250
+ file_encoding,
235
251
  )
236
252
  if self.station.get("Club", ""):
237
- print(
253
+ output_cabrillo_line(
238
254
  f"CLUB: {self.station.get('Club', '').upper()}",
239
- end="\r\n",
240
- file=file_descriptor,
255
+ "\r\n",
256
+ file_descriptor,
257
+ file_encoding,
241
258
  )
242
- print(
259
+ output_cabrillo_line(
243
260
  f"CALLSIGN: {self.station.get('Call','')}",
244
- end="\r\n",
245
- file=file_descriptor,
261
+ "\r\n",
262
+ file_descriptor,
263
+ file_encoding,
246
264
  )
247
- print(
265
+ output_cabrillo_line(
248
266
  f"LOCATION: {self.station.get('ARRLSection', '')}",
249
- end="\r\n",
250
- file=file_descriptor,
267
+ "\r\n",
268
+ file_descriptor,
269
+ file_encoding,
251
270
  )
252
- # print(
253
- # f"ARRL-SECTION: {self.pref.get('section', '')}",
254
- # end="\r\n",
255
- # file=file_descriptor,
256
- # )
257
- print(
271
+ output_cabrillo_line(
258
272
  f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
259
- end="\r\n",
260
- file=file_descriptor,
273
+ "\r\n",
274
+ file_descriptor,
275
+ file_encoding,
261
276
  )
262
- print(
277
+ output_cabrillo_line(
263
278
  f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
264
- end="\r\n",
265
- file=file_descriptor,
279
+ "\r\n",
280
+ file_descriptor,
281
+ file_encoding,
266
282
  )
267
- print(
283
+ output_cabrillo_line(
268
284
  f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
269
- end="\r\n",
270
- file=file_descriptor,
285
+ "\r\n",
286
+ file_descriptor,
287
+ file_encoding,
271
288
  )
272
- print(
289
+ output_cabrillo_line(
273
290
  f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
274
- end="\r\n",
275
- file=file_descriptor,
291
+ "\r\n",
292
+ file_descriptor,
293
+ file_encoding,
276
294
  )
277
- print(
295
+ output_cabrillo_line(
278
296
  f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
279
- end="\r\n",
280
- file=file_descriptor,
297
+ "\r\n",
298
+ file_descriptor,
299
+ file_encoding,
281
300
  )
282
301
  if self.contest_settings.get("OverlayCategory", "") != "N/A":
283
- print(
302
+ output_cabrillo_line(
284
303
  f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
285
- end="\r\n",
286
- file=file_descriptor,
304
+ "\r\n",
305
+ file_descriptor,
306
+ file_encoding,
287
307
  )
288
- print(
308
+ output_cabrillo_line(
289
309
  f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
290
- end="\r\n",
291
- file=file_descriptor,
310
+ "\r\n",
311
+ file_descriptor,
312
+ file_encoding,
292
313
  )
293
- # print(
294
- # f"CATEGORY: {None}",
295
- # end="\r\n",
296
- # file=file_descriptor,
297
- # )
298
- print(
314
+ output_cabrillo_line(
299
315
  f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
300
- end="\r\n",
301
- file=file_descriptor,
316
+ "\r\n",
317
+ file_descriptor,
318
+ file_encoding,
302
319
  )
303
320
 
304
- print(
321
+ output_cabrillo_line(
305
322
  f"CLAIMED-SCORE: {calc_score(self)}",
306
- end="\r\n",
307
- file=file_descriptor,
323
+ "\r\n",
324
+ file_descriptor,
325
+ file_encoding,
308
326
  )
309
327
  ops = f"@{self.station.get('Call','')}"
310
328
  list_of_ops = self.database.get_ops()
311
329
  for op in list_of_ops:
312
330
  ops += f", {op.get('Operator', '')}"
313
- print(
331
+ output_cabrillo_line(
314
332
  f"OPERATORS: {ops}",
315
- end="\r\n",
316
- file=file_descriptor,
333
+ "\r\n",
334
+ file_descriptor,
335
+ file_encoding,
317
336
  )
318
- print(
337
+ output_cabrillo_line(
319
338
  f"NAME: {self.station.get('Name', '')}",
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"ADDRESS: {self.station.get('Street1', '')}",
325
- end="\r\n",
326
- file=file_descriptor,
345
+ "\r\n",
346
+ file_descriptor,
347
+ file_encoding,
327
348
  )
328
- print(
349
+ output_cabrillo_line(
329
350
  f"ADDRESS-CITY: {self.station.get('City', '')}",
330
- end="\r\n",
331
- file=file_descriptor,
351
+ "\r\n",
352
+ file_descriptor,
353
+ file_encoding,
332
354
  )
333
- print(
355
+ output_cabrillo_line(
334
356
  f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
335
- end="\r\n",
336
- file=file_descriptor,
357
+ "\r\n",
358
+ file_descriptor,
359
+ file_encoding,
337
360
  )
338
- print(
361
+ output_cabrillo_line(
339
362
  f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
340
- end="\r\n",
341
- file=file_descriptor,
363
+ "\r\n",
364
+ file_descriptor,
365
+ file_encoding,
342
366
  )
343
- print(
367
+ output_cabrillo_line(
344
368
  f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
345
- end="\r\n",
346
- file=file_descriptor,
369
+ "\r\n",
370
+ file_descriptor,
371
+ file_encoding,
347
372
  )
348
- print(
373
+ output_cabrillo_line(
349
374
  f"EMAIL: {self.station.get('Email', '')}",
350
- end="\r\n",
351
- file=file_descriptor,
375
+ "\r\n",
376
+ file_descriptor,
377
+ file_encoding,
352
378
  )
353
379
  for contact in log:
354
380
  the_date_and_time = contact.get("TS", "")
@@ -359,7 +385,7 @@ def cabrillo(self):
359
385
 
360
386
  loggeddate = the_date_and_time[:10]
361
387
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
362
- print(
388
+ output_cabrillo_line(
363
389
  f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
364
390
  f"{contact.get('StationPrefix', '').ljust(13)} "
365
391
  f"{str(contact.get('SNT', '')).ljust(3)} "
@@ -367,10 +393,11 @@ def cabrillo(self):
367
393
  f"{contact.get('Call', '').ljust(13)} "
368
394
  f"{str(contact.get('RCV', '')).ljust(3)} "
369
395
  f"{str(contact.get('ZN', '')).ljust(6)}",
370
- end="\r\n",
371
- file=file_descriptor,
396
+ "\r\n",
397
+ file_descriptor,
398
+ file_encoding,
372
399
  )
373
- print("END-OF-LOG:", end="\r\n", file=file_descriptor)
400
+ output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
374
401
  self.show_message_box(f"Cabrillo saved to: {filename}")
375
402
  except IOError as exception:
376
403
  logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)