From 9c2effc162e8724b25ac328eb9b0cc4e66d8bed3 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 14 Nov 2024 11:15:41 +0200 Subject: [PATCH] FIX --- Install.bat | 2 +- Install.sh | 2 +- {TechicalFiles => TechnicalFiles}/config.ini | 0 .../ngrok_manager.py | 0 .../requirements.txt | Bin .../translations.json | 0 {TechicalFiles => TechnicalFiles}/ui.py | 16 ++++++++-------- Update.bat | 2 +- Update.sh | 2 +- main.py | 4 ++-- 10 files changed, 14 insertions(+), 14 deletions(-) rename {TechicalFiles => TechnicalFiles}/config.ini (100%) rename {TechicalFiles => TechnicalFiles}/ngrok_manager.py (100%) rename {TechicalFiles => TechnicalFiles}/requirements.txt (100%) rename {TechicalFiles => TechnicalFiles}/translations.json (100%) rename {TechicalFiles => TechnicalFiles}/ui.py (96%) diff --git a/Install.bat b/Install.bat index 29996ff..10a2031 100644 --- a/Install.bat +++ b/Install.bat @@ -5,7 +5,7 @@ python -m venv venv call venv\Scripts\activate python -m pip install --upgrade pip setuptools pip install wheel -pip install -r TechicalFiles/requirements.txt +pip install -r TechnicalFiles/requirements.txt timeout /t 2 /nobreak >nul cls diff --git a/Install.sh b/Install.sh index f5bbc95..4eadb86 100644 --- a/Install.sh +++ b/Install.sh @@ -5,7 +5,7 @@ python -m venv venv source venv/bin/activate python -m pip install --upgrade pip setuptools pip install wheel -pip install -r TechicalFiles/requirements.txt +pip install -r TechnicalFiles/requirements.txt sleep 2 clear diff --git a/TechicalFiles/config.ini b/TechnicalFiles/config.ini similarity index 100% rename from TechicalFiles/config.ini rename to TechnicalFiles/config.ini diff --git a/TechicalFiles/ngrok_manager.py b/TechnicalFiles/ngrok_manager.py similarity index 100% rename from TechicalFiles/ngrok_manager.py rename to TechnicalFiles/ngrok_manager.py diff --git a/TechicalFiles/requirements.txt b/TechnicalFiles/requirements.txt similarity index 100% rename from TechicalFiles/requirements.txt rename to TechnicalFiles/requirements.txt diff --git a/TechicalFiles/translations.json b/TechnicalFiles/translations.json similarity index 100% rename from TechicalFiles/translations.json rename to TechnicalFiles/translations.json diff --git a/TechicalFiles/ui.py b/TechnicalFiles/ui.py similarity index 96% rename from TechicalFiles/ui.py rename to TechnicalFiles/ui.py index 4e906ce..7a481ac 100644 --- a/TechicalFiles/ui.py +++ b/TechnicalFiles/ui.py @@ -1,12 +1,12 @@ import tkinter as tk from tkinter import messagebox, simpledialog, filedialog, ttk -from TechicalFiles.ngrok_manager import NgrokManager +from TechnicalFiles.ngrok_manager import NgrokManager import json import webbrowser from configparser import ConfigParser import subprocess -with open("TechicalFiles/translations.json", "r", encoding="utf-8") as f: +with open("TechnicalFiles/translations.json", "r", encoding="utf-8") as f: translations = json.load(f) manager = None @@ -18,7 +18,7 @@ def __init__(self, root): self.root.title("NgrokManager") self.config = ConfigParser() - self.config.read('TechicalFiles/config.ini') + self.config.read('TechnicalFiles/config.ini') self.language = self.config.get('general', 'language', fallback='en') self.theme = self.config.get('general', 'theme', fallback='dark') @@ -141,7 +141,7 @@ def open_web_inspection(self): def change_region(self, event=None): self.region = self.region_var.get() self.config.set('general', 'region', self.region) - with open('TechicalFiles/config.ini', 'w') as configfile: + with open('TechnicalFiles/config.ini', 'w') as configfile: self.config.write(configfile) def create_tunnel(self): @@ -149,11 +149,11 @@ def create_tunnel(self): region = self.region_var.get() self.config.set('general', 'ngrok_token', token) - with open('TechicalFiles/config.ini', 'w') as configfile: + with open('TechnicalFiles/config.ini', 'w') as configfile: self.config.write(configfile) self.config.set('general', 'region', region) - with open('TechicalFiles/config.ini', 'w') as configfile: + with open('TechnicalFiles/config.ini', 'w') as configfile: self.config.write(configfile) global manager @@ -214,7 +214,7 @@ def open_tunnel_url(self, event): def change_language(self, event=None): self.language = self.language_var.get() self.config.set('general', 'language', self.language) - with open('TechicalFiles/config.ini', 'w') as configfile: + with open('TechnicalFiles/config.ini', 'w') as configfile: self.config.write(configfile) self.t = translations.get(self.language, translations["en"]) @@ -223,7 +223,7 @@ def change_language(self, event=None): def change_theme(self, event=None): self.theme = self.theme_var.get() self.config.set('general', 'theme', self.theme) - with open('TechicalFiles/config.ini', 'w') as configfile: + with open('TechnicalFiles/config.ini', 'w') as configfile: self.config.write(configfile) bg_color = "#2e2e2e" if self.theme == "dark" else "#ffffff" diff --git a/Update.bat b/Update.bat index 030f168..a77b028 100644 --- a/Update.bat +++ b/Update.bat @@ -9,7 +9,7 @@ call venv\Scripts\activate echo Updating Application... python -m pip install --upgrade pip setuptools pip install wheel -pip install -r TechicalFiles/requirements.txt +pip install -r TechnicalFiles/requirements.txt timeout /t 2 /nobreak >nul cls diff --git a/Update.sh b/Update.sh index 1298da6..08f8265 100644 --- a/Update.sh +++ b/Update.sh @@ -9,7 +9,7 @@ python -m venv venv source venv/bin/activate python -m pip install --upgrade pip setuptools pip install wheel -pip install -r TechicalFiles/requirements.txt +pip install -r TechnicalFiles/requirements.txt sleep 2 clear diff --git a/main.py b/main.py index 0f57e1c..a37dae2 100644 --- a/main.py +++ b/main.py @@ -1,9 +1,9 @@ import tkinter as tk from configparser import ConfigParser -from TechicalFiles.ui import NgrokApp +from TechnicalFiles.ui import NgrokApp config = ConfigParser() -config.read('TechicalFiles/config.ini') +config.read('TechnicalFiles/config.ini') language = config.get('general', 'language', fallback='en')