diff --git a/app/app.py b/app/app.py index b84dce3..87a3aec 100644 --- a/app/app.py +++ b/app/app.py @@ -1,7 +1,7 @@ # Copyright (c) 2025 Martin Kayser (tebarius) # Licensed under the MIT License. See LICENSE file in the project root. import streamlit as st - +import base64 import tools standard_output = ('#### Um den HILFE-Text zu einzelnen Funktionen aufzurufen bitte die Funktion mit leerem' @@ -11,15 +11,21 @@ st.set_page_config( # we do also patching static-files of streamlit in the docker-container so bookmarks will have # the same favicon and if posting links for example in whatsapp they will have the same title page_title="tebarius Mysteryhelfer (web)", - page_icon="./favicon.ico", + page_icon="images/favicon.ico", layout="wide" ) -st.logo('./logo.png', size='large') +st.logo('images/logo.png', size='large') -logo_col, title_col = st.columns([1,5]) +logo_col, title_col = st.columns([1,4]) with logo_col: - st.image('./logo-mit-tb.png', width=150) + st.markdown(f'' + f'' + f'' + f'', + unsafe_allow_html=True) with title_col: st.write('### tebarius Mysteryhelfer (web)') diff --git a/app/favicon.ico b/app/images/favicon.ico similarity index 100% rename from app/favicon.ico rename to app/images/favicon.ico diff --git a/app/images/gitea.png b/app/images/gitea.png new file mode 100644 index 0000000..dfd2125 Binary files /dev/null and b/app/images/gitea.png differ diff --git a/app/logo-mit-tb.png b/app/images/logo-mit-tb.png similarity index 100% rename from app/logo-mit-tb.png rename to app/images/logo-mit-tb.png diff --git a/app/logo.png b/app/images/logo.png similarity index 100% rename from app/logo.png rename to app/images/logo.png diff --git a/app/tools.py b/app/tools.py index 9cdb333..27b4e7e 100644 --- a/app/tools.py +++ b/app/tools.py @@ -2608,6 +2608,7 @@ def adfgvx_dekodieren(eingabetext, pw): ausgabetext += f"_dekodiert mit Variante 9-0,Z-A:_ \n{klartext_90za}" return ausgabetext +# noch nicht implementierte Funktionen: ''' def brainfuck_interpreter(): eingabetext = Eingabe.get(1.0, END) @@ -2722,6 +2723,4 @@ den Code auszuführen.""" + "\n\n") i = loop[-1] i += 1 Ausgabe.insert(1.0, "".join(rv) + "\n") - - ''' diff --git a/docker-compose.yml b/docker-compose.yml index 7af10bf..3cf26d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,5 +2,5 @@ services: mysteryhelfer-web: build: ./ ports: - - "80:8501" + - "8501:8501" restart: unless-stopped diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..02a1a33 --- /dev/null +++ b/readme.md @@ -0,0 +1,28 @@ +# Logo tebarius Mysteryhelfer (web) + +Dies ist die Umsetzung der [Desktop-App Mysteryhelfer](https://mysteryhelfer.tebarius.duckdns.org/) ([Sourcecode](https://gitea.tebarius.duckdns.org/tebarius/Mysteryhelfer)) als Web-App. + +Für die Umsetzung kommt das Python-Framework [Streamlit](https://streamlit.io/) zum Einsatz, durch welches es mir möglich war, dieselben Funktionen zu implementieren wie sie für die Desktop-App genutzt werden. (Für die Funktionen war hier primär nur die Ausgabe anzupassen.) + +Der einfachst Weg, um die App lokal laufen zu lassen, ist mit Docker, wobei ich hier mal 3 Möglichkeiten aufzeige: +1. mit vorgebautem Image: + - `docker run --rm -d -p 8501:8501 gitea.tebarius.duckdns.org/tebarius/mysteryhelfer` + +2. mit vorgebautem Image und "docker compose" + - docker-compose.yml erstellen mit folgendem Inhalt: + ``` + services: + mysteryhelfer-web: + image: gitea.tebarius.duckdns.org/tebarius/mysteryhelfer + ports: + - "8501:8501" + restart: unless-stopped + ``` + - `docker compose up` + +3. mit selbst gebautem Image aus dem Quellcode + - `git clone https://gitea.tebarius.duckdns.org/tebarius/Mysteryhelfer-web.git` + - `cd Mysteryhelfer-web` + - `docker compose up` + +bei allen 3 Varianten ist die App anschließend im Browser unter http://127.0.0.1:8501/ aufrufbar \ No newline at end of file