add main Screen
This commit is contained in:
parent
3062e9b303
commit
18575abdc9
20
src/main.py
20
src/main.py
|
@ -0,0 +1,20 @@
|
||||||
|
import customtkinter
|
||||||
|
from views.mainScreen import MainFrame
|
||||||
|
class Main(customtkinter.CTk):
|
||||||
|
|
||||||
|
def __init__(self) -> None:
|
||||||
|
super().__init__()
|
||||||
|
# Grid-Konfiguration, um das Frame an die Größe anzupassen
|
||||||
|
self.grid_rowconfigure(0, weight=1)
|
||||||
|
self.grid_columnconfigure(0, weight=1)
|
||||||
|
|
||||||
|
mainFrame = MainFrame(self)
|
||||||
|
mainFrame.grid(row=0, column=0, padx=10, pady=10,sticky="nsew")
|
||||||
|
self.title("VeracityAI")
|
||||||
|
self.geometry("1300x800")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
customtkinter.set_appearance_mode("dark")
|
||||||
|
app = Main()
|
||||||
|
app.mainloop()
|
|
@ -34,14 +34,3 @@ class WebTextExtractor:
|
||||||
|
|
||||||
|
|
||||||
# Beispielaufruf
|
# Beispielaufruf
|
||||||
if __name__ == "__main__":
|
|
||||||
url = "https://de.wikipedia.org/wiki/Lineare_Algebra"
|
|
||||||
extractor = WebTextExtractor(url)
|
|
||||||
|
|
||||||
# HTML-Inhalt abrufen
|
|
||||||
extractor.fetch_content()
|
|
||||||
|
|
||||||
# Text extrahieren
|
|
||||||
extractor.extract_text()
|
|
||||||
|
|
||||||
print(extractor.get_text())
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
from typing import Any, Tuple
|
||||||
|
import customtkinter as ctk
|
||||||
|
|
||||||
|
class MainFrame(ctk.CTkFrame):
|
||||||
|
|
||||||
|
def __init__(self, master: Any, **kwargs):
|
||||||
|
super().__init__(master, **kwargs)
|
||||||
|
|
||||||
|
entry_url = ctk.CTkEntry(self, placeholder_text='Web link to article', width=290, height=50)
|
||||||
|
entry_url.grid(row=0, column=0, padx=20, pady=10)
|
||||||
|
|
||||||
|
input_textbox = ctk.CTkTextbox(self, width=290, height=200)
|
||||||
|
input_textbox.grid(row=1,column=0, padx=10, pady=10)
|
||||||
|
|
||||||
|
output_textbox = ctk.CTkTextbox(self, width=290, height=150, state= "disabled")
|
||||||
|
output_textbox.grid(row=2,column=0, padx=10, pady=10)
|
||||||
|
|
||||||
|
check_button = ctk.CTkButton(self,text="Check",width=100,height=50)
|
||||||
|
check_button.grid(row=0,column=1, padx=10, pady=10, sticky="nsew")
|
||||||
|
|
||||||
|
|
Reference in New Issue