Updated README.md
This commit is contained in:
parent
99a4c95f8b
commit
77a9e1fb44
1 changed files with 51 additions and 51 deletions
102
README.md
102
README.md
|
|
@ -1,73 +1,73 @@
|
|||
# Luanti-Web: Ein dynamisches Webseiten-Toolkit
|
||||
# Luanti-Web: A dynamic website-toolkit
|
||||
|
||||
Willkommen beim Luanti Web Generator! Entstanden aus einer Leidenschaft für kreative Sandbox-Spiele, bietet dieses Hobby-Projekt ein leistungsstarkes, automatisiertes Toolkit zur Erstellung einer schönen und funktionsreichen statischen Webseite für Ihren Minetest- oder Luanti-Server. Präsentieren Sie Ihren Server, Ihre Welten, verfolgen Sie Ihre Spieler und informieren Sie Ihre Community.
|
||||
Welcome to the Luanti Web Generator! Born from a passion for creative sandbox gaming, this hobby project provides a powerful, automated toolkit for generating a beautiful and feature-rich static website for your Minetest or Luanti server. Showcase your server, worlds, track your players, and inform your community.
|
||||
|
||||
Dieses System ist von Grund auf so konzipiert, dass es modular, leicht konfigurierbar und perfekt für kleine Gemeinschaften ist, die ohne großen Aufwand eine Webpräsenz wünschen.
|
||||
This system is designed from the ground up to be modular, easily configurable, and perfect for small communities who want web presence without the hassle.
|
||||
|
||||
## ✨ Features
|
||||
|
||||
* **Automatisierte Kartenerstellung:** Nutzt `minetestmapper`, um hochauflösende PNG-Karten Ihrer Spielwelten zu erstellen.
|
||||
* **Performante Bildverarbeitung:** Verwendet `vips`, eine extrem schnelle und speichereffiziente Bibliothek, um auch riesige Karten (getestet bis 64k x 64k Pixel) für das Web zu skalieren.
|
||||
* **Gekachelte Kartenerstellung:** Nutzt `gdal2tiles.py`, um performante, zoombare Kartenkacheln für ein flüssiges Benutzererlebnis zu erstellen.
|
||||
* **Dynamischer Karten-Viewer:** Implementiert einen interaktiven Karten-Viewer mit **OpenLayers**, angetrieben von den generierten Kartenkacheln, inklusive digitalem Zoom über die höchste Auflösung hinaus.
|
||||
* **Live-Spieler & Grundstücks-Anzeige:** Lädt dynamisch Spielerpositionen und geschützte Bereiche (Grundstücke) und zeigt sie als interaktive Overlays auf der Live-Karte an.
|
||||
* **Layer-Steuerung:** Ein Menü auf der Karte erlaubt das Ein- und Ausblenden von Spielern, Hauptgrundstücken und Untergrundstücken (Parzellen).
|
||||
* **Karten-Archiv:** Speichert automatisch einen täglichen Snapshot der Karte und macht ihn über eine Umschalt-Funktion auf der Welt-Detailseite verfügbar.
|
||||
* **Vorlagen-gesteuerte Seitengenerierung:** Baut alle statischen HTML-Seiten aus einfachen, anpassbaren Vorlagen.
|
||||
* **Flexible Konfiguration:** Einfache Konfiguration durch eine zentrale, globale `config.sh` und eine `web.conf`-Datei für jede Ihrer Welten.
|
||||
* **Automatisierungs-bereit:** Konzipiert für die unbeaufsichtigte Ausführung über Planungswerkzeuge wie `cron`.
|
||||
* **Automated Map Generation:** Leverages `minetestmapper` to create high-resolution PNG maps of your game worlds.
|
||||
* **Performant Image Processing:** Uses `vips`, a high-performance and memory-efficient library, to scale even huge maps (tested up to 64k x 64k pixels) for the web.
|
||||
* **Tiled Map Generation:** Uses `gdal2tiles.py` to create performant, zoomable map tiles for a smooth user experience.
|
||||
* **Dynamic Map Viewer:** Implements an interactive map viewer using **OpenLayers**, powered by the generated map tiles, including digital zoom beyond the highest resolution.
|
||||
* **Live Player & Area Display:** Dynamically loads player positions and protected areas, displaying them as interactive overlays on the live map.
|
||||
* **Layer Control:** A menu on the map allows toggling the visibility of players, parent areas, and sub-areas (parcels).
|
||||
* **Map Archive:** Automatically saves a daily snapshot of the map and makes it available through a toggle on the world detail page.
|
||||
* **Template-Driven Site Generation:** Builds all static HTML pages from simple, customizable templates.
|
||||
* **Flexible Configuration:** Configuration is easy with a central global `config.sh` and a `web.conf` file for every one of your worlds.
|
||||
* **Automation-Ready:** Designed for unattended execution via scheduling tools like `cron`.
|
||||
|
||||
## 🔧 Voraussetzungen
|
||||
## 🔧 Prerequisites
|
||||
|
||||
Um dieses System zu betreiben, müssen die folgenden Softwarepakete auf Ihrem Server installiert sein:
|
||||
To run this system, the following software packages must be installed on your server:
|
||||
|
||||
* **bash:** Die Skriptsprache, die für das gesamte Projekt verwendet wird.
|
||||
* **vips:** Eine hochperformante Bildverarbeitungsbibliothek.
|
||||
* **bash:** The scripting language used for the entire project.
|
||||
* **vips:** A high-performance image processing library.
|
||||
* *Debian/Ubuntu Install:* `sudo apt-get install libvips-tools`
|
||||
* **ImageMagick:** Wird aktuell noch für den Befehl `identify` (zum Auslesen von Bilddimensionen) benötigt.
|
||||
* **ImageMagick:** Currently still required for the `identify` command (to read image dimensions).
|
||||
* *Debian/Ubuntu Install:* `sudo apt-get install imagemagick`
|
||||
* **GDAL/OGR:** Stellt das `gdal2tiles.py`-Skript für die Kachelerstellung bereit.
|
||||
* **GDAL/OGR:** Provides the `gdal2tiles.py` script for tile generation.
|
||||
* *Debian/Ubuntu Install:* `sudo apt-get install gdal-bin python3-gdal`
|
||||
* **SQLite3:** Das Kommandozeilen-Tool zur Abfrage der Spieldatenbanken (`players.sqlite`, `auth.sqlite`).
|
||||
* **SQLite3:** The command-line tool to query the game databases (`players.sqlite`, `auth.sqlite`).
|
||||
* *Debian/Ubuntu Install:* `sudo apt-get install sqlite3`
|
||||
* **bc:** Der "basic calculator", wird für mathematische Operationen in Skripten benötigt.
|
||||
* **bc:** The "basic calculator" command-line tool, required for calculations in scripts.
|
||||
* *Debian/Ubuntu Install:* `sudo apt-get install bc`
|
||||
* **jq:** Ein Kommandozeilen-JSON-Prozessor, der von `sync_areas.sh` verwendet wird.
|
||||
* **jq:** A command-line JSON processor, used by `sync_areas.sh`.
|
||||
* *Debian/Ubuntu Install:* `sudo apt-get install jq`
|
||||
* **minetestmapper:** Das ausführbare Programm zur Erstellung der Karten aus den Weltdaten. Muss im Projektverzeichnis platziert werden.
|
||||
* **iproute2:** Stellt das `ss`-Kommando für den `check_server_status.sh` bereit (auf den meisten Systemen vorinstalliert).
|
||||
* **Webserver:** Ein Webserver wie Nginx oder Apache wird benötigt, um die generierten statischen Dateien auszuliefern.
|
||||
* **minetestmapper:** The executable used to render maps from world data. Must be placed within the project directory.
|
||||
* **iproute2:** Provides the `ss` command for `check_server_status.sh` (usually pre-installed on most systems).
|
||||
* **Web Server:** A web server like Nginx or Apache is needed to serve the generated static files.
|
||||
|
||||
Ein mitgeliefertes Skript (`check_dependencies.sh`) kann alle wichtigen Abhängigkeiten automatisch überprüfen.
|
||||
An included script (`check_dependencies.sh`) can automatically verify all important dependencies.
|
||||
|
||||
## ⚙️ Installation & Setup
|
||||
|
||||
### 1. Projektdateien herunterladen/klonen
|
||||
### 1. Project Files
|
||||
|
||||
Laden Sie den **letzten Build** von der [Releases-Seite](https://git.geigernet.eu/rainer/luanti-web/releases) herunter und entpacken Sie ihn in ein Basisverzeichnis auf Ihrem Server, z.B. `/opt/luweb/`.
|
||||
Download the **latest build** from the [Releases-Page](https://git.geigernet.eu/rainer/luanti-web/releases) and extract it to a base directory on your server, such as `/opt/luweb/`.
|
||||
|
||||
ODER
|
||||
OR
|
||||
|
||||
Klonen Sie das Git-Repository in ein Basisverzeichnis.
|
||||
Clone the Git repository to a base directory.
|
||||
|
||||
```bash
|
||||
-```bash
|
||||
git clone [https://git.geigernet.eu/rainer/luanti-web.git](https://git.geigernet.eu/rainer/luanti-web.git) /opt/luweb
|
||||
cd /opt/luweb
|
||||
# Alle Skripte ausführbar machen
|
||||
# Make all scripts executable
|
||||
chmod +x generate_map.sh generate_site.sh check_server_status.sh check_dependencies.sh sync_players.sh sync_areas.sh
|
||||
```
|
||||
-```
|
||||
|
||||
### 2. Globale Konfiguration
|
||||
### 2. Global Configuration
|
||||
|
||||
Die Hauptkonfigurationsdatei ist `config.sh`. Sie müssen diese Datei bearbeiten, um sie an die Umgebung Ihres Servers anzupassen.
|
||||
The main configuration file is `config.sh`. You must edit this file to match your server's environment.
|
||||
|
||||
### 3. Konfiguration pro Welt
|
||||
### 3. Per-World Configuration
|
||||
|
||||
Das System ist so konzipiert, dass **nur Welten mit einer `web.conf`-Datei** im Web-Frontend angezeigt werden. Dies gibt Ihnen die volle Kontrolle darüber, welche Welten öffentlich sichtbar sind. Um eine Welt hinzuzufügen, kopieren Sie die Vorlage `site_generator/examples/web.conf.template` in das Datenverzeichnis der entsprechenden Welt und passen Sie die Werte an.
|
||||
The system is designed so that **only worlds with a `web.conf` file** will be displayed in the web frontend. This gives you full control over which worlds are publicly visible. To add a world, copy the template `site_generator/examples/web.conf.template` into the data directory of the respective world and adjust the values.
|
||||
|
||||
## 📂 Verzeichnisstruktur
|
||||
## 📂 Directory Structure
|
||||
|
||||
```md
|
||||
-```md
|
||||
/opt/luweb/
|
||||
├── config.sh
|
||||
├── generate_map.sh
|
||||
|
|
@ -76,7 +76,7 @@ Das System ist so konzipiert, dass **nur Welten mit einer `web.conf`-Datei** im
|
|||
├── check_dependencies.sh
|
||||
├── sync_players.sh
|
||||
├── sync_areas.sh
|
||||
├── minetestmapper (ausführbare Datei)
|
||||
├── minetestmapper (executable)
|
||||
├── site_generator/
|
||||
│ ├── functions/
|
||||
│ │ └── generators/
|
||||
|
|
@ -88,30 +88,30 @@ Das System ist so konzipiert, dass **nur Welten mit einer `web.conf`-Datei** im
|
|||
└── <world_name>/
|
||||
├── map.png
|
||||
└── map_info.txt
|
||||
```
|
||||
-```
|
||||
|
||||
## 🚀 Nutzung & Automatisierung (Cronjob)
|
||||
## 🚀 Usage & Automation (Cronjob)
|
||||
|
||||
Die Skripte sind für die automatisierte Ausführung konzipiert. Richten Sie sie mit `crontab -e` ein.
|
||||
The scripts are designed for automated execution. Set them up using `crontab -e`.
|
||||
|
||||
```bash
|
||||
# (Häufig) Aktualisiert Spieler- und Server-Status
|
||||
-```bash
|
||||
# (Frequently) Update player and server status
|
||||
* * * * * cd /opt/luweb && ./sync_players.sh >> /var/log/luweb/cron.log 2>&1
|
||||
*/5 * * * * cd /opt/luweb && ./check_server_status.sh >> /var/log/luweb/cron.log 2>&1
|
||||
|
||||
# (Stündlich) Generiert die Basiskarte und Kacheln
|
||||
# (Hourly) Generate the base map and tiles
|
||||
0 * * * * cd /opt/luweb && ./generate_map.sh >> /var/log/luweb/cron.log 2>&1
|
||||
|
||||
# (Seltener) Synchronisiert Grundstücksdaten und baut die Webseite neu
|
||||
# (Infrequently) Sync area data and rebuild the static site
|
||||
45 */12 * * * cd /opt/luweb && ./sync_areas.sh >> /var/log/luweb/cron.log 2>&1
|
||||
30 */12 * * * cd /opt/luweb && ./generate_site.sh >> /var/log/luweb/cron.log 2>&1
|
||||
```
|
||||
-```
|
||||
|
||||
## 📄 Lizenz
|
||||
## 📄 License
|
||||
**MIT License**
|
||||
Copyright (c) 2025 Rage87 - rage87@geigernet.eu
|
||||
|
||||
(Lizenztext wie gehabt)
|
||||
(License text as before)
|
||||
|
||||
## 👤 Autoren
|
||||
## 👤 Authors
|
||||
* **Rage87** (Main-Developer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue