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