v1.4.0
This commit is contained in:
@@ -16,47 +16,55 @@ Ein einfaches, benutzerfreundliches Python-Tool mit grafischer Oberfläche (Tkin
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🛠️ Setup
|
## 🛠️ Installation
|
||||||
|
|
||||||
# Automatisches Setup starten
|
Damit das Programm reibungslos funktioniert, gibt es Installationsskripte, die automatisch alle benötigten Komponenten (`Python`, virtuelle Umgebung, Abhängigkeiten sowie `FFmpeg`) für dein System herunterladen und einrichten.
|
||||||
Windows-Nutzer können einfach ````setup.bat````` ausführen – es installiert:
|
|
||||||
- Python (falls nicht vorhanden)
|
|
||||||
- Virtuelle Umgebung
|
|
||||||
- Alle benötigten Python-Pakete (pydub, mutagen)
|
|
||||||
- FFmpeg (wird automatisch heruntergeladen & eingebunden)
|
|
||||||
|
|
||||||
# Alternativ: Manuell installieren
|
### 🍏 macOS
|
||||||
1. Stelle sicher, dass Python 3.11 oder neuer installiert ist.
|
1. Öffne ein Terminal und navigiere in das Verzeichnis deines Projekts, oder speziell in den `install` Ordner.
|
||||||
2. Virtuelle Umgebung erstellen und aktivieren:
|
2. Mache das macOS Installationsskript ausführbar und führe es aus:
|
||||||
````python -m venv .venv
|
```bash
|
||||||
.venv\Scripts\activate````
|
cd install
|
||||||
|
chmod +x install_macos.sh
|
||||||
|
./install_macos.sh
|
||||||
|
```
|
||||||
|
*Dieses Skript nutzt Homebrew, um `python` und `ffmpeg` zu installieren, erstellt eine isolierte virtuelle Umgebung und lädt die benötigten Python-Bibliotheken herunter.*
|
||||||
|
|
||||||
3. Abhängigkeiten installieren:
|
### 🪟 Windows
|
||||||
`````pip install pydub mutagen````
|
1. Wechsle in den Unterordner **`install`**.
|
||||||
|
2. Mach einen **Rechtsklick** auf die Datei **`install_windows.ps1`** und wähle **"Mit PowerShell ausführen"**.
|
||||||
|
*Dieses Skript prüft und installiert `python` und `ffmpeg` mithilfe von WinGet, erstellt dann eine virtuelle `.venv` und installiert die nötigen Pakete.*
|
||||||
|
|
||||||
4. FFmpeg herunterladen und den bin-Ordner zur PATH-Umgebungsvariable hinzufügen.
|
---
|
||||||
|
|
||||||
# 🚀 Anwendung starten
|
## 🚀 Anwendung starten
|
||||||
1. main.py ausführen:
|
|
||||||
````.venv\Scripts\python.exe main.py````
|
|
||||||
|
|
||||||
2. WAV-Dateien auswählen und konvertieren.
|
Nach der erfolgreichen Installation, kannst du den Konverter immer kinderleicht starten:
|
||||||
|
|
||||||
|
- **Auf macOS:**
|
||||||
|
Führe **`start.sh`** aus dem Hauptverzeichnis aus. Entweder per Terminal (`./start.sh`) oder per Rechtsklick -> "Öffnen mit" -> "Terminal".
|
||||||
|
|
||||||
#📁 Projektstruktur
|
- **Auf Windows:**
|
||||||
|
Einfach einen Doppelklick auf die Datei **`start.bat`** im Hauptverzeichnis ausführen.
|
||||||
|
|
||||||
📦 wav-to-mp3-converter
|
---
|
||||||
├── setup.bat # Batch-Datei zum Starten der Installation
|
|
||||||
├── setup.ps1 # PowerShell-Setupscript
|
## 📁 Projektstruktur
|
||||||
├── settings.json # Gespeicherte Einstellungen (automatisch erzeugt)
|
|
||||||
|
📦 fcco-Converter
|
||||||
├── main.py # Hauptprogramm mit GUI
|
├── main.py # Hauptprogramm mit GUI
|
||||||
|
├── start.bat # Startskript für Windows
|
||||||
|
├── start.sh # Startskript für macOS
|
||||||
|
├── install/ # Installationsskripte
|
||||||
|
│ ├── install_windows.ps1
|
||||||
|
│ └── install_macos.sh
|
||||||
|
├── requirements.txt # Benötigte Python-Bibliotheken
|
||||||
└── README.md # Diese Datei
|
└── README.md # Diese Datei
|
||||||
|
|
||||||
#ℹ️ Hinweise
|
---
|
||||||
Nur .wav-Dateien werden akzeptiert.
|
|
||||||
|
|
||||||
Cover muss eine .jpg- oder .jpeg-Datei sein.
|
## ℹ️ Hinweise
|
||||||
|
- Nur `.wav`-Dateien werden akzeptiert.
|
||||||
Export erfolgt im .mp3-Format, benannt nach dem Originaldateinamen.
|
- Cover müssen eine `.jpg`- oder `.jpeg`-Datei sein.
|
||||||
|
- Export erfolgt im `.mp3`-Format, z.B. benannt nach dem Originaldateinamen.
|
||||||
Metadaten können vor jeder Konvertierung überprüft und angepasst werden.
|
- Metadaten können vor jeder Konvertierung überprüft und angepasst werden.
|
||||||
Executable
+33
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo "Starte macOS Installation für fcco-Converter..."
|
||||||
|
|
||||||
|
# Ins Root-Verzeichnis wechseln
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
# Prüfe Homebrew
|
||||||
|
if ! command -v brew &> /dev/null; then
|
||||||
|
echo "Homebrew ist nicht installiert. Installiere Homebrew..."
|
||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Installiere Abhängigkeiten via Homebrew
|
||||||
|
echo "Installiere Python und FFmpeg falls nötig..."
|
||||||
|
brew install python ffmpeg python-tk@3.11
|
||||||
|
|
||||||
|
# Virtuelle Umgebung erstellen
|
||||||
|
if [ ! -d ".venv" ]; then
|
||||||
|
echo "Erstelle virtuelle Umgebung..."
|
||||||
|
python3 -m venv .venv
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Pakete installieren
|
||||||
|
echo "Installiere Python-Pakete..."
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
echo "==================="
|
||||||
|
echo "Installation abgeschlossen!"
|
||||||
|
echo "Du kannst das Programm nun mit einem Doppelklick auf 'start.sh' im Hauptordner starten,"
|
||||||
|
echo "oder im Terminal './start.sh' ausführen."
|
||||||
|
echo "==================="
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
Write-Host "Starte Windows Installation für fcco-Converter..." -ForegroundColor Cyan
|
||||||
|
|
||||||
|
# Ins Root-Verzeichnis wechseln
|
||||||
|
$PSScriptRoot = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
|
||||||
|
Set-Location -Path "$PSScriptRoot\.."
|
||||||
|
|
||||||
|
Write-Host "Überprüfe FFmpeg..." -ForegroundColor Yellow
|
||||||
|
if (Get-Command ffmpeg -ErrorAction SilentlyContinue) {
|
||||||
|
Write-Host "FFmpeg ist bereits installiert." -ForegroundColor Green
|
||||||
|
} else {
|
||||||
|
Write-Host "Installiere FFmpeg via winget..." -ForegroundColor Yellow
|
||||||
|
winget install --id "Gyan.FFmpeg" --accept-package-agreements --accept-source-agreements
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Überprüfe Python..." -ForegroundColor Yellow
|
||||||
|
if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
|
||||||
|
Write-Host "Python ist nicht installiert. Installiere Python via winget..." -ForegroundColor Yellow
|
||||||
|
winget install --id "Python.Python.3.11" --accept-package-agreements --accept-source-agreements
|
||||||
|
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
|
||||||
|
} else {
|
||||||
|
Write-Host "Python ist bereits installiert." -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path ".venv")) {
|
||||||
|
Write-Host "Erstelle virtuelle Umgebung (.venv)..." -ForegroundColor Yellow
|
||||||
|
python -m venv .venv
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Installiere Python-Pakete..." -ForegroundColor Yellow
|
||||||
|
& .\.venv\Scripts\python.exe -m pip install --upgrade pip
|
||||||
|
& .\.venv\Scripts\python.exe -m pip install -r requirements.txt
|
||||||
|
|
||||||
|
Write-Host "===================" -ForegroundColor Cyan
|
||||||
|
Write-Host "Installation abgeschlossen!" -ForegroundColor Green
|
||||||
|
Write-Host "Du kannst das Programm nun mit einem Doppelklick auf 'start.bat' im Hauptordner starten." -ForegroundColor White
|
||||||
|
Write-Host "===================" -ForegroundColor Cyan
|
||||||
|
Pause
|
||||||
@@ -61,8 +61,14 @@ except:
|
|||||||
|
|
||||||
settings = load_settings()
|
settings = load_settings()
|
||||||
|
|
||||||
|
def set_window_icon(window):
|
||||||
|
try:
|
||||||
|
window.iconbitmap("icon.ico")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
root = Tk()
|
root = Tk()
|
||||||
root.iconbitmap("icon.ico")
|
set_window_icon(root)
|
||||||
root.title("fcco Converter")
|
root.title("fcco Converter")
|
||||||
root.geometry("800x1200")
|
root.geometry("800x1200")
|
||||||
|
|
||||||
@@ -134,7 +140,7 @@ def extract_event_from_folder(file_path):
|
|||||||
|
|
||||||
def open_settings_window():
|
def open_settings_window():
|
||||||
win = Toplevel(root)
|
win = Toplevel(root)
|
||||||
win.iconbitmap("icon.ico")
|
set_window_icon(win)
|
||||||
win.title("Einstellungen")
|
win.title("Einstellungen")
|
||||||
win.geometry("500x600")
|
win.geometry("500x600")
|
||||||
|
|
||||||
@@ -200,7 +206,7 @@ def confirm_metadata_and_type():
|
|||||||
meta["year"] = str(datetime.now().year)
|
meta["year"] = str(datetime.now().year)
|
||||||
|
|
||||||
win = Toplevel(root)
|
win = Toplevel(root)
|
||||||
win.iconbitmap("icon.ico")
|
set_window_icon(win)
|
||||||
win.title("Metadaten und Exportoptionen")
|
win.title("Metadaten und Exportoptionen")
|
||||||
win.geometry("650x650")
|
win.geometry("650x650")
|
||||||
|
|
||||||
@@ -422,7 +428,7 @@ def convert():
|
|||||||
|
|
||||||
# Custom completion popup with "OK" and "Programm schließen"
|
# Custom completion popup with "OK" and "Programm schließen"
|
||||||
win = Toplevel(root)
|
win = Toplevel(root)
|
||||||
win.iconbitmap("icon.ico")
|
set_window_icon(win)
|
||||||
win.title("Konvertierung abgeschlossen")
|
win.title("Konvertierung abgeschlossen")
|
||||||
win.geometry("300x150")
|
win.geometry("300x150")
|
||||||
Label(win, text="Konvertierung abgeschlossen!", font=("Arial", 12)).pack(pady=20)
|
Label(win, text="Konvertierung abgeschlossen!", font=("Arial", 12)).pack(pady=20)
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
pydub
|
pydub
|
||||||
mutagen
|
mutagen
|
||||||
tkinter
|
|
||||||
datetime
|
|
||||||
@@ -1,6 +1,11 @@
|
|||||||
@echo off
|
@echo off
|
||||||
REM Stelle sicher, dass Python 3.11 in deinem PATH ist oder gib den vollständigen Pfad an.
|
cd /d "%~dp0"
|
||||||
python3.11 main.py
|
|
||||||
|
|
||||||
REM Optional: Das Fenster bleibt offen, damit du eventuelle Fehlermeldungen sehen kannst.
|
IF NOT EXIST ".venv" (
|
||||||
|
echo Die virtuelle Umgebung fehlt.
|
||||||
|
echo Bitte fuehre zuerst die Installation (install\install_windows.ps1) aus!
|
||||||
pause
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
start "" /B ".venv\Scripts\pythonw.exe" main.py
|
||||||
Reference in New Issue
Block a user