Compare commits
2 Commits
515fcd3163
...
750bee4991
Author | SHA1 | Date | |
---|---|---|---|
750bee4991 | |||
158b644e45 |
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Markus F.J. Busche
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
36
README.md
36
README.md
@@ -3,6 +3,7 @@
|
||||
Hilfs‑Web‑App für deutsche Wordle‑Rätsel. Nutzer geben bekannte Buchstaben/Positionen an, zusätzlich enthaltene und ausgeschlossene Buchstaben. Die App schlägt passende 5‑Buchstaben‑Wörter vor und zeigt die jeweilige Quelle (OT = OpenThesaurus, WF = wordfreq).
|
||||
|
||||
## Features
|
||||
|
||||
- Filter nach Positionen (1–5), enthaltenen und ausgeschlossenen Buchstaben
|
||||
- Deutsche Wortliste (nur 5 Buchstaben), aus OpenThesaurus und wordfreq gemerged
|
||||
- Quellen‑Badges je Treffer (OT/WF)
|
||||
@@ -11,6 +12,7 @@ Hilfs‑Web‑App für deutsche Wordle‑Rätsel. Nutzer geben bekannte Buchstab
|
||||
- Docker‑Image mit Gunicorn
|
||||
|
||||
## Projektstruktur
|
||||
|
||||
```
|
||||
app.py # Flask‑App
|
||||
scripts/generate_wordlist.py # Generator für Wortliste + Quellen‑JSON
|
||||
@@ -21,6 +23,7 @@ data/words_de_5.txt # generierte Wortliste
|
||||
data/words_de_5_sources.json # Wort→Quellen (ot/wf)
|
||||
Dockerfile # Produktionsimage (Gunicorn)
|
||||
requirements.txt # Python‑Abhängigkeiten
|
||||
LICENSE # MIT‑Lizenz
|
||||
```
|
||||
|
||||
---
|
||||
@@ -28,20 +31,26 @@ requirements.txt # Python‑Abhängigkeiten
|
||||
## Für Sysadmins (Betrieb)
|
||||
|
||||
### Docker (empfohlen)
|
||||
|
||||
- Build:
|
||||
|
||||
```bash
|
||||
docker build -t wordle-cheater .
|
||||
```
|
||||
|
||||
- Run (Port 8000):
|
||||
|
||||
```bash
|
||||
docker run --rm -p 8000:8000 wordle-cheater
|
||||
```
|
||||
|
||||
- Health‑Check (lokal): `http://localhost:8000/`
|
||||
|
||||
Hinweise:
|
||||
- Das Image generiert die Wortliste beim Build. Wird `data/openthesaurus.txt` aktualisiert, Image neu bauen.
|
||||
- Gunicorn startet mit 3 Worker (`gthread`, 2 Threads). Passen Sie Worker/Threads an Ihre CPU an.
|
||||
- Hinter einem Reverse Proxy (z. B. Nginx) betreiben; Beispiel:
|
||||
|
||||
```nginx
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
@@ -55,6 +64,7 @@ location / {
|
||||
- Python 3.12 bereitstellen
|
||||
- Virtuelle Umgebung erstellen, Abhängigkeiten installieren (siehe Entwickler‑Setup)
|
||||
- Start per Gunicorn:
|
||||
|
||||
```bash
|
||||
gunicorn -w 3 -k gthread --threads 2 -b 0.0.0.0:8000 app:app
|
||||
```
|
||||
@@ -64,16 +74,21 @@ gunicorn -w 3 -k gthread --threads 2 -b 0.0.0.0:8000 app:app
|
||||
## Für Entwickler (Setup & Workflow)
|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
- Python 3.12
|
||||
- Windows/PowerShell oder Linux/macOS Terminal
|
||||
|
||||
### Lokale Installation
|
||||
|
||||
Windows PowerShell (Projektwurzel, `.venv`):
|
||||
|
||||
```powershell
|
||||
python -m venv .venv
|
||||
.\.venv\Scripts\python.exe -m pip install -r requirements.txt --disable-pip-version-check
|
||||
```
|
||||
|
||||
Linux/macOS:
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
@@ -81,47 +96,62 @@ pip install -r requirements.txt --disable-pip-version-check
|
||||
```
|
||||
|
||||
### Wortliste generieren/aktualisieren
|
||||
|
||||
- Quelle: `data/openthesaurus.txt` (optional; wenn fehlt, wird nur wordfreq genutzt)
|
||||
- Generator erzeugt:
|
||||
- `data/words_de_5.txt`
|
||||
- `data/words_de_5_sources.json`
|
||||
|
||||
Windows PowerShell:
|
||||
|
||||
```powershell
|
||||
.\.venv\Scripts\python.exe scripts\generate_wordlist.py
|
||||
```
|
||||
|
||||
Linux/macOS:
|
||||
|
||||
```bash
|
||||
python scripts/generate_wordlist.py
|
||||
```
|
||||
|
||||
### Entwicklung starten (Debug‑Server)
|
||||
|
||||
Windows PowerShell:
|
||||
|
||||
```powershell
|
||||
.\.venv\Scripts\python.exe app.py
|
||||
```
|
||||
|
||||
Linux/macOS:
|
||||
|
||||
```bash
|
||||
python app.py
|
||||
```
|
||||
|
||||
- Browser: `http://127.0.0.1:5000`
|
||||
|
||||
### Docker während der Entwicklung
|
||||
|
||||
- Neu bauen, wenn sich `data/openthesaurus.txt` oder der Code ändert:
|
||||
|
||||
```bash
|
||||
docker build -t wordle-cheater . && docker run --rm -p 8000:8000 wordle-cheater
|
||||
```
|
||||
|
||||
### Coding‑Hinweise
|
||||
|
||||
- Nur 5‑Buchstaben‑Wörter werden berücksichtigt (Regex inkl. ä/ö/ü/ß)
|
||||
- UI ist serverseitig gerendert (Jinja2)
|
||||
- Bei jeder Anfrage wird die aktuelle Wortliste geladen; nach Generierung ist kein Neustart nötig
|
||||
|
||||
### Bekannte Einschränkungen
|
||||
|
||||
- Deutsche Morphologie (Pluralbildung etc.) wird nicht generiert, nur was in den Quellen vorhanden ist
|
||||
- Keine Benutzer‑Accounts, keine Persistenz über die Wortliste hinaus
|
||||
|
||||
## Lizenz & Credits
|
||||
- OpenThesaurus Daten gemäß deren Lizenz (siehe Kopf von `data/openthesaurus.txt`)
|
||||
- wordfreq Python‑Paket gemäß dessen Lizenz
|
||||
- Eigenes Projekt: (bitte ggf. Lizenz ergänzen)
|
||||
|
||||
- Projektlizenz: MIT (siehe `LICENSE`)
|
||||
- Datenquellen/Lizenzen:
|
||||
- OpenThesaurus Daten gemäß deren Lizenz (siehe Kopf von `data/openthesaurus.txt`)
|
||||
- wordfreq Python‑Paket gemäß dessen Lizenz
|
||||
|
Reference in New Issue
Block a user