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