This commit is contained in:
Vincent Hanewinkel 2025-11-26 11:12:46 +01:00
parent 88110c68f0
commit 193a05b4d5
4 changed files with 10 additions and 1 deletions

View File

@ -2,12 +2,18 @@ import pyotp, time
import tkinter as tk import tkinter as tk
from tkinter import simpledialog, messagebox from tkinter import simpledialog, messagebox
from dotenv import load_dotenv from dotenv import load_dotenv
import sys
import os import os
load_dotenv() load_dotenv()
email = os.getenv("ACCOUND") email = os.getenv("ACCOUND")
seed = os.getenv("OTP_SEED") seed = os.getenv("OTP_SEED")
def resource_path(filename):
if hasattr(sys, 'frozen'): # PyInstaller-EXE
return os.path.join(sys._MEIPASS, filename)
return os.path.join(os.path.dirname(__file__), filename)
def set_env_value(key, value, path=".env"): def set_env_value(key, value, path=".env"):
lines = [] lines = []
found = False found = False
@ -100,6 +106,6 @@ otp_menu.add_command(label="Beenden", command=root.destroy)
menubar.add_cascade(label="Optionen", menu=otp_menu) menubar.add_cascade(label="Optionen", menu=otp_menu)
root.iconbitmap(resource_path("otp-icon.ico"))
update() update()
root.mainloop() root.mainloop()

BIN
otp-icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
otp-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

3
png2icon.py Normal file
View File

@ -0,0 +1,3 @@
from PIL import Image
img = Image.open("otp-icon.png")
img.save("otp-icon.ico")