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
@@ -181,7 +181,16 @@ def adif(self):
181
181
  gen_adif(self, cabrillo_name, "ARRL-SS-CW")
182
182
 
183
183
 
184
- def cabrillo(self):
184
+ def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
185
+ """"""
186
+ print(
187
+ line_to_output.encode(file_encoding, errors="ignore").decode(),
188
+ end=ending,
189
+ file=file_descriptor,
190
+ )
191
+
192
+
193
+ def cabrillo(self, file_encoding):
185
194
  """Generates Cabrillo file. Maybe."""
186
195
  # https://www.cqwpx.com/cabrillo.htm
187
196
  logger.debug("******Cabrillo*****")
@@ -198,133 +207,150 @@ def cabrillo(self):
198
207
  log = self.database.fetch_all_contacts_asc()
199
208
  try:
200
209
  with open(filename, "w", encoding="utf-8") as file_descriptor:
201
- print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
202
- print(
210
+ output_cabrillo_line(
211
+ "START-OF-LOG: 3.0",
212
+ "\r\n",
213
+ file_descriptor,
214
+ file_encoding,
215
+ )
216
+ output_cabrillo_line(
203
217
  f"CREATED-BY: Not1MM v{__version__}",
204
- end="\r\n",
205
- file=file_descriptor,
218
+ "\r\n",
219
+ file_descriptor,
220
+ file_encoding,
206
221
  )
207
- print(
222
+ output_cabrillo_line(
208
223
  f"CONTEST: {cabrillo_name}",
209
- end="\r\n",
210
- file=file_descriptor,
224
+ "\r\n",
225
+ file_descriptor,
226
+ file_encoding,
211
227
  )
212
228
  if self.station.get("Club", ""):
213
- print(
229
+ output_cabrillo_line(
214
230
  f"CLUB: {self.station.get('Club', '').upper()}",
215
- end="\r\n",
216
- file=file_descriptor,
231
+ "\r\n",
232
+ file_descriptor,
233
+ file_encoding,
217
234
  )
218
- print(
235
+ output_cabrillo_line(
219
236
  f"CALLSIGN: {self.station.get('Call','')}",
220
- end="\r\n",
221
- file=file_descriptor,
237
+ "\r\n",
238
+ file_descriptor,
239
+ file_encoding,
222
240
  )
223
- print(
241
+ output_cabrillo_line(
224
242
  f"LOCATION: {self.station.get('ARRLSection', '')}",
225
- end="\r\n",
226
- file=file_descriptor,
243
+ "\r\n",
244
+ file_descriptor,
245
+ file_encoding,
227
246
  )
228
- # print(
229
- # f"ARRL-SECTION: {self.pref.get('section', '')}",
230
- # end="\r\n",
231
- # file=file_descriptor,
232
- # )
233
- print(
247
+ output_cabrillo_line(
234
248
  f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
235
- end="\r\n",
236
- file=file_descriptor,
249
+ "\r\n",
250
+ file_descriptor,
251
+ file_encoding,
237
252
  )
238
- print(
253
+ output_cabrillo_line(
239
254
  f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
240
- end="\r\n",
241
- file=file_descriptor,
255
+ "\r\n",
256
+ file_descriptor,
257
+ file_encoding,
242
258
  )
243
- print(
259
+ output_cabrillo_line(
244
260
  f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
245
- end="\r\n",
246
- file=file_descriptor,
261
+ "\r\n",
262
+ file_descriptor,
263
+ file_encoding,
247
264
  )
248
- print(
265
+ output_cabrillo_line(
249
266
  f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
250
- end="\r\n",
251
- file=file_descriptor,
267
+ "\r\n",
268
+ file_descriptor,
269
+ file_encoding,
252
270
  )
253
- print(
271
+ output_cabrillo_line(
254
272
  f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
255
- end="\r\n",
256
- file=file_descriptor,
273
+ "\r\n",
274
+ file_descriptor,
275
+ file_encoding,
257
276
  )
258
277
  if self.contest_settings.get("OverlayCategory", "") != "N/A":
259
- print(
278
+ output_cabrillo_line(
260
279
  f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
261
- end="\r\n",
262
- file=file_descriptor,
280
+ "\r\n",
281
+ file_descriptor,
282
+ file_encoding,
263
283
  )
264
- print(
284
+ output_cabrillo_line(
265
285
  f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
266
- end="\r\n",
267
- file=file_descriptor,
286
+ "\r\n",
287
+ file_descriptor,
288
+ file_encoding,
268
289
  )
269
- # print(
270
- # f"CATEGORY: {None}",
271
- # end="\r\n",
272
- # file=file_descriptor,
273
- # )
274
- print(
290
+ output_cabrillo_line(
275
291
  f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
276
- end="\r\n",
277
- file=file_descriptor,
292
+ "\r\n",
293
+ file_descriptor,
294
+ file_encoding,
278
295
  )
279
296
 
280
- print(
297
+ output_cabrillo_line(
281
298
  f"CLAIMED-SCORE: {calc_score(self)}",
282
- end="\r\n",
283
- file=file_descriptor,
299
+ "\r\n",
300
+ file_descriptor,
301
+ file_encoding,
284
302
  )
285
303
  ops = f"@{self.station.get('Call','')}"
286
304
  list_of_ops = self.database.get_ops()
287
305
  for op in list_of_ops:
288
306
  ops += f", {op.get('Operator', '')}"
289
- print(
307
+ output_cabrillo_line(
290
308
  f"OPERATORS: {ops}",
291
- end="\r\n",
292
- file=file_descriptor,
309
+ "\r\n",
310
+ file_descriptor,
311
+ file_encoding,
293
312
  )
294
- print(
313
+ output_cabrillo_line(
295
314
  f"NAME: {self.station.get('Name', '')}",
296
- end="\r\n",
297
- file=file_descriptor,
315
+ "\r\n",
316
+ file_descriptor,
317
+ file_encoding,
298
318
  )
299
- print(
319
+ output_cabrillo_line(
300
320
  f"ADDRESS: {self.station.get('Street1', '')}",
301
- end="\r\n",
302
- file=file_descriptor,
321
+ "\r\n",
322
+ file_descriptor,
323
+ file_encoding,
303
324
  )
304
- print(
325
+ output_cabrillo_line(
305
326
  f"ADDRESS-CITY: {self.station.get('City', '')}",
306
- end="\r\n",
307
- file=file_descriptor,
327
+ "\r\n",
328
+ file_descriptor,
329
+ file_encoding,
308
330
  )
309
- print(
331
+ output_cabrillo_line(
310
332
  f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
311
- end="\r\n",
312
- file=file_descriptor,
333
+ "\r\n",
334
+ file_descriptor,
335
+ file_encoding,
313
336
  )
314
- print(
337
+ output_cabrillo_line(
315
338
  f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
316
- end="\r\n",
317
- file=file_descriptor,
339
+ "\r\n",
340
+ file_descriptor,
341
+ file_encoding,
318
342
  )
319
- print(
343
+ output_cabrillo_line(
320
344
  f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
321
- end="\r\n",
322
- file=file_descriptor,
345
+ "\r\n",
346
+ file_descriptor,
347
+ file_encoding,
323
348
  )
324
- print(
349
+ output_cabrillo_line(
325
350
  f"EMAIL: {self.station.get('Email', '')}",
326
- end="\r\n",
327
- file=file_descriptor,
351
+ "\r\n",
352
+ file_descriptor,
353
+ file_encoding,
328
354
  )
329
355
  sent_exch = self.contest_settings.get("SentExchange", "").upper()
330
356
  for contact in log:
@@ -336,7 +362,7 @@ def cabrillo(self):
336
362
 
337
363
  loggeddate = the_date_and_time[:10]
338
364
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
339
- print(
365
+ output_cabrillo_line(
340
366
  f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
341
367
  f"{contact.get('StationPrefix', '').ljust(13)} "
342
368
  f"{str(contact.get('SentNr', '')).zfill(4)} "
@@ -346,10 +372,11 @@ def cabrillo(self):
346
372
  f"{contact.get('Prec', '')} "
347
373
  f"{str(contact.get('CK', '')).zfill(2)} "
348
374
  f"{contact.get('Sect', '')}",
349
- end="\r\n",
350
- file=file_descriptor,
375
+ "\r\n",
376
+ file_descriptor,
377
+ file_encoding,
351
378
  )
352
- print("END-OF-LOG:", end="\r\n", file=file_descriptor)
379
+ output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
353
380
  self.show_message_box(f"Cabrillo saved to: {filename}")
354
381
  except IOError as exception:
355
382
  logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
@@ -181,7 +181,16 @@ def adif(self):
181
181
  gen_adif(self, cabrillo_name, "ARRL-SS-SSB")
182
182
 
183
183
 
184
- def cabrillo(self):
184
+ def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
185
+ """"""
186
+ print(
187
+ line_to_output.encode(file_encoding, errors="ignore").decode(),
188
+ end=ending,
189
+ file=file_descriptor,
190
+ )
191
+
192
+
193
+ def cabrillo(self, file_encoding):
185
194
  """Generates Cabrillo file. Maybe."""
186
195
  # https://www.cqwpx.com/cabrillo.htm
187
196
  logger.debug("******Cabrillo*****")
@@ -198,133 +207,150 @@ def cabrillo(self):
198
207
  log = self.database.fetch_all_contacts_asc()
199
208
  try:
200
209
  with open(filename, "w", encoding="utf-8") as file_descriptor:
201
- print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
202
- print(
210
+ output_cabrillo_line(
211
+ "START-OF-LOG: 3.0",
212
+ "\r\n",
213
+ file_descriptor,
214
+ file_encoding,
215
+ )
216
+ output_cabrillo_line(
203
217
  f"CREATED-BY: Not1MM v{__version__}",
204
- end="\r\n",
205
- file=file_descriptor,
218
+ "\r\n",
219
+ file_descriptor,
220
+ file_encoding,
206
221
  )
207
- print(
222
+ output_cabrillo_line(
208
223
  f"CONTEST: {cabrillo_name}",
209
- end="\r\n",
210
- file=file_descriptor,
224
+ "\r\n",
225
+ file_descriptor,
226
+ file_encoding,
211
227
  )
212
228
  if self.station.get("Club", ""):
213
- print(
229
+ output_cabrillo_line(
214
230
  f"CLUB: {self.station.get('Club', '').upper()}",
215
- end="\r\n",
216
- file=file_descriptor,
231
+ "\r\n",
232
+ file_descriptor,
233
+ file_encoding,
217
234
  )
218
- print(
235
+ output_cabrillo_line(
219
236
  f"CALLSIGN: {self.station.get('Call','')}",
220
- end="\r\n",
221
- file=file_descriptor,
237
+ "\r\n",
238
+ file_descriptor,
239
+ file_encoding,
222
240
  )
223
- print(
241
+ output_cabrillo_line(
224
242
  f"LOCATION: {self.station.get('ARRLSection', '')}",
225
- end="\r\n",
226
- file=file_descriptor,
243
+ "\r\n",
244
+ file_descriptor,
245
+ file_encoding,
227
246
  )
228
- # print(
229
- # f"ARRL-SECTION: {self.pref.get('section', '')}",
230
- # end="\r\n",
231
- # file=file_descriptor,
232
- # )
233
- print(
247
+ output_cabrillo_line(
234
248
  f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
235
- end="\r\n",
236
- file=file_descriptor,
249
+ "\r\n",
250
+ file_descriptor,
251
+ file_encoding,
237
252
  )
238
- print(
253
+ output_cabrillo_line(
239
254
  f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
240
- end="\r\n",
241
- file=file_descriptor,
255
+ "\r\n",
256
+ file_descriptor,
257
+ file_encoding,
242
258
  )
243
- print(
259
+ output_cabrillo_line(
244
260
  f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
245
- end="\r\n",
246
- file=file_descriptor,
261
+ "\r\n",
262
+ file_descriptor,
263
+ file_encoding,
247
264
  )
248
- print(
265
+ output_cabrillo_line(
249
266
  f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
250
- end="\r\n",
251
- file=file_descriptor,
267
+ "\r\n",
268
+ file_descriptor,
269
+ file_encoding,
252
270
  )
253
- print(
271
+ output_cabrillo_line(
254
272
  f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
255
- end="\r\n",
256
- file=file_descriptor,
273
+ "\r\n",
274
+ file_descriptor,
275
+ file_encoding,
257
276
  )
258
277
  if self.contest_settings.get("OverlayCategory", "") != "N/A":
259
- print(
278
+ output_cabrillo_line(
260
279
  f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
261
- end="\r\n",
262
- file=file_descriptor,
280
+ "\r\n",
281
+ file_descriptor,
282
+ file_encoding,
263
283
  )
264
- print(
284
+ output_cabrillo_line(
265
285
  f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
266
- end="\r\n",
267
- file=file_descriptor,
286
+ "\r\n",
287
+ file_descriptor,
288
+ file_encoding,
268
289
  )
269
- # print(
270
- # f"CATEGORY: {None}",
271
- # end="\r\n",
272
- # file=file_descriptor,
273
- # )
274
- print(
290
+ output_cabrillo_line(
275
291
  f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
276
- end="\r\n",
277
- file=file_descriptor,
292
+ "\r\n",
293
+ file_descriptor,
294
+ file_encoding,
278
295
  )
279
296
 
280
- print(
297
+ output_cabrillo_line(
281
298
  f"CLAIMED-SCORE: {calc_score(self)}",
282
- end="\r\n",
283
- file=file_descriptor,
299
+ "\r\n",
300
+ file_descriptor,
301
+ file_encoding,
284
302
  )
285
303
  ops = f"@{self.station.get('Call','')}"
286
304
  list_of_ops = self.database.get_ops()
287
305
  for op in list_of_ops:
288
306
  ops += f", {op.get('Operator', '')}"
289
- print(
307
+ output_cabrillo_line(
290
308
  f"OPERATORS: {ops}",
291
- end="\r\n",
292
- file=file_descriptor,
309
+ "\r\n",
310
+ file_descriptor,
311
+ file_encoding,
293
312
  )
294
- print(
313
+ output_cabrillo_line(
295
314
  f"NAME: {self.station.get('Name', '')}",
296
- end="\r\n",
297
- file=file_descriptor,
315
+ "\r\n",
316
+ file_descriptor,
317
+ file_encoding,
298
318
  )
299
- print(
319
+ output_cabrillo_line(
300
320
  f"ADDRESS: {self.station.get('Street1', '')}",
301
- end="\r\n",
302
- file=file_descriptor,
321
+ "\r\n",
322
+ file_descriptor,
323
+ file_encoding,
303
324
  )
304
- print(
325
+ output_cabrillo_line(
305
326
  f"ADDRESS-CITY: {self.station.get('City', '')}",
306
- end="\r\n",
307
- file=file_descriptor,
327
+ "\r\n",
328
+ file_descriptor,
329
+ file_encoding,
308
330
  )
309
- print(
331
+ output_cabrillo_line(
310
332
  f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
311
- end="\r\n",
312
- file=file_descriptor,
333
+ "\r\n",
334
+ file_descriptor,
335
+ file_encoding,
313
336
  )
314
- print(
337
+ output_cabrillo_line(
315
338
  f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
316
- end="\r\n",
317
- file=file_descriptor,
339
+ "\r\n",
340
+ file_descriptor,
341
+ file_encoding,
318
342
  )
319
- print(
343
+ output_cabrillo_line(
320
344
  f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
321
- end="\r\n",
322
- file=file_descriptor,
345
+ "\r\n",
346
+ file_descriptor,
347
+ file_encoding,
323
348
  )
324
- print(
349
+ output_cabrillo_line(
325
350
  f"EMAIL: {self.station.get('Email', '')}",
326
- end="\r\n",
327
- file=file_descriptor,
351
+ "\r\n",
352
+ file_descriptor,
353
+ file_encoding,
328
354
  )
329
355
  sent_exch = self.contest_settings.get("SentExchange", "").upper()
330
356
  for contact in log:
@@ -336,7 +362,7 @@ def cabrillo(self):
336
362
 
337
363
  loggeddate = the_date_and_time[:10]
338
364
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
339
- print(
365
+ output_cabrillo_line(
340
366
  f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
341
367
  f"{contact.get('StationPrefix', '').ljust(13)} "
342
368
  f"{str(contact.get('SentNr', '')).zfill(4)} "
@@ -346,10 +372,11 @@ def cabrillo(self):
346
372
  f"{contact.get('Prec', '')} "
347
373
  f"{str(contact.get('CK', '')).zfill(2)} "
348
374
  f"{contact.get('Sect', '')}",
349
- end="\r\n",
350
- file=file_descriptor,
375
+ "\r\n",
376
+ file_descriptor,
377
+ file_encoding,
351
378
  )
352
- print("END-OF-LOG:", end="\r\n", file=file_descriptor)
379
+ output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
353
380
  self.show_message_box(f"Cabrillo saved to: {filename}")
354
381
  except IOError as exception:
355
382
  logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)