From abea88aae65ed33370943815bd3afa59926555cb Mon Sep 17 00:00:00 2001 From: mbridak Date: Wed, 11 Dec 2024 13:40:01 -0800 Subject: [PATCH] @mbridak Add RTC to RAC Canada Day, ARRL VHF, ARRL Field Day, ARRL SS, ARRL DX, 10 10 --- CHANGELOG.md | 1 + README.md | 1 + not1mm/lib/version.py | 2 +- not1mm/plugins/10_10_fall_cw.py | 16 ++++++++++++-- not1mm/plugins/10_10_spring_cw.py | 16 ++++++++++++-- not1mm/plugins/10_10_summer_phone.py | 16 ++++++++++++-- not1mm/plugins/10_10_winter_phone.py | 16 ++++++++++++-- not1mm/plugins/arrl_dx_cw.py | 32 +++++++++++++++++++++++----- not1mm/plugins/arrl_dx_ssb.py | 32 +++++++++++++++++++++++----- not1mm/plugins/arrl_field_day.py | 16 ++++++++++++-- not1mm/plugins/arrl_rtty_ru.py | 19 ++++++++++++++++- not1mm/plugins/arrl_ss_cw.py | 15 ++++++++++++- not1mm/plugins/arrl_ss_phone.py | 15 ++++++++++++- not1mm/plugins/arrl_vhf_jan.py | 22 ++++++++++++++++++- not1mm/plugins/arrl_vhf_jun.py | 22 ++++++++++++++++++- not1mm/plugins/arrl_vhf_sep.py | 22 +++++++++++++++++-- not1mm/plugins/canada_day.py | 23 ++++++++++++++++++-- pyproject.toml | 2 +- 18 files changed, 257 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01a3e8e..91af0a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +- [24-12-11-1] Add RTC to RAC Canada Day, ARRL VHF, ARRL Field Day, ARRL SS, ARRL DX, 10 10 - [24-12-11] Add RTC to IARU HF, IARU Field Day, DARC XMAS, CQ WW, CQ WPX - [24-12-9] Add RTC to Winter Field Day, Stew Perry, REF, RAEM, NAQP, LZ-DX, JIDX - [24-12-8-2] Add RTC to ARRL 10M, Tweaked cabrillo file output. diff --git a/README.md b/README.md index 4b2cb63..a9057e6 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's. ## Recent Changes (Polishing the Turd) +- [24-12-11-1] Add RTC to RAC Canada Day, ARRL VHF, ARRL Field Day, ARRL SS, ARRL DX, 10 10 - [24-12-11] Add RTC to IARU HF, IARU Field Day, DARC XMAS, CQ WW, CQ WPX - [24-12-9] Add RTC to Winter Field Day, Stew Perry, REF, RAEM, NAQP, LZ-DX, JIDX - [24-12-8-2] Add RTC to ARRL 10M, Tweaked cabrillo file output. diff --git a/not1mm/lib/version.py b/not1mm/lib/version.py index 5613002..76ebac2 100644 --- a/not1mm/lib/version.py +++ b/not1mm/lib/version.py @@ -1,3 +1,3 @@ """It's the version""" -__version__ = "24.12.11" +__version__ = "24.12.11.1" diff --git a/not1mm/plugins/10_10_fall_cw.py b/not1mm/plugins/10_10_fall_cw.py index 79db5de..c695fa5 100644 --- a/not1mm/plugins/10_10_fall_cw.py +++ b/not1mm/plugins/10_10_fall_cw.py @@ -8,7 +8,7 @@ from PyQt6 import QtWidgets -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -16,7 +16,7 @@ EXCHANGE_HINT = "Name + 10-10# + SPC" name = "10 10 FALL CW" -cabrillo_name = "10-10-FALL-CW" +cabrillo_name = "10-10" mode = "CW" # CW SSB BOTH RTTY # columns = [0, 1, 2, 3, 4, 5, 6, 15] columns = [ @@ -453,3 +453,15 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """""" + + mults = {} + return mults + + +def just_points(self): + """""" + return get_points(self) diff --git a/not1mm/plugins/10_10_spring_cw.py b/not1mm/plugins/10_10_spring_cw.py index c0c2eb9..ca1b589 100644 --- a/not1mm/plugins/10_10_spring_cw.py +++ b/not1mm/plugins/10_10_spring_cw.py @@ -7,7 +7,7 @@ from pathlib import Path from PyQt6 import QtWidgets -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -15,7 +15,7 @@ EXCHANGE_HINT = "Name + 10-10# + SPC" name = "10 10 SPRING CW" -cabrillo_name = "10-10-SPRING-CW" +cabrillo_name = "10-10" mode = "CW" # CW SSB BOTH RTTY # columns = [0, 1, 2, 3, 4, 5, 6, 15] columns = [ @@ -452,3 +452,15 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """""" + + mults = {} + return mults + + +def just_points(self): + """""" + return get_points(self) diff --git a/not1mm/plugins/10_10_summer_phone.py b/not1mm/plugins/10_10_summer_phone.py index 228fd00..a913d22 100644 --- a/not1mm/plugins/10_10_summer_phone.py +++ b/not1mm/plugins/10_10_summer_phone.py @@ -9,7 +9,7 @@ from PyQt6 import QtWidgets -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -17,7 +17,7 @@ EXCHANGE_HINT = "Name + 10-10# + SPC" name = "10 10 SUMMER PHONE" -cabrillo_name = "10-10-SUMMER-PHONE" +cabrillo_name = "10-10" mode = "SSB" # CW SSB BOTH RTTY # columns = [0, 1, 2, 3, 4, 5, 6, 15] columns = [ @@ -456,3 +456,15 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """""" + + mults = {} + return mults + + +def just_points(self): + """""" + return get_points(self) diff --git a/not1mm/plugins/10_10_winter_phone.py b/not1mm/plugins/10_10_winter_phone.py index 01f6813..0d98f89 100644 --- a/not1mm/plugins/10_10_winter_phone.py +++ b/not1mm/plugins/10_10_winter_phone.py @@ -9,7 +9,7 @@ from PyQt6 import QtWidgets -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -17,7 +17,7 @@ EXCHANGE_HINT = "Name + 10-10# + SPC" name = "10 10 WINTER PHONE" -cabrillo_name = "10-10-WINTER-PHONE" +cabrillo_name = "10-10" mode = "SSB" # CW SSB BOTH RTTY # columns = [0, 1, 2, 3, 4, 5, 6, 15] columns = [ @@ -454,3 +454,15 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """""" + + mults = {} + return mults + + +def just_points(self): + """""" + return get_points(self) diff --git a/not1mm/plugins/arrl_dx_cw.py b/not1mm/plugins/arrl_dx_cw.py index d56f6f6..6d23171 100644 --- a/not1mm/plugins/arrl_dx_cw.py +++ b/not1mm/plugins/arrl_dx_cw.py @@ -10,7 +10,7 @@ from PyQt6 import QtWidgets -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -140,21 +140,24 @@ def points(self): return 0 -def show_mults(self): +def show_mults(self, rtc=None): """Return display string for mults""" location = self.cty_lookup(self.station.get("Call", "")) + _country, _state = 0, 0 if location: for item in location.items(): mycountry = item[1].get("primary_pfx", "") if mycountry in ["K", "VE"]: result = self.database.fetch_arrldx_country_band_count() if result: - return int(result.get("cb_count", 0)) + _country = int(result.get("cb_count", 0)) else: result = self.database.fetch_arrldx_state_prov_count() if result: - return int(result.get("cb_count", 0)) - return 0 + _state = int(result.get("cb_count", 0)) + if rtc is not None: + return (_country, _state) + return _country + _state def show_qso(self): @@ -511,3 +514,22 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """""" + + mults = {} + mults["country"], mults["state"] = show_mults(self, rtc=True) + return mults + + +def just_points(self): + """""" + result = self.database.fetch_points() + if result is not None: + score = result.get("Points", "0") + if score is None: + score = "0" + return int(score) + return 0 diff --git a/not1mm/plugins/arrl_dx_ssb.py b/not1mm/plugins/arrl_dx_ssb.py index b1cd55a..f46cd1c 100644 --- a/not1mm/plugins/arrl_dx_ssb.py +++ b/not1mm/plugins/arrl_dx_ssb.py @@ -10,7 +10,7 @@ from PyQt6 import QtWidgets -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -140,21 +140,24 @@ def points(self): return 0 -def show_mults(self): +def show_mults(self, rtc=None): """Return display string for mults""" location = self.cty_lookup(self.station.get("Call", "")) + _country, _state = 0, 0 if location: for item in location.items(): mycountry = item[1].get("primary_pfx", "") if mycountry in ["K", "VE"]: result = self.database.fetch_arrldx_country_band_count() if result: - return int(result.get("cb_count", 0)) + _country = int(result.get("cb_count", 0)) else: result = self.database.fetch_arrldx_state_prov_count() if result: - return int(result.get("cb_count", 0)) - return 0 + _state = int(result.get("cb_count", 0)) + if rtc is not None: + return (_country, _state) + return _country + _state def show_qso(self): @@ -510,3 +513,22 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """""" + + mults = {} + mults["country"], mults["state"] = show_mults(self, rtc=True) + return mults + + +def just_points(self): + """""" + result = self.database.fetch_points() + if result is not None: + score = result.get("Points", "0") + if score is None: + score = "0" + return int(score) + return 0 diff --git a/not1mm/plugins/arrl_field_day.py b/not1mm/plugins/arrl_field_day.py index 931f506..4df862b 100644 --- a/not1mm/plugins/arrl_field_day.py +++ b/not1mm/plugins/arrl_field_day.py @@ -9,7 +9,7 @@ from PyQt6 import QtWidgets from not1mm.lib.ham_utility import get_logged_band -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -20,7 +20,7 @@ name = "ARRL Field Day" mode = "BOTH" # CW SSB BOTH RTTY -cabrillo_name = "ARRL-FD" +cabrillo_name = "ARRL-FIELD-DAY" columns = [ "YYYY-MM-DD HH:MM:SS", @@ -514,3 +514,15 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """""" + + mults = {} + return mults + + +def just_points(self): + """""" + return get_points(self) diff --git a/not1mm/plugins/arrl_rtty_ru.py b/not1mm/plugins/arrl_rtty_ru.py index 794ae3d..6db61b2 100644 --- a/not1mm/plugins/arrl_rtty_ru.py +++ b/not1mm/plugins/arrl_rtty_ru.py @@ -7,6 +7,7 @@ from pathlib import Path from PyQt6 import QtWidgets +from not1mm.lib.plugin_common import online_score_xml EXCHANGE_HINT = "" @@ -93,7 +94,7 @@ def points(self): """Calc point""" -def show_mults(self): +def show_mults(self, rtc=None): """Return display string for mults""" @@ -272,3 +273,19 @@ def cabrillo(self): def recalculate_mults(self): """Recalculates multipliers after change in logged qso.""" + + +# States/Prov. DXCC state country + + +def get_mults(self): + """""" + + mults = {} + mults["state"], mults["country"] = show_mults(self, rtc=True) + return mults + + +def just_points(self): + """""" + return get_points(self) diff --git a/not1mm/plugins/arrl_ss_cw.py b/not1mm/plugins/arrl_ss_cw.py index 5fa0969..9e1591e 100644 --- a/not1mm/plugins/arrl_ss_cw.py +++ b/not1mm/plugins/arrl_ss_cw.py @@ -9,7 +9,7 @@ from PyQt6 import QtWidgets -from not1mm.lib.plugin_common import gen_adif +from not1mm.lib.plugin_common import gen_adif, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -541,3 +541,16 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """""" + + mults = {} + mults["state"] = show_mults(self) + return mults + + +def just_points(self): + """""" + return get_points(self) diff --git a/not1mm/plugins/arrl_ss_phone.py b/not1mm/plugins/arrl_ss_phone.py index 9c86279..1291205 100644 --- a/not1mm/plugins/arrl_ss_phone.py +++ b/not1mm/plugins/arrl_ss_phone.py @@ -9,7 +9,7 @@ from PyQt6 import QtWidgets -from not1mm.lib.plugin_common import gen_adif +from not1mm.lib.plugin_common import gen_adif, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -522,3 +522,16 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """""" + + mults = {} + mults["state"] = show_mults(self) + return mults + + +def just_points(self): + """""" + return get_points(self) diff --git a/not1mm/plugins/arrl_vhf_jan.py b/not1mm/plugins/arrl_vhf_jan.py index 9092321..50f308d 100644 --- a/not1mm/plugins/arrl_vhf_jan.py +++ b/not1mm/plugins/arrl_vhf_jan.py @@ -44,7 +44,7 @@ from PyQt6 import QtWidgets from not1mm.lib.ham_utility import get_logged_band -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -633,3 +633,23 @@ def check_call_history(self): self.history_info.setText(f"{result.get('UserText','')}") if self.other_2.text() == "": self.other_2.setText(f"{result.get('Loc1', '')}") + + +# gridsquare +def get_mults(self): + """""" + + mults = {} + mults["gridsquare"] = show_mults(self) + return mults + + +def just_points(self): + """""" + result = self.database.fetch_points() + if result is not None: + score = result.get("Points", "0") + if score is None: + score = "0" + return int(score) + return 0 diff --git a/not1mm/plugins/arrl_vhf_jun.py b/not1mm/plugins/arrl_vhf_jun.py index 3661bdc..327ce1a 100644 --- a/not1mm/plugins/arrl_vhf_jun.py +++ b/not1mm/plugins/arrl_vhf_jun.py @@ -12,7 +12,7 @@ from PyQt6 import QtWidgets from not1mm.lib.ham_utility import get_logged_band -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -601,3 +601,23 @@ def check_call_history(self): self.history_info.setText(f"{result.get('UserText','')}") if self.other_2.text() == "": self.other_2.setText(f"{result.get('Loc1', '')}") + + +# gridsquare +def get_mults(self): + """""" + + mults = {} + mults["gridsquare"] = show_mults(self) + return mults + + +def just_points(self): + """""" + result = self.database.fetch_points() + if result is not None: + score = result.get("Points", "0") + if score is None: + score = "0" + return int(score) + return 0 diff --git a/not1mm/plugins/arrl_vhf_sep.py b/not1mm/plugins/arrl_vhf_sep.py index 89a66b9..a7fba80 100644 --- a/not1mm/plugins/arrl_vhf_sep.py +++ b/not1mm/plugins/arrl_vhf_sep.py @@ -12,7 +12,7 @@ from PyQt6 import QtWidgets from not1mm.lib.ham_utility import get_logged_band -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -22,7 +22,7 @@ name = "ARRL VHF SEP" mode = "BOTH" # CW SSB BOTH RTTY -cabrillo_name = "ARRL-VHF-SEP" +cabrillo_name = "ARRL-VHF" columns = [ "YYYY-MM-DD HH:MM:SS", @@ -604,3 +604,21 @@ def check_call_history(self): # !!Order!!,Call,Name,Loc1,UserText, +# gridsquare +def get_mults(self): + """""" + + mults = {} + mults["gridsquare"] = show_mults(self) + return mults + + +def just_points(self): + """""" + result = self.database.fetch_points() + if result is not None: + score = result.get("Points", "0") + if score is None: + score = "0" + return int(score) + return 0 diff --git a/not1mm/plugins/canada_day.py b/not1mm/plugins/canada_day.py index a634902..89062c4 100644 --- a/not1mm/plugins/canada_day.py +++ b/not1mm/plugins/canada_day.py @@ -9,7 +9,7 @@ from PyQt6 import QtWidgets -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml from not1mm.lib.version import __version__ logger = logging.getLogger(__name__) @@ -17,7 +17,7 @@ EXCHANGE_HINT = "Province/Territory" name = "CANADA DAY" -cabrillo_name = "CANADA-DAY" +cabrillo_name = "RAC" mode = "BOTH" # CW SSB BOTH RTTY columns = [ @@ -501,3 +501,22 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """""" + + mults = {} + mults["state"] = show_mults(self) + return mults + + +def just_points(self): + """""" + result = self.database.fetch_points() + if result is not None: + score = result.get("Points", "0") + if score is None: + score = "0" + return int(score) + return 0 diff --git a/pyproject.toml b/pyproject.toml index 9d3b92b..e887c25 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "not1mm" -version = "24.12.11" +version = "24.12.11.1" description = "NOT1MM Logger" readme = "README.md" requires-python = ">=3.9"