From e300850952ccefd741f337762ba2f1300010337a Mon Sep 17 00:00:00 2001 From: mbridak Date: Mon, 19 Jan 2026 12:52:26 -0800 Subject: [PATCH 1/4] Enhance tab navigation: add highlight for '599' input in QLineEdit fields --- not1mm/__main__.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/not1mm/__main__.py b/not1mm/__main__.py index 071361fe..40bbbf83 100644 --- a/not1mm/__main__.py +++ b/not1mm/__main__.py @@ -42,7 +42,13 @@ QCloseEvent, QKeyEvent, ) -from PyQt6.QtWidgets import QFileDialog, QSplashScreen, QApplication, QPushButton +from PyQt6.QtWidgets import ( + QFileDialog, + QSplashScreen, + QApplication, + QPushButton, + QLineEdit, +) from PyQt6.QtCore import QT_VERSION_STR, PYQT_VERSION_STR from not1mm.lib.about import About @@ -2822,6 +2828,7 @@ def keyPressEvent(self, event: QKeyEvent) -> None: # pylint: disable=invalid-na next_tab.setFocus() next_tab.deselect() next_tab.end(False) + self.highlight_599(next_tab) return if self.receive.hasFocus(): logger.debug("From receive") @@ -2830,6 +2837,7 @@ def keyPressEvent(self, event: QKeyEvent) -> None: # pylint: disable=invalid-na prev_tab.setFocus() prev_tab.deselect() prev_tab.end(False) + self.highlight_599(prev_tab) else: next_tab = self.tab_next.get(self.receive) next_tab.setFocus() @@ -2843,6 +2851,7 @@ def keyPressEvent(self, event: QKeyEvent) -> None: # pylint: disable=invalid-na prev_tab.setFocus() prev_tab.deselect() prev_tab.end(False) + self.highlight_599(prev_tab) else: next_tab = self.tab_next.get(self.other_1) next_tab.setFocus() @@ -2856,6 +2865,7 @@ def keyPressEvent(self, event: QKeyEvent) -> None: # pylint: disable=invalid-na prev_tab.setFocus() prev_tab.deselect() prev_tab.end(False) + self.highlight_599(prev_tab) else: next_tab = self.tab_next.get(self.other_2) next_tab.setFocus() @@ -2883,6 +2893,7 @@ def keyPressEvent(self, event: QKeyEvent) -> None: # pylint: disable=invalid-na next_tab.setFocus() next_tab.deselect() next_tab.end(False) + self.highlight_599(next_tab) return if event.key() == Qt.Key.Key_F1: if event.modifiers() == Qt.KeyboardModifier.ShiftModifier: @@ -2932,6 +2943,10 @@ def keyPressEvent(self, event: QKeyEvent) -> None: # pylint: disable=invalid-na if event.key() == Qt.Key.Key_F12: self.process_function_key(self.F12) + def highlight_599(self, field: QLineEdit) -> None: + if field.text() == "599": + field.setSelection(1, 1) + def set_window_title(self) -> None: """ Set window title based on current state. From 19f17c4634182923a2fd1dc412f58a9eb3c67d76 Mon Sep 17 00:00:00 2001 From: mbridak Date: Fri, 23 Jan 2026 11:26:47 -0800 Subject: [PATCH 2/4] Add scripts to log and process git commit messages --- parse_gitlog.sh | 4 ++++ process-scratch.py | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100755 parse_gitlog.sh create mode 100644 process-scratch.py diff --git a/parse_gitlog.sh b/parse_gitlog.sh new file mode 100755 index 00000000..7cd9257e --- /dev/null +++ b/parse_gitlog.sh @@ -0,0 +1,4 @@ +# call git log, requesting just the commit date and commit message and direct the output to a temporary file. + +git log --since=$1 --pretty=format:"%ad %s" --date=short > scratch.txt +python process-scratch.py diff --git a/process-scratch.py b/process-scratch.py new file mode 100644 index 00000000..47e188f9 --- /dev/null +++ b/process-scratch.py @@ -0,0 +1,11 @@ +with open("scratch.txt", "r", encoding="utf-8") as fh: + prevdate = "" + for raw in fh: + line = raw.strip() + if not line: + continue + if prevdate != line[0:10]: + print(f"- [{line[0:10]}] {line[11:]}") + else: + print(f" - {line[11:]}") + prevdate = line[0:10] From 97d99a9e7843aa130419072b6be8c296abbb2148 Mon Sep 17 00:00:00 2001 From: mbridak Date: Fri, 23 Jan 2026 11:44:48 -0800 Subject: [PATCH 3/4] Fix date handling in git log script: use today's date if no argument is provided --- parse_gitlog.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/parse_gitlog.sh b/parse_gitlog.sh index 7cd9257e..e3ab1a30 100755 --- a/parse_gitlog.sh +++ b/parse_gitlog.sh @@ -1,4 +1,14 @@ +#!/bin/bash + # call git log, requesting just the commit date and commit message and direct the output to a temporary file. -git log --since=$1 --pretty=format:"%ad %s" --date=short > scratch.txt +#If no date passed in, use today. +thevar="" +if [$1 -eq ""]; then + thevar=`date +"%F"` +else + thevar=$1 +fi + +git log --since=$thevar --pretty=format:"%ad %s" --date=short > scratch.txt python process-scratch.py From 9c49edebfc0e2017325be1fd5933c44cb368f684 Mon Sep 17 00:00:00 2001 From: mbridak Date: Fri, 23 Jan 2026 12:16:13 -0800 Subject: [PATCH 4/4] Add edit_rst checkbox to settings and update highlight logic for QLineEdit --- not1mm/__main__.py | 2 +- not1mm/data/configuration.ui | 11 +++++++++-- not1mm/lib/settings.py | 4 ++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/not1mm/__main__.py b/not1mm/__main__.py index 40bbbf83..86bafa79 100644 --- a/not1mm/__main__.py +++ b/not1mm/__main__.py @@ -2944,7 +2944,7 @@ def keyPressEvent(self, event: QKeyEvent) -> None: # pylint: disable=invalid-na self.process_function_key(self.F12) def highlight_599(self, field: QLineEdit) -> None: - if field.text() == "599": + if field.text() == "599" and self.pref.get("edit_rst", False): field.setSelection(1, 1) def set_window_title(self) -> None: diff --git a/not1mm/data/configuration.ui b/not1mm/data/configuration.ui index 9ca3b792..b61081ec 100644 --- a/not1mm/data/configuration.ui +++ b/not1mm/data/configuration.ui @@ -6,7 +6,7 @@ 0 0 - 684 + 699 499 @@ -1745,7 +1745,7 @@ 5 25 - 639 + 670 378 @@ -2433,6 +2433,13 @@ + + + + Select the S in RST when field entered + + + diff --git a/not1mm/lib/settings.py b/not1mm/lib/settings.py index 05fae47d..4dab079e 100644 --- a/not1mm/lib/settings.py +++ b/not1mm/lib/settings.py @@ -63,6 +63,8 @@ def setup(self): self.qsy_on_change.setChecked(bool(self.preference.get("sandpqsy", False))) + self.edit_rst.setChecked(bool(self.preference.get("edit_rst", False))) + self.use_esm.setChecked(bool(self.preference.get("use_esm", False))) value = self.preference.get("esm_agn", "DISABLED") @@ -253,6 +255,8 @@ def save_changes(self): self.preference["sandpqsy"] = self.qsy_on_change.isChecked() + self.preference["edit_rst"] = self.edit_rst.isChecked() + self.preference["use_esm"] = self.use_esm.isChecked() self.preference["esm_cq"] = self.esm_cq.currentText() self.preference["esm_agn"] = self.esm_agn.currentText()