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