🎉 Feat/DB: Enhanced database logging & WAL management for improved stability and performance in backend/database/myp.db-wal
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# PowerShell-Skript für automatische Screenshots
|
||||
# PowerShell-Skript fuer automatische Screenshots
|
||||
# =============================================
|
||||
|
||||
param(
|
||||
@ -10,72 +10,72 @@ param(
|
||||
)
|
||||
|
||||
Write-Host "===============================================" -ForegroundColor Cyan
|
||||
Write-Host "🎯 AUTOMATISCHES SCREENSHOT-TOOL FÜR SCHULUNGEN" -ForegroundColor Yellow
|
||||
Write-Host "AUTOMATISCHES SCREENSHOT-TOOL FUER SCHULUNGEN" -ForegroundColor Yellow
|
||||
Write-Host "===============================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Arbeitsverzeichnis zum Skript-Ordner ändern
|
||||
# Arbeitsverzeichnis zum Skript-Ordner aendern
|
||||
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
Set-Location $ScriptDir
|
||||
|
||||
# Prüfe ob Python verfügbar ist
|
||||
# Pruefe ob Python verfuegbar ist
|
||||
try {
|
||||
$pythonVersion = python --version 2>&1
|
||||
Write-Host "✅ Python gefunden: $pythonVersion" -ForegroundColor Green
|
||||
Write-Host "Python gefunden: $pythonVersion" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host "❌ Python nicht gefunden!" -ForegroundColor Red
|
||||
Write-Host "💡 Installieren Sie Python von https://python.org" -ForegroundColor Yellow
|
||||
Write-Host "Python nicht gefunden!" -ForegroundColor Red
|
||||
Write-Host "Installieren Sie Python von https://python.org" -ForegroundColor Yellow
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Prüfe ob Selenium installiert ist
|
||||
$seleniumCheck = python -c "import selenium; print('✅ Selenium verfügbar')" 2>&1
|
||||
# Pruefe ob Selenium installiert ist
|
||||
$seleniumCheck = python -c "import selenium; print('Selenium verfuegbar')" 2>&1
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "⚠️ Selenium nicht installiert. Installiere jetzt..." -ForegroundColor Yellow
|
||||
Write-Host "Selenium nicht installiert. Installiere jetzt..." -ForegroundColor Yellow
|
||||
pip install selenium webdriver-manager
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "❌ Selenium-Installation fehlgeschlagen!" -ForegroundColor Red
|
||||
Write-Host "Selenium-Installation fehlgeschlagen!" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
Write-Host "✅ Selenium erfolgreich installiert" -ForegroundColor Green
|
||||
Write-Host "Selenium erfolgreich installiert" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host $seleniumCheck -ForegroundColor Green
|
||||
}
|
||||
|
||||
# Prüfe ChromeDriver
|
||||
$chromeCheck = python -c "from selenium import webdriver; from selenium.webdriver.chrome.service import Service; print('✅ Chrome WebDriver verfügbar')" 2>&1
|
||||
# Pruefe ChromeDriver
|
||||
$chromeCheck = python -c "exec('from selenium import webdriver'); exec('from selenium.webdriver.chrome.service import Service'); print('Chrome WebDriver verfuegbar')" 2>&1
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "⚠️ ChromeDriver nicht gefunden. Installiere webdriver-manager..." -ForegroundColor Yellow
|
||||
Write-Host "ChromeDriver nicht gefunden. Installiere webdriver-manager..." -ForegroundColor Yellow
|
||||
pip install webdriver-manager
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "❌ WebDriver-Manager-Installation fehlgeschlagen!" -ForegroundColor Red
|
||||
Write-Host "💡 Manuell ChromeDriver von https://chromedriver.chromium.org/ herunterladen" -ForegroundColor Yellow
|
||||
Write-Host "WebDriver-Manager-Installation fehlgeschlagen!" -ForegroundColor Red
|
||||
Write-Host "Manuell ChromeDriver von https://chromedriver.chromium.org/ herunterladen" -ForegroundColor Yellow
|
||||
} else {
|
||||
Write-Host "✅ WebDriver-Manager installiert" -ForegroundColor Green
|
||||
Write-Host "WebDriver-Manager installiert" -ForegroundColor Green
|
||||
}
|
||||
}
|
||||
|
||||
# Flask-App verfügbarkeit prüfen
|
||||
# Flask-App verfuegbarkeit pruefen
|
||||
Write-Host ""
|
||||
Write-Host "Prüfe Flask-App..." -ForegroundColor Blue
|
||||
$flaskCheck = python -c "import sys; sys.path.append('..'); exec('from app import app'); print('Flask-App verfügbar')" 2>&1
|
||||
Write-Host "Pruefe Flask-App..." -ForegroundColor Blue
|
||||
$flaskCheck = python -c "import sys; sys.path.append('..'); exec('from app import app'); print('Flask-App verfuegbar')" 2>&1
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Flask-App nicht direkt verfügbar" -ForegroundColor Yellow
|
||||
Write-Host "Flask-App nicht direkt verfuegbar" -ForegroundColor Yellow
|
||||
Write-Host "Das Tool wird mit Standard-Routen arbeiten" -ForegroundColor Blue
|
||||
} else {
|
||||
Write-Host $flaskCheck -ForegroundColor Green
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "🚀 STARTE SCREENSHOT-TOOL" -ForegroundColor Green
|
||||
Write-Host "=" * 30 -ForegroundColor Green
|
||||
Write-Host "STARTE SCREENSHOT-TOOL" -ForegroundColor Green
|
||||
Write-Host "==============================" -ForegroundColor Green
|
||||
|
||||
# Parameter für das Python-Skript vorbereiten
|
||||
# Parameter fuer das Python-Skript vorbereiten
|
||||
$pythonArgs = @("screenshot_tool.py")
|
||||
|
||||
if ($QuickRun) {
|
||||
Write-Host "⚡ Quick-Run-Modus aktiviert" -ForegroundColor Yellow
|
||||
# Setze Umgebungsvariablen für automatische Konfiguration
|
||||
Write-Host "Quick-Run-Modus aktiviert" -ForegroundColor Yellow
|
||||
# Setze Umgebungsvariablen fuer automatische Konfiguration
|
||||
$env:SCREENSHOT_AUTO_MODE = "true"
|
||||
$env:SCREENSHOT_HEADLESS = "true"
|
||||
|
||||
@ -88,13 +88,13 @@ if ($QuickRun) {
|
||||
}
|
||||
}
|
||||
|
||||
# Tool ausführen
|
||||
# Tool ausfuehren
|
||||
try {
|
||||
if ($Interactive) {
|
||||
Write-Host "🎛️ Interaktiver Modus - Folgen Sie den Anweisungen" -ForegroundColor Blue
|
||||
Write-Host "Interaktiver Modus - Folgen Sie den Anweisungen" -ForegroundColor Blue
|
||||
python @pythonArgs
|
||||
} else {
|
||||
Write-Host "🤖 Automatischer Modus" -ForegroundColor Blue
|
||||
Write-Host "Automatischer Modus" -ForegroundColor Blue
|
||||
python @pythonArgs
|
||||
}
|
||||
|
||||
@ -102,17 +102,17 @@ try {
|
||||
|
||||
if ($exitCode -eq 0) {
|
||||
Write-Host ""
|
||||
Write-Host "🎉 SCREENSHOT-ERSTELLUNG ERFOLGREICH ABGESCHLOSSEN!" -ForegroundColor Green
|
||||
Write-Host "SCREENSHOT-ERSTELLUNG ERFOLGREICH ABGESCHLOSSEN!" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
|
||||
# Zeige Ausgabe-Ordner an
|
||||
$outputPath = "docs\schulung\screenshots"
|
||||
if (Test-Path $outputPath) {
|
||||
Write-Host "📁 Screenshots verfügbar in:" -ForegroundColor Blue
|
||||
Write-Host "Screenshots verfuegbar in:" -ForegroundColor Blue
|
||||
Write-Host " $(Resolve-Path $outputPath)" -ForegroundColor White
|
||||
|
||||
# Frage ob Ordner geöffnet werden soll
|
||||
$openFolder = Read-Host "📂 Möchten Sie den Screenshot-Ordner öffnen? (j/n)"
|
||||
# Frage ob Ordner geoeffnet werden soll
|
||||
$openFolder = Read-Host "Moechten Sie den Screenshot-Ordner oeffnen? (j/n)"
|
||||
if ($openFolder -eq "j" -or $openFolder -eq "ja" -or $openFolder -eq "y" -or $openFolder -eq "yes") {
|
||||
Start-Process "explorer.exe" -ArgumentList (Resolve-Path $outputPath)
|
||||
}
|
||||
@ -122,10 +122,10 @@ try {
|
||||
$reportPath = "$outputPath\screenshot_bericht.md"
|
||||
if (Test-Path $reportPath) {
|
||||
Write-Host ""
|
||||
Write-Host "📊 Detaillierter Bericht verfügbar:" -ForegroundColor Blue
|
||||
Write-Host "Detaillierter Bericht verfuegbar:" -ForegroundColor Blue
|
||||
Write-Host " $(Resolve-Path $reportPath)" -ForegroundColor White
|
||||
|
||||
$openReport = Read-Host "📖 Möchten Sie den Bericht öffnen? (j/n)"
|
||||
$openReport = Read-Host "Moechten Sie den Bericht oeffnen? (j/n)"
|
||||
if ($openReport -eq "j" -or $openReport -eq "ja" -or $openReport -eq "y" -or $openReport -eq "yes") {
|
||||
Start-Process "notepad.exe" -ArgumentList (Resolve-Path $reportPath)
|
||||
}
|
||||
@ -133,37 +133,37 @@ try {
|
||||
|
||||
} else {
|
||||
Write-Host ""
|
||||
Write-Host "❌ FEHLER BEI DER SCREENSHOT-ERSTELLUNG" -ForegroundColor Red
|
||||
Write-Host "📋 Überprüfen Sie die Logs für Details" -ForegroundColor Yellow
|
||||
Write-Host "FEHLER BEI DER SCREENSHOT-ERSTELLUNG" -ForegroundColor Red
|
||||
Write-Host "Ueberpruefen Sie die Logs fuer Details" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
} catch {
|
||||
Write-Host ""
|
||||
Write-Host "❌ UNERWARTETER FEHLER: $($_.Exception.Message)" -ForegroundColor Red
|
||||
Write-Host "UNERWARTETER FEHLER: $($_.Exception.Message)" -ForegroundColor Red
|
||||
$exitCode = 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "💡 VERWENDUNGSHINWEISE FÜR SCHULUNGEN:" -ForegroundColor Cyan
|
||||
Write-Host "=" * 40 -ForegroundColor Cyan
|
||||
Write-Host "• Admin-Screenshots: docs\schulung\screenshots\admin\" -ForegroundColor White
|
||||
Write-Host "• Benutzer-Screenshots: docs\schulung\screenshots\benutzer\" -ForegroundColor White
|
||||
Write-Host "• Öffentliche Screenshots: docs\schulung\screenshots\oeffentlich\" -ForegroundColor White
|
||||
Write-Host "• Verschiedene Auflösungen in Unterordnern verfügbar" -ForegroundColor White
|
||||
Write-Host "• Perfekt für PowerPoint-Präsentationen geeignet" -ForegroundColor White
|
||||
Write-Host "VERWENDUNGSHINWEISE FUER SCHULUNGEN:" -ForegroundColor Cyan
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host "- Admin-Screenshots: docs\schulung\screenshots\admin\" -ForegroundColor White
|
||||
Write-Host "- Benutzer-Screenshots: docs\schulung\screenshots\benutzer\" -ForegroundColor White
|
||||
Write-Host "- Oeffentliche Screenshots: docs\schulung\screenshots\oeffentlich\" -ForegroundColor White
|
||||
Write-Host "- Verschiedene Aufloesungen in Unterordnern verfuegbar" -ForegroundColor White
|
||||
Write-Host "- Perfekt fuer PowerPoint-Praesentationen geeignet" -ForegroundColor White
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "🎓 TIPPS FÜR PRÄSENTATIONEN:" -ForegroundColor Yellow
|
||||
Write-Host "• Desktop-Screenshots für Hauptpräsentationen verwenden" -ForegroundColor White
|
||||
Write-Host "• Mobile-Screenshots für Responsive-Design zeigen" -ForegroundColor White
|
||||
Write-Host "• Admin-Ordner für Administrator-Schulungen" -ForegroundColor White
|
||||
Write-Host "• Benutzer-Ordner für allgemeine Mitarbeiterschulungen" -ForegroundColor White
|
||||
Write-Host "TIPPS FUER PRAESENTATIONEN:" -ForegroundColor Yellow
|
||||
Write-Host "- Desktop-Screenshots fuer Hauptpraesentationen verwenden" -ForegroundColor White
|
||||
Write-Host "- Mobile-Screenshots fuer Responsive-Design zeigen" -ForegroundColor White
|
||||
Write-Host "- Admin-Ordner fuer Administrator-Schulungen" -ForegroundColor White
|
||||
Write-Host "- Benutzer-Ordner fuer allgemeine Mitarbeiterschulungen" -ForegroundColor White
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "📞 Bei Problemen:" -ForegroundColor Magenta
|
||||
Write-Host "• Log-Datei prüfen: screenshot_tool.log" -ForegroundColor White
|
||||
Write-Host "• Server läuft auf korrekter URL?" -ForegroundColor White
|
||||
Write-Host "• Admin-Zugangsdaten korrekt?" -ForegroundColor White
|
||||
Write-Host "• ChromeDriver installiert?" -ForegroundColor White
|
||||
Write-Host "Bei Problemen:" -ForegroundColor Magenta
|
||||
Write-Host "- Log-Datei pruefen: screenshot_tool.log" -ForegroundColor White
|
||||
Write-Host "- Server laeuft auf korrekter URL?" -ForegroundColor White
|
||||
Write-Host "- Admin-Zugangsdaten korrekt?" -ForegroundColor White
|
||||
Write-Host "- ChromeDriver installiert?" -ForegroundColor White
|
||||
|
||||
exit $exitCode
|
0
backend/scripts/screenshot_tool.log
Normal file
0
backend/scripts/screenshot_tool.log
Normal file
Reference in New Issue
Block a user