Skip to content

Commit 5e1927f

Browse files
committed
UPD
1 parent 3672c6b commit 5e1927f

File tree

12 files changed

+140
-16
lines changed

12 files changed

+140
-16
lines changed

Install.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ python -m venv venv
55
call venv\Scripts\activate
66
python -m pip install --upgrade pip setuptools
77
pip install wheel
8-
pip install -r requirements.txt
8+
pip install -r TechicalFiles/requirements.txt
99
timeout /t 2 /nobreak >nul
1010
cls
1111

Install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ python -m venv venv
55
source venv/bin/activate
66
python -m pip install --upgrade pip setuptools
77
pip install wheel
8-
pip install -r requirements.txt
8+
pip install -r TechicalFiles/requirements.txt
99
sleep 2
1010
clear
1111

config.ini renamed to TechicalFiles/config.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
language = en
33
ngrok_token =
44
theme = dark
5-
region = eu
6-
5+
region = eu
File renamed without changes.
File renamed without changes.
File renamed without changes.

ui.py renamed to TechicalFiles/ui.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import tkinter as tk
22
from tkinter import messagebox, simpledialog, filedialog, ttk
3-
from ngrok_manager import NgrokManager
3+
from TechicalFiles.ngrok_manager import NgrokManager
44
import json
55
import webbrowser
66
from configparser import ConfigParser
77
import subprocess
88

9-
with open("translations.json", "r", encoding="utf-8") as f:
9+
with open("TechicalFiles/translations.json", "r", encoding="utf-8") as f:
1010
translations = json.load(f)
1111

1212
manager = None
@@ -18,7 +18,7 @@ def __init__(self, root):
1818
self.root.title("NgrokManager")
1919

2020
self.config = ConfigParser()
21-
self.config.read('config.ini')
21+
self.config.read('TechicalFiles/config.ini')
2222

2323
self.language = self.config.get('general', 'language', fallback='en')
2424
self.theme = self.config.get('general', 'theme', fallback='dark')
@@ -141,19 +141,19 @@ def open_web_inspection(self):
141141
def change_region(self, event=None):
142142
self.region = self.region_var.get()
143143
self.config.set('general', 'region', self.region)
144-
with open('config.ini', 'w') as configfile:
144+
with open('TechicalFiles/config.ini', 'w') as configfile:
145145
self.config.write(configfile)
146146

147147
def create_tunnel(self):
148148
token = self.token_entry.get()
149149
region = self.region_var.get()
150150

151151
self.config.set('general', 'ngrok_token', token)
152-
with open('config.ini', 'w') as configfile:
152+
with open('TechicalFiles/config.ini', 'w') as configfile:
153153
self.config.write(configfile)
154154

155155
self.config.set('general', 'region', region)
156-
with open('config.ini', 'w') as configfile:
156+
with open('TechicalFiles/config.ini', 'w') as configfile:
157157
self.config.write(configfile)
158158

159159
global manager
@@ -214,7 +214,7 @@ def open_tunnel_url(self, event):
214214
def change_language(self, event=None):
215215
self.language = self.language_var.get()
216216
self.config.set('general', 'language', self.language)
217-
with open('config.ini', 'w') as configfile:
217+
with open('TechicalFiles/config.ini', 'w') as configfile:
218218
self.config.write(configfile)
219219

220220
self.t = translations.get(self.language, translations["en"])
@@ -223,7 +223,7 @@ def change_language(self, event=None):
223223
def change_theme(self, event=None):
224224
self.theme = self.theme_var.get()
225225
self.config.set('general', 'theme', self.theme)
226-
with open('config.ini', 'w') as configfile:
226+
with open('TechicalFiles/config.ini', 'w') as configfile:
227227
self.config.write(configfile)
228228

229229
bg_color = "#2e2e2e" if self.theme == "dark" else "#ffffff"

Update.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ call venv\Scripts\activate
99
echo Updating Application...
1010
python -m pip install --upgrade pip setuptools
1111
pip install wheel
12-
pip install -r requirements.txt
12+
pip install -r TechicalFiles/requirements.txt
1313
timeout /t 2 /nobreak >nul
1414
cls
1515

Update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ python -m venv venv
99
source venv/bin/activate
1010
python -m pip install --upgrade pip setuptools
1111
pip install wheel
12-
pip install -r requirements.txt
12+
pip install -r TechicalFiles/requirements.txt
1313
sleep 2
1414
clear
1515

Venv.bat

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
@echo off
2+
chcp 65001 > NUL
3+
4+
call venv\Scripts\activate
5+
6+
echo Virtual environment activated
7+
echo.
8+
echo Available options:
9+
echo 1. Install package
10+
echo 2. Uninstall package
11+
echo 3. Upgrade package
12+
echo 4. List installed packages
13+
echo 5. Show package details
14+
echo 6. Check dependencies
15+
echo 7. Debug information
16+
echo 8. Exit
17+
echo.
18+
19+
:menu
20+
set /p choice="Enter your choice (1-8): "
21+
22+
if "%choice%"=="1" (
23+
set /p package="Enter package name to install: "
24+
pip install %package%
25+
goto menu
26+
)
27+
if "%choice%"=="2" (
28+
set /p package="Enter package name to uninstall: "
29+
pip uninstall %package%
30+
goto menu
31+
)
32+
if "%choice%"=="3" (
33+
set /p package="Enter package name to upgrade: "
34+
pip install --upgrade %package%
35+
goto menu
36+
)
37+
if "%choice%"=="4" (
38+
pip list
39+
echo.
40+
goto menu
41+
)
42+
if "%choice%"=="5" (
43+
set /p package="Enter package name to show details: "
44+
pip show %package%
45+
echo.
46+
goto menu
47+
)
48+
if "%choice%"=="6" (
49+
pip check
50+
echo.
51+
goto menu
52+
)
53+
if "%choice%"=="7" (
54+
pip debug --verbose
55+
echo.
56+
goto menu
57+
)
58+
if "%choice%"=="8" (
59+
deactivate
60+
exit
61+
)
62+
63+
echo Invalid choice. Please try again.
64+
goto menu

Venv.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash
2+
3+
source venv/bin/activate
4+
5+
echo "Virtual environment activated"
6+
echo
7+
8+
while true; do
9+
echo "Available options:"
10+
echo "1. Install package"
11+
echo "2. Uninstall package"
12+
echo "3. Upgrade package"
13+
echo "4. List installed packages"
14+
echo "5. Show package details"
15+
echo "6. Check dependencies"
16+
echo "7. Debug information"
17+
echo "8. Exit"
18+
echo
19+
20+
read -p "Enter your choice (1-8): " choice
21+
22+
case $choice in
23+
1)
24+
read -p "Enter package name to install: " package
25+
pip install $package
26+
;;
27+
2)
28+
read -p "Enter package name to uninstall: " package
29+
pip uninstall $package
30+
;;
31+
3)
32+
read -p "Enter package name to upgrade: " package
33+
pip install --upgrade $package
34+
;;
35+
4)
36+
pip list
37+
echo
38+
;;
39+
5)
40+
read -p "Enter package name to show details: " package
41+
pip show $package
42+
echo
43+
;;
44+
6)
45+
pip check
46+
echo
47+
;;
48+
7)
49+
pip debug --verbose
50+
echo
51+
;;
52+
8)
53+
deactivate
54+
exit 0
55+
;;
56+
*)
57+
echo "Invalid choice. Please try again."
58+
;;
59+
esac
60+
echo
61+
done

main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import tkinter as tk
22
from configparser import ConfigParser
3-
from ui import NgrokApp
3+
from TechicalFiles.ui import NgrokApp
44

55
config = ConfigParser()
6-
config.read('config.ini')
6+
config.read('TechicalFiles/config.ini')
77

88
language = config.get('general', 'language', fallback='en')
99

0 commit comments

Comments
 (0)