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