From 2ae88e4a64f199206d01330bc7482425887c3d09 Mon Sep 17 00:00:00 2001 From: mbridak Date: Mon, 9 Dec 2024 16:40:08 -0800 Subject: [PATCH] @mbridak Add RTC to Winter Field Day, Stew Perry, REF, RAEM, NAQP, LZ-DX, JIDX --- CHANGELOG.md | 1 + README.md | 1 + not1mm/lib/version.py | 2 +- not1mm/plugins/jidx_cw.py | 14 +++++++++++++- not1mm/plugins/jidx_ph.py | 14 +++++++++++++- not1mm/plugins/lz-dx.py | 14 +++++++++++++- not1mm/plugins/naqp_cw.py | 14 +++++++++++++- not1mm/plugins/naqp_rtty.py | 22 +++++++++++++++++----- not1mm/plugins/naqp_ssb.py | 14 +++++++++++++- not1mm/plugins/raem.py | 13 ++++++++++++- not1mm/plugins/ref_cw.py | 25 ++++++++++++++++++++----- not1mm/plugins/ref_ssb.py | 25 ++++++++++++++++++++----- not1mm/plugins/stew_perry_topband.py | 13 ++++++++++++- not1mm/plugins/winter_field_day.py | 16 ++++++++++++++-- pyproject.toml | 2 +- 15 files changed, 164 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ea7c55..b13bc75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +- [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. - [24-12-8-1] Changed cabrillo names for Weekly RTTY, CW Ops CWT and K1USN SST. - [24-12-8] Fix: Weekly RTTY mults. Add RTC to Weekly RTTY. diff --git a/README.md b/README.md index 64d19b1..f275e08 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-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. - [24-12-8-1] Changed cabrillo names for Weekly RTTY, CW Ops CWT and K1USN SST. - [24-12-8] Fix: Weekly RTTY mults. Add RTC to Weekly RTTY. diff --git a/not1mm/lib/version.py b/not1mm/lib/version.py index 2e487c1..095a9a8 100644 --- a/not1mm/lib/version.py +++ b/not1mm/lib/version.py @@ -1,3 +1,3 @@ """It's the version""" -__version__ = "24.12.8.2" +__version__ = "24.12.9" diff --git a/not1mm/plugins/jidx_cw.py b/not1mm/plugins/jidx_cw.py index 5e6afb4..8a6f9ec 100644 --- a/not1mm/plugins/jidx_cw.py +++ b/not1mm/plugins/jidx_cw.py @@ -38,7 +38,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__) @@ -488,3 +488,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): + """Get mults for RTC XML""" + mults = {} + mults["country"] = show_mults(self) + return mults + + +def just_points(self): + """Get points for RTC XML""" + return get_points(self) diff --git a/not1mm/plugins/jidx_ph.py b/not1mm/plugins/jidx_ph.py index a516fc7..9650305 100644 --- a/not1mm/plugins/jidx_ph.py +++ b/not1mm/plugins/jidx_ph.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__) @@ -457,3 +457,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): + """Get mults for RTC XML""" + mults = {} + mults["country"] = show_mults(self) + return mults + + +def just_points(self): + """Get points for RTC XML""" + return get_points(self) diff --git a/not1mm/plugins/lz-dx.py b/not1mm/plugins/lz-dx.py index f5a6dc5..9442f9f 100644 --- a/not1mm/plugins/lz-dx.py +++ b/not1mm/plugins/lz-dx.py @@ -40,7 +40,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__ @@ -624,3 +624,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): + """Get mults for RTC XML""" + mults = {} + mults["state"] = show_mults(self) + return mults + + +def just_points(self): + """Get points for RTC XML""" + return get_points(self) diff --git a/not1mm/plugins/naqp_cw.py b/not1mm/plugins/naqp_cw.py index b9cf0d8..4d6a2e1 100644 --- a/not1mm/plugins/naqp_cw.py +++ b/not1mm/plugins/naqp_cw.py @@ -40,7 +40,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__) @@ -559,3 +559,15 @@ def check_call_history(self): self.other_1.setText(f"{result.get('Name', '')}") if self.other_2.text() == "": self.other_2.setText(f"{result.get('State', '')}") + + +def get_mults(self): + """Get mults for RTC XML""" + mults = {} + mults["state"] = show_mults(self) + return mults + + +def just_points(self): + """Get points for RTC XML""" + return get_points(self) diff --git a/not1mm/plugins/naqp_rtty.py b/not1mm/plugins/naqp_rtty.py index 5dd3abb..c4240bd 100644 --- a/not1mm/plugins/naqp_rtty.py +++ b/not1mm/plugins/naqp_rtty.py @@ -20,11 +20,11 @@ # Exchange: NA: Name + (state/DC/province/country) # non-NA: Name # Work stations: Once per band -# QSO Points: NA station: 1 point per QSO -# non-NA station: 1 point per QSO with an NA station +# QSO Points: NA station: 1 point per QSO +# non-NA station: 1 point per QSO with an NA station # Multipliers: Each US state and DC (including KH6/KL7) once per band -# Each VE province/territory once per band -# Each North American country (except W/VE) once per band +# Each VE province/territory once per band +# Each North American country (except W/VE) once per band # Score Calculation: Total score = total QSO points x total mults # E-mail logs to: (none) # Upload log at: http://www.ncjweb.com/naqplogsubmit/ @@ -41,7 +41,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__) @@ -666,3 +666,15 @@ def check_call_history(self): self.other_1.setText(f"{result.get('Name', '')}") if self.other_2.text() == "": self.other_2.setText(f"{result.get('State', '')}") + + +def get_mults(self): + """Get mults for RTC XML""" + mults = {} + mults["state"] = show_mults(self) + return mults + + +def just_points(self): + """Get points for RTC XML""" + return get_points(self) diff --git a/not1mm/plugins/naqp_ssb.py b/not1mm/plugins/naqp_ssb.py index 572daf6..04238f3 100644 --- a/not1mm/plugins/naqp_ssb.py +++ b/not1mm/plugins/naqp_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__) @@ -529,3 +529,15 @@ def check_call_history(self): self.other_1.setText(f"{result.get('Name', '')}") if self.other_2.text() == "": self.other_2.setText(f"{result.get('State', '')}") + + +def get_mults(self): + """Get mults for RTC XML""" + mults = {} + mults["state"] = show_mults(self) + return mults + + +def just_points(self): + """Get points for RTC XML""" + return get_points(self) diff --git a/not1mm/plugins/raem.py b/not1mm/plugins/raem.py index 162fc66..5a40322 100644 --- a/not1mm/plugins/raem.py +++ b/not1mm/plugins/raem.py @@ -50,7 +50,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__) @@ -603,3 +603,14 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.save_contact() continue self.process_function_key(button) + + +def get_mults(self): + """Get mults for RTC XML""" + mults = {} + return mults + + +def just_points(self): + """Get points for RTC XML""" + return get_points(self) diff --git a/not1mm/plugins/ref_cw.py b/not1mm/plugins/ref_cw.py index d5cce75..766ec67 100644 --- a/not1mm/plugins/ref_cw.py +++ b/not1mm/plugins/ref_cw.py @@ -47,7 +47,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__ @@ -242,11 +242,14 @@ def points(self): return 0 -def show_mults(self): +def show_mults(self, rtc=None): """Return display string for mults""" - return int(self.database.fetch_mult_count(1).get("count", 0)) + int( - self.database.fetch_mult_count(2).get("count", 0) - ) + one = int(self.database.fetch_mult_count(1).get("count", 0)) + two = int(self.database.fetch_mult_count(2).get("count", 0)) + if rtc is not None: + return (two, one) + + return one + two def show_qso(self): @@ -616,3 +619,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): + """Get mults for RTC XML""" + mults = {} + mults["country"], mults["state"] = show_mults(self, rtc=True) + return mults + + +def just_points(self): + """Get points for RTC XML""" + return get_points(self) diff --git a/not1mm/plugins/ref_ssb.py b/not1mm/plugins/ref_ssb.py index c75f1f2..bd4f571 100644 --- a/not1mm/plugins/ref_ssb.py +++ b/not1mm/plugins/ref_ssb.py @@ -62,7 +62,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__ @@ -257,11 +257,14 @@ def points(self): return 0 -def show_mults(self): +def show_mults(self, rtc=None): """Return display string for mults""" - return int(self.database.fetch_mult_count(1).get("count", 0)) + int( - self.database.fetch_mult_count(2).get("count", 0) - ) + one = int(self.database.fetch_mult_count(1).get("count", 0)) + two = int(self.database.fetch_mult_count(2).get("count", 0)) + if rtc is not None: + return (two, one) + + return one + two def show_qso(self): @@ -631,3 +634,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): + """Get mults for RTC XML""" + mults = {} + mults["country"], mults["state"] = show_mults(self, rtc=True) + return mults + + +def just_points(self): + """Get points for RTC XML""" + return get_points(self) diff --git a/not1mm/plugins/stew_perry_topband.py b/not1mm/plugins/stew_perry_topband.py index 0741cd4..d15b56b 100644 --- a/not1mm/plugins/stew_perry_topband.py +++ b/not1mm/plugins/stew_perry_topband.py @@ -33,7 +33,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__ from not1mm.lib.ham_utility import distance @@ -472,3 +472,14 @@ 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/winter_field_day.py b/not1mm/plugins/winter_field_day.py index 2323e1a..083add6 100644 --- a/not1mm/plugins/winter_field_day.py +++ b/not1mm/plugins/winter_field_day.py @@ -21,14 +21,14 @@ 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__) EXCHANGE_HINT = "1O ORG" -cabrillo_name = "WFD" +cabrillo_name = "WFDA-CONTEST" name = "Winter Field Day" # 1 once per contest, 2 work each band, 3 each band/mode, 4 no dupe checking mode = "BOTH" # CW SSB BOTH RTTY @@ -467,3 +467,15 @@ def check_call_history(self): self.other_1.setText(f"{result.get('Exch1', '')}") if self.other_2.text() == "": self.other_2.setText(f"{result.get('Sect', '')}") + + +def get_mults(self): + """""" + mults = {} + mults["wpxprefix"] = show_mults(self) + return mults + + +def just_points(self): + """""" + return get_points(self) diff --git a/pyproject.toml b/pyproject.toml index b9676f8..bccc71b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "not1mm" -version = "24.12.8.2" +version = "24.12.9" description = "NOT1MM Logger" readme = "README.md" requires-python = ">=3.9"