From 1907a29159eef8eaf217e22a39072fc2102a5702 Mon Sep 17 00:00:00 2001 From: Brian Le Date: Wed, 24 Dec 2025 19:30:30 -0800 Subject: [PATCH 1/5] added input to update sign added an input to update the sign --- static/index.html | 79 +++++++++++++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/static/index.html b/static/index.html index 3337e15..f007985 100644 --- a/static/index.html +++ b/static/index.html @@ -7,22 +7,25 @@ - - +
+
Preview
+
+
+

Update Sign (Debug)

+
+
+
+
+
+
+ +
+
+
From d988d42b6740ce5753fd3ad6061d67f0305990ad Mon Sep 17 00:00:00 2001 From: Brian Le Date: Wed, 24 Dec 2025 22:11:02 -0800 Subject: [PATCH 2/5] Update sign-preview div styles in index.html --- static/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/index.html b/static/index.html index f007985..eba55c2 100644 --- a/static/index.html +++ b/static/index.html @@ -9,7 +9,7 @@
Preview
-
+

Update Sign (Debug)


From 5eff33d8fe8a05c13c9fce662a22f6280b076e2c Mon Sep 17 00:00:00 2001 From: Brian Le Date: Thu, 25 Dec 2025 09:17:44 -0800 Subject: [PATCH 3/5] Add expiration input to sign add input for expiration date and time to update sign --- static/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/index.html b/static/index.html index eba55c2..d6301b1 100644 --- a/static/index.html +++ b/static/index.html @@ -18,6 +18,7 @@

Update Sign (Debug)




+
@@ -61,7 +62,8 @@

Update Sign (Debug)

textColor: form.textColor.value, borderColor: form.borderColor.value, scrollSpeed: Number(form.scrollSpeed.value), - brightness: form.brightness.value ? Number(form.brightness.value) : 100 + brightness: form.brightness.value ? Number(form.brightness.value) : 100, + expiration: form.expiration.value ? new Date(form.expiration.value).toISOString() : null }; try { const res = await fetch('/update-sign', { From 04b3adba61cdf096162425dc8d463f4679831c04 Mon Sep 17 00:00:00 2001 From: Brian Le Date: Thu, 25 Dec 2025 20:07:27 -0800 Subject: [PATCH 4/5] Implement try and except block to catch errors impletemented a try except block to catch errors from running sign binary --- server.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server.py b/server.py index dbdc257..5fb5afa 100644 --- a/server.py +++ b/server.py @@ -153,10 +153,13 @@ def write_message_to_sign(new_data): "starting sign process with command " + " \\\n\t".join(new_data.to_subprocess_command()) ) - process = subprocess.Popen( - args=new_data.to_subprocess_command(), - ) - logging.info(f"sign process started with pid {process.pid}") + try: + process = subprocess.Popen( + args=new_data.to_subprocess_command(), + ) + logging.info(f"sign process started with pid {process.pid}") + except Exception as e: + logging.exception("Failed to start sign process") sign_data = new_data From 199dab57b0a70f9696a15987874d0cffdf6b85ff Mon Sep 17 00:00:00 2001 From: Brian Le Date: Thu, 25 Dec 2025 20:37:59 -0800 Subject: [PATCH 5/5] changed to use .lstrip instead of string slicing using .lstrip to handle cases where the color might not start with # --- server.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index 5fb5afa..14ce3b2 100644 --- a/server.py +++ b/server.py @@ -33,16 +33,17 @@ class SignData: expiration: datetime.datetime def to_subprocess_command(self) -> str: + # use lstrip('#') instead of [1:] in order to handle cases where the color might not start with '#' return [ os.path.join(WORKING_DIRECTORY, "sce_sign.exe"), "--set-speed", str(self.scrollSpeed) + " px/vsync", "--set-background-color", - self.backgroundColor[1:], + self.backgroundColor.lstrip('#'), "--set-font-color", - self.textColor[1:], + self.textColor.lstrip('#'), "--set-border-color", - self.borderColor[1:], + self.borderColor.lstrip('#'), "--set-font-filename", os.path.join(WORKING_DIRECTORY, "10x20.bdf"), "--set-brightness",