From 1de630149d8c64a5bbb9f70332c3cf5936f60417 Mon Sep 17 00:00:00 2001 From: rattatwinko Date: Sun, 8 Jun 2025 22:17:33 +0200 Subject: [PATCH] buncha shit --- .gitea/workflows/run-mucapy.yml | 2 +- .gitignore | 1 + mucapy/main.py | 34 ++++++++++++++++++++++++++------ mucapy/todopackage/__init__.py | 0 mucapy/{ => todopackage}/todo.py | 24 ++++++++++++++++++---- 5 files changed, 50 insertions(+), 11 deletions(-) create mode 100644 mucapy/todopackage/__init__.py rename mucapy/{ => todopackage}/todo.py (72%) diff --git a/.gitea/workflows/run-mucapy.yml b/.gitea/workflows/run-mucapy.yml index 9bb23fd..193648c 100644 --- a/.gitea/workflows/run-mucapy.yml +++ b/.gitea/workflows/run-mucapy.yml @@ -32,7 +32,7 @@ jobs: pyinstaller --onefile --windowed mucapy/main.py \ --add-data "mucapy/styling:styling" \ --add-data "mucapy/models:models" \ - --hidden-import=todo + --add-data "mucapy/todopackage:todopackage" - name: Upload executable artifact uses: actions/upload-artifact@v3 diff --git a/.gitignore b/.gitignore index 485e840..73024d5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ mucapy/seperate/__pycache__/main.cpython-313.pyc mucapy/seperate/__pycache__/MainWindow.cpython-313.pyc mucapy/seperate/__pycache__/MultiCamYOLODetector.cpython-313.pyc mucapy/seperate/__pycache__/NetworkCameraDialog.cpython-313.pyc +mucapy/__pycache__/todo.cpython-313.pyc diff --git a/mucapy/main.py b/mucapy/main.py index 2d2d26b..56287b2 100644 --- a/mucapy/main.py +++ b/mucapy/main.py @@ -17,7 +17,7 @@ from PyQt5.QtCore import Qt, QTimer, QDir, QSize, QSettings, QDateTime, QRect, Q from PyQt5.QtGui import (QImage, QPixmap, QIcon, QColor, QKeySequence, QPainter, QPen, QBrush) import platform -from mucapy import todo +import mucapy.todopackage.todo as todo import time import requests import subprocess @@ -881,7 +881,7 @@ class AboutWindow(QDialog): todo_text = self.get_todo_text() todo_label = QLabel(f"
{todo_text}
") todo_label.setWordWrap(True) - todo_label.setAlignment(Qt.AlignCenter) + todo_label.setAlignment(Qt.AlignLeft) # TODO: Fix this xD ; Fixing a TODO lol try: @@ -897,14 +897,26 @@ class AboutWindow(QDialog): print(f"Missing a Style File! => {todo_style_path}") exit(1) + self.info_obj = todo.todo() + info_text = self.get_info_text() + info_label = QLabel(f"
{info_text}
") + info_label.setWordWrap(True) + info_label.setAlignment(Qt.AlignCenter) + info_label.setStyleSheet("color: #3eff00 font-style: italic;") + self.camobj = todo.todo() cam_text = self.get_cam_text() cam_label = QLabel(f"
{cam_text}
") cam_label.setWordWrap(True) cam_label.setAlignment(Qt.AlignCenter) - cam_label.setStyleSheet("color: #FFFF; font-style: italic;") - layout.addWidget(todo_label) - layout.addWidget(cam_label) + cam_label.setStyleSheet("color: #ffffff; font-style: italic;") + + if True == True: + layout.addWidget(info_label) + layout.addWidget(todo_label) + layout.addWidget(cam_label) + else: + pass def toggle_expand(self, checked): for key, label in self.full_labels.items(): @@ -1001,7 +1013,17 @@ class AboutWindow(QDialog): return "Invalid TODO format." except Exception as e: return f"Error retrieving TODO: {e}" - + + def get_info_text(self): + try: + info_text = self.info_obj.getinfo() + if isinstance(info_text, str): + return info_text.strip() + else: + return "Invalid" + except Exception as e: + return f"fuck you => {e}" + def get_cam_text(self): try: cam_text = self.camobj.getcams() diff --git a/mucapy/todopackage/__init__.py b/mucapy/todopackage/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mucapy/todo.py b/mucapy/todopackage/todo.py similarity index 72% rename from mucapy/todo.py rename to mucapy/todopackage/todo.py index 998c75b..52408a5 100644 --- a/mucapy/todo.py +++ b/mucapy/todopackage/todo.py @@ -5,26 +5,28 @@ anyways, if you have suggestions pr this shit idk if you are smarter than me then actually do them. -fuck you +fuck you , if you can't read this then kys. This is designed to be very readable. -Rattatwinko 8.jun.25 (20:25) """ class todo: def __init__(self): #------------------------------------------------------------------------------------------------------------------------------------------------# - self.todo : str = """ + self.information : str = """ Very Good Very Nice Todo List: NOTE: If you want to run this in Visual Studio Codes built in Terminal you will get fucked in your tiny tight ass. -NOTE: If you are running this from the Build Executable from the Workflow , you ass is fine (you wont get fucked you slut) +NOTE: If you ran this from the Workflow Package, you have somehow managed to fix errors even God cant figure out. NOTE: If you compiled this yourself ; you are one Fucking Genious #-----------------------# # Changes: # # Not Very Much lolz # #-----------------------# +""" # This will center! + self.todo:str=""" TODO: [] - Fix Network Cameras from Crashing the Programm (This sometimes happens when only network cams are selected and it times out) [] - Make Seperate Styling (unlikely that this will happen) @@ -33,7 +35,7 @@ TODO: - NOTE: http://pendelcam.kip.uni-heidelberg.de/mjpg/video.mjpg This is a Testing URL for MJPEG (stable and renders fine) -""" # This will display Centered (look in about window class) +""" # This will display lefty (look in about window class) #------------------------------------------------------------------------------------------------------------------------------------------------# self.cameraURL : str = """ @@ -43,8 +45,22 @@ Cameras: #------------------------------------------------------------------------------------------------------------------------------------------------# + """ + + For a change we actually declare the Types. + I usually leave this to the Interpreter, it does it anyway + + """ + + # Return the Todo String def gettodo(self) -> str: return self.todo + + # Return the Information about the Programm + def getinfo(self) -> str: + return self.information + + # Return the Camera URL Thing def getcams(self) -> str: return self.cameraURL