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