not1mm 24.9.11.1__py3-none-any.whl → 24.9.12__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.
- not1mm/__main__.py +73 -66
- not1mm/data/JetBrainsMono-ExtraLight.ttf +0 -0
- not1mm/data/about.ui +1 -1
- not1mm/data/bandmap.ui +5 -5
- not1mm/data/checkwindow.ui +4 -4
- not1mm/data/configuration.ui +51 -51
- not1mm/data/editcontact.ui +3 -3
- not1mm/data/editmacro.ui +1 -1
- not1mm/data/logwindow.ui +2 -2
- not1mm/data/logwindowx.ui +2 -2
- not1mm/data/main.ui +34 -34
- not1mm/data/new_contest.ui +2 -2
- not1mm/data/opon.ui +1 -1
- not1mm/data/pickcontest.ui +5 -0
- not1mm/data/settings.ui +1 -1
- not1mm/data/vfo.ui +2 -2
- not1mm/lib/ft8_watcher.py +1 -1
- not1mm/lib/lookup.py +24 -114
- not1mm/lib/version.py +1 -1
- not1mm/lookupservice.py +95 -0
- not1mm/plugins/arrl_vhf_jan.py +9 -4
- not1mm/plugins/arrl_vhf_jun.py +6 -1
- not1mm/plugins/arrl_vhf_sep.py +6 -1
- {not1mm-24.9.11.1.dist-info → not1mm-24.9.12.dist-info}/METADATA +3 -1
- {not1mm-24.9.11.1.dist-info → not1mm-24.9.12.dist-info}/RECORD +29 -28
- not1mm/data/JetBrainsMono-Regular.ttf +0 -0
- {not1mm-24.9.11.1.dist-info → not1mm-24.9.12.dist-info}/LICENSE +0 -0
- {not1mm-24.9.11.1.dist-info → not1mm-24.9.12.dist-info}/WHEEL +0 -0
- {not1mm-24.9.11.1.dist-info → not1mm-24.9.12.dist-info}/entry_points.txt +0 -0
- {not1mm-24.9.11.1.dist-info → not1mm-24.9.12.dist-info}/top_level.txt +0 -0
not1mm/__main__.py
CHANGED
@@ -19,7 +19,6 @@ import os
|
|
19
19
|
import platform
|
20
20
|
import socket
|
21
21
|
import sys
|
22
|
-
import threading
|
23
22
|
import uuid
|
24
23
|
|
25
24
|
from json import dumps, loads
|
@@ -57,7 +56,6 @@ from not1mm.lib.ham_utility import (
|
|
57
56
|
reciprocol,
|
58
57
|
fakefreq,
|
59
58
|
)
|
60
|
-
from not1mm.lib.lookup import HamQTH, QRZlookup
|
61
59
|
from not1mm.lib.multicast import Multicast
|
62
60
|
from not1mm.lib.n1mm import N1MM
|
63
61
|
from not1mm.lib.new_contest import NewContest
|
@@ -76,6 +74,7 @@ from not1mm.bandmap import BandMapWindow
|
|
76
74
|
from not1mm.vfo import VfoWindow
|
77
75
|
from not1mm.radio import Radio
|
78
76
|
from not1mm.voice_keying import Voice
|
77
|
+
from not1mm.lookupservice import LookupService
|
79
78
|
|
80
79
|
poll_time = datetime.datetime.now()
|
81
80
|
|
@@ -172,6 +171,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
172
171
|
check_window = None
|
173
172
|
bandmap_window = None
|
174
173
|
vfo_window = None
|
174
|
+
lookup_service = None
|
175
175
|
|
176
176
|
def __init__(self, *args, **kwargs):
|
177
177
|
super().__init__(*args, **kwargs)
|
@@ -471,6 +471,9 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
471
471
|
except (IOError, JSONDecodeError, TypeError):
|
472
472
|
logging.CRITICAL("There was an error parsing the BigCity file.")
|
473
473
|
|
474
|
+
self.lookup_service = LookupService()
|
475
|
+
self.lookup_service.hide()
|
476
|
+
|
474
477
|
self.readpreferences()
|
475
478
|
|
476
479
|
self.voice_process = Voice()
|
@@ -1502,10 +1505,12 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1502
1505
|
indicator.setFrameShape(QtWidgets.QFrame.Shape.NoFrame)
|
1503
1506
|
if self.text_color == QColorConstants.Black:
|
1504
1507
|
indicator.setStyleSheet(
|
1505
|
-
"font-family: JetBrains Mono; color: black;"
|
1508
|
+
"font-family: JetBrains Mono ExtraLight; color: black;"
|
1506
1509
|
)
|
1507
1510
|
else:
|
1508
|
-
indicator.setStyleSheet(
|
1511
|
+
indicator.setStyleSheet(
|
1512
|
+
"font-family: JetBrains Mono ExtraLight; color: white"
|
1513
|
+
)
|
1509
1514
|
|
1510
1515
|
def set_band_indicator(self, band: str) -> None:
|
1511
1516
|
"""
|
@@ -1526,7 +1531,9 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1526
1531
|
indicator = self.all_mode_indicators[self.current_mode].get(band, None)
|
1527
1532
|
if indicator:
|
1528
1533
|
indicator.setFrameShape(QtWidgets.QFrame.Shape.Box)
|
1529
|
-
indicator.setStyleSheet(
|
1534
|
+
indicator.setStyleSheet(
|
1535
|
+
"font-family: JetBrains Mono ExtraLight; color: green;"
|
1536
|
+
)
|
1530
1537
|
|
1531
1538
|
def closeEvent(self, _event) -> None:
|
1532
1539
|
"""
|
@@ -1784,12 +1791,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1784
1791
|
else:
|
1785
1792
|
text = self.callsign.text()
|
1786
1793
|
text = text.upper()
|
1787
|
-
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1791
|
-
)
|
1792
|
-
_thethread.start()
|
1794
|
+
cmd = {}
|
1795
|
+
cmd["cmd"] = "LOOKUP_CALL"
|
1796
|
+
cmd["station"] = platform.node()
|
1797
|
+
cmd["call"] = text
|
1798
|
+
self.multicast_interface.send_as_json(cmd)
|
1793
1799
|
next_tab = self.tab_next.get(self.callsign)
|
1794
1800
|
next_tab.setFocus()
|
1795
1801
|
next_tab.deselect()
|
@@ -1944,6 +1950,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1944
1950
|
"FSK441",
|
1945
1951
|
"MSK144",
|
1946
1952
|
"JT65",
|
1953
|
+
"JT9",
|
1954
|
+
"Q65"
|
1947
1955
|
):
|
1948
1956
|
self.contact["Freq"] = round(
|
1949
1957
|
float(self.radio_state.get("vfoa", 0.0)) / 1000, 2
|
@@ -2411,18 +2419,18 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2411
2419
|
except (IOError, TypeError, ValueError) as exception:
|
2412
2420
|
logger.critical("Error: %s", exception)
|
2413
2421
|
|
2414
|
-
self.look_up = None
|
2415
|
-
if self.pref.get("useqrz"):
|
2416
|
-
|
2417
|
-
|
2418
|
-
|
2419
|
-
|
2422
|
+
# self.look_up = None
|
2423
|
+
# if self.pref.get("useqrz"):
|
2424
|
+
# self.look_up = QRZlookup(
|
2425
|
+
# self.pref.get("lookupusername"),
|
2426
|
+
# self.pref.get("lookuppassword"),
|
2427
|
+
# )
|
2420
2428
|
|
2421
|
-
if self.pref.get("usehamqth"):
|
2422
|
-
|
2423
|
-
|
2424
|
-
|
2425
|
-
|
2429
|
+
# if self.pref.get("usehamqth"):
|
2430
|
+
# self.look_up = HamQTH(
|
2431
|
+
# self.pref.get("lookupusername"),
|
2432
|
+
# self.pref.get("lookuppassword"),
|
2433
|
+
# )
|
2426
2434
|
|
2427
2435
|
if self.pref.get("run_state"):
|
2428
2436
|
self.radioButton_run.setChecked(True)
|
@@ -2451,6 +2459,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2451
2459
|
)
|
2452
2460
|
self.multicast_interface.ready_read_connect(self.watch_udp)
|
2453
2461
|
|
2462
|
+
cmd = {}
|
2463
|
+
cmd["cmd"] = "REFRESH_LOOKUP"
|
2464
|
+
cmd["station"] = platform.node()
|
2465
|
+
self.multicast_interface.send_as_json(cmd)
|
2466
|
+
|
2454
2467
|
if self.pref.get("darkmode"):
|
2455
2468
|
self.actionDark_Mode_2.setChecked(True)
|
2456
2469
|
self.setDarkMode(True)
|
@@ -2627,6 +2640,39 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2627
2640
|
self.callsign.setText(json_data.get("call", ""))
|
2628
2641
|
self.callsign.setFocus()
|
2629
2642
|
|
2643
|
+
# '{"cmd": "LOOKUP_RESPONSE", "station": "fredo", "result": {"call": "K6GTE", "aliases": "KM6HQI", "dxcc": "291", "nickname": "Mike", "fname": "Michael C", "name": "Bridak", "addr1": "2854 W Bridgeport Ave", "addr2": "Anaheim", "state": "CA", "zip": "92804", "country": "United States", "lat": "33.825460", "lon": "-117.987510", "grid": "DM13at", "county": "Orange", "ccode": "271", "fips": "06059", "land": "United States", "efdate": "2021-01-13", "expdate": "2027-11-07", "class": "G", "codes": "HVIE", "email": "michael.bridak@gmail.com", "u_views": "3049", "bio": "7232", "biodate": "2023-04-10 17:56:55", "image": "https://cdn-xml.qrz.com/e/k6gte/qsl.png", "imageinfo": "285:545:99376", "moddate": "2021-04-08 21:41:07", "MSA": "5945", "AreaCode": "714", "TimeZone": "Pacific", "GMTOffset": "-8", "DST": "Y", "eqsl": "0", "mqsl": "1", "cqzone": "3", "ituzone": "6", "born": "1967", "lotw": "1", "user": "K6GTE", "geoloc": "geocode", "name_fmt": "Michael C \\"Mike\\" Bridak"}}'
|
2644
|
+
|
2645
|
+
if (
|
2646
|
+
json_data.get("cmd", "") == "LOOKUP_RESPONSE"
|
2647
|
+
and json_data.get("station", "") == platform.node()
|
2648
|
+
):
|
2649
|
+
|
2650
|
+
fname = json_data.get("result", {}).get("fname", "")
|
2651
|
+
name = json_data.get("result", {}).get("name", "")
|
2652
|
+
grid = json_data.get("result", {}).get("grid", "")
|
2653
|
+
error_text = json_data.get("result", {}).get("error_text", "")
|
2654
|
+
nickname = json_data.get("result", {}).get("nickname", "")
|
2655
|
+
|
2656
|
+
if self.contest:
|
2657
|
+
if "General Logging" in self.contest.name:
|
2658
|
+
if nickname:
|
2659
|
+
self.other_1.setText(nickname)
|
2660
|
+
elif fname:
|
2661
|
+
self.other_1.setText(fname)
|
2662
|
+
elif name:
|
2663
|
+
self.other_1.setText(name)
|
2664
|
+
|
2665
|
+
if grid:
|
2666
|
+
self.contact["GridSquare"] = grid
|
2667
|
+
# _theircountry = response.get("country", "")
|
2668
|
+
if self.station.get("GridSquare", ""):
|
2669
|
+
heading = bearing(self.station.get("GridSquare", ""), grid)
|
2670
|
+
kilometers = distance(self.station.get("GridSquare", ""), grid)
|
2671
|
+
self.heading_distance.setText(
|
2672
|
+
f"{grid} Hdg {heading}° LP {reciprocol(heading)}° / "
|
2673
|
+
f"distance {int(kilometers*0.621371)}mi {kilometers}km"
|
2674
|
+
)
|
2675
|
+
|
2630
2676
|
def dark_mode_state_changed(self) -> None:
|
2631
2677
|
"""Called when the Dark Mode menu state is changed."""
|
2632
2678
|
self.pref["darkmode"] = self.actionDark_Mode_2.isChecked()
|
@@ -2848,12 +2894,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2848
2894
|
self.dupe_indicator.show()
|
2849
2895
|
else:
|
2850
2896
|
self.dupe_indicator.hide()
|
2851
|
-
|
2852
|
-
|
2853
|
-
|
2854
|
-
|
2855
|
-
)
|
2856
|
-
_thethread.start()
|
2897
|
+
cmd = {}
|
2898
|
+
cmd["cmd"] = "LOOKUP_CALL"
|
2899
|
+
cmd["station"] = platform.node()
|
2900
|
+
cmd["call"] = stripped_text
|
2901
|
+
self.multicast_interface.send_as_json(cmd)
|
2857
2902
|
self.next_field.setFocus()
|
2858
2903
|
return
|
2859
2904
|
cmd = {}
|
@@ -3008,44 +3053,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
3008
3053
|
if self.contest:
|
3009
3054
|
self.contest.prefill(self)
|
3010
3055
|
|
3011
|
-
def check_callsign2(self, callsign) -> None:
|
3012
|
-
"""
|
3013
|
-
Check the callsign after it has been entered.
|
3014
|
-
Look up the callsign in the callsign database.
|
3015
|
-
Get the grid square and calculate the distance and heading.
|
3016
|
-
|
3017
|
-
Parameters
|
3018
|
-
----------
|
3019
|
-
callsign : str
|
3020
|
-
Callsign to check.
|
3021
|
-
|
3022
|
-
Returns
|
3023
|
-
-------
|
3024
|
-
None
|
3025
|
-
"""
|
3026
|
-
|
3027
|
-
callsign = callsign.strip()
|
3028
|
-
debug_lookup = f"{self.look_up}"
|
3029
|
-
logger.debug("%s, %s", callsign, debug_lookup)
|
3030
|
-
if hasattr(self.look_up, "session"):
|
3031
|
-
if self.look_up.session:
|
3032
|
-
response = self.look_up.lookup(callsign)
|
3033
|
-
debug_response = f"{response}"
|
3034
|
-
logger.debug("The Response: %s\n", debug_response)
|
3035
|
-
if response:
|
3036
|
-
theirgrid = response.get("grid", "")
|
3037
|
-
self.contact["GridSquare"] = theirgrid
|
3038
|
-
_theircountry = response.get("country", "")
|
3039
|
-
if self.station.get("GridSquare", ""):
|
3040
|
-
heading = bearing(self.station.get("GridSquare", ""), theirgrid)
|
3041
|
-
kilometers = distance(
|
3042
|
-
self.station.get("GridSquare", ""), theirgrid
|
3043
|
-
)
|
3044
|
-
self.heading_distance.setText(
|
3045
|
-
f"{theirgrid} Hdg {heading}° LP {reciprocol(heading)}° / "
|
3046
|
-
f"distance {int(kilometers*0.621371)}mi {kilometers}km"
|
3047
|
-
)
|
3048
|
-
|
3049
3056
|
def check_dupe(self, call: str) -> bool:
|
3050
3057
|
"""Checks if a callsign is a dupe on current band/mode."""
|
3051
3058
|
if self.contest is None:
|
Binary file
|
not1mm/data/about.ui
CHANGED
not1mm/data/bandmap.ui
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
</property>
|
13
13
|
<property name="font">
|
14
14
|
<font>
|
15
|
-
<family>JetBrains Mono</family>
|
15
|
+
<family>JetBrains Mono ExtraLight</family>
|
16
16
|
</font>
|
17
17
|
</property>
|
18
18
|
<property name="windowTitle">
|
@@ -82,7 +82,7 @@
|
|
82
82
|
<widget class="QScrollArea" name="scrollArea">
|
83
83
|
<property name="font">
|
84
84
|
<font>
|
85
|
-
<family>JetBrains Mono</family>
|
85
|
+
<family>JetBrains Mono ExtraLight</family>
|
86
86
|
<pointsize>9</pointsize>
|
87
87
|
</font>
|
88
88
|
</property>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</property>
|
104
104
|
<property name="font">
|
105
105
|
<font>
|
106
|
-
<family>JetBrains Mono</family>
|
106
|
+
<family>JetBrains Mono ExtraLight</family>
|
107
107
|
<pointsize>9</pointsize>
|
108
108
|
</font>
|
109
109
|
</property>
|
@@ -112,7 +112,7 @@
|
|
112
112
|
<widget class="QGraphicsView" name="graphicsView">
|
113
113
|
<property name="font">
|
114
114
|
<font>
|
115
|
-
<family>JetBrains Mono</family>
|
115
|
+
<family>JetBrains Mono ExtraLight</family>
|
116
116
|
<pointsize>6</pointsize>
|
117
117
|
</font>
|
118
118
|
</property>
|
@@ -207,7 +207,7 @@
|
|
207
207
|
<widget class="QLabel" name="clear_spot_olderLabel">
|
208
208
|
<property name="font">
|
209
209
|
<font>
|
210
|
-
<family>JetBrains Mono</family>
|
210
|
+
<family>JetBrains Mono ExtraLight</family>
|
211
211
|
<pointsize>11</pointsize>
|
212
212
|
</font>
|
213
213
|
</property>
|
not1mm/data/checkwindow.ui
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
</property>
|
13
13
|
<property name="font">
|
14
14
|
<font>
|
15
|
-
<family>JetBrains Mono</family>
|
15
|
+
<family>JetBrains Mono ExtraLight</family>
|
16
16
|
</font>
|
17
17
|
</property>
|
18
18
|
<property name="focusPolicy">
|
@@ -123,7 +123,7 @@
|
|
123
123
|
<widget class="QLabel" name="logListLabel">
|
124
124
|
<property name="font">
|
125
125
|
<font>
|
126
|
-
<family>JetBrains Mono</family>
|
126
|
+
<family>JetBrains Mono ExtraLight</family>
|
127
127
|
<pointsize>10</pointsize>
|
128
128
|
</font>
|
129
129
|
</property>
|
@@ -136,7 +136,7 @@
|
|
136
136
|
<widget class="QLabel" name="masterListLabel">
|
137
137
|
<property name="font">
|
138
138
|
<font>
|
139
|
-
<family>JetBrains Mono</family>
|
139
|
+
<family>JetBrains Mono ExtraLight</family>
|
140
140
|
<pointsize>10</pointsize>
|
141
141
|
</font>
|
142
142
|
</property>
|
@@ -149,7 +149,7 @@
|
|
149
149
|
<widget class="QLabel" name="telnetListLabel">
|
150
150
|
<property name="font">
|
151
151
|
<font>
|
152
|
-
<family>JetBrains Mono</family>
|
152
|
+
<family>JetBrains Mono ExtraLight</family>
|
153
153
|
<pointsize>10</pointsize>
|
154
154
|
</font>
|
155
155
|
</property>
|