Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb912d66a4 | ||
|
|
a8d9a5ec1a | ||
|
|
65a04781f9 | ||
|
|
602afa7d42 | ||
|
|
0bd37cdd6f |
@@ -0,0 +1,67 @@
|
|||||||
|
name: Build Windows EXE & Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*' # Wird ausgelöst wenn du z.B. "v1.0.0" pushst
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-windows:
|
||||||
|
runs-on: windows-latest # Benötigt einen Windows-Runner!
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Code auschecken
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Python 3.11 installieren
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: FFmpeg installieren (via Chocolatey)
|
||||||
|
run: |
|
||||||
|
choco install ffmpeg -y
|
||||||
|
shell: powershell
|
||||||
|
|
||||||
|
- name: Python-Abhängigkeiten installieren
|
||||||
|
run: |
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install mutagen pydub pyinstaller
|
||||||
|
|
||||||
|
- name: .exe bauen mit PyInstaller
|
||||||
|
run: |
|
||||||
|
pyinstaller `
|
||||||
|
--onefile `
|
||||||
|
--windowed `
|
||||||
|
--icon=icon.ico `
|
||||||
|
--name="fcco-Converter" `
|
||||||
|
--add-data="icon.ico;." `
|
||||||
|
main.py
|
||||||
|
shell: powershell
|
||||||
|
|
||||||
|
- name: Release-Archiv erstellen (ZIP)
|
||||||
|
run: |
|
||||||
|
Compress-Archive -Path dist\fcco-Converter.exe -DestinationPath dist\fcco-Converter-${{ gitea.ref_name }}-windows.zip
|
||||||
|
shell: powershell
|
||||||
|
|
||||||
|
- name: Gitea Release erstellen & EXE hochladen
|
||||||
|
uses: https://gitea.com/actions/gitea-release-action@main
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
tag_name: ${{ gitea.ref_name }}
|
||||||
|
release_name: "fcco-Converter ${{ gitea.ref_name }}"
|
||||||
|
body: |
|
||||||
|
## fcco-Converter ${{ gitea.ref_name }}
|
||||||
|
|
||||||
|
### Download
|
||||||
|
- **fcco-Converter-${{ gitea.ref_name }}-windows.zip** – Windows Standalone (.exe)
|
||||||
|
|
||||||
|
### Voraussetzungen
|
||||||
|
- FFmpeg muss auf dem System installiert sein (oder im PATH liegen)
|
||||||
|
- Beim ersten Start: `settings.json` wird automatisch erstellt
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
1. ZIP entpacken
|
||||||
|
2. `fcco-Converter.exe` starten
|
||||||
|
files: |
|
||||||
|
dist/fcco-Converter-${{ gitea.ref_name }}-windows.zip
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
.DS_Store
|
||||||
|
Cover/*
|
||||||
|
App
|
||||||
|
.venv
|
||||||
|
|
||||||
|
# PyInstaller Build-Artefakte
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Laufzeit-Dateien (werden lokal generiert)
|
||||||
|
history.json
|
||||||
@@ -1,62 +1,70 @@
|
|||||||
# 🎵 WAV zu MP3 Konverter
|
# 🎵 WAV zu MP3 Konverter
|
||||||
|
|
||||||
Ein einfaches, benutzerfreundliches Python-Tool mit grafischer Oberfläche (Tkinter), das WAV-Dateien in MP3-Dateien konvertiert. Es unterstützt automatische Metadaten-Erstellung (Künstler, Album, Titel, Tracknummer) und fügt sogar ein Cover-Bild ein. Alle Dateien werden automatisch alphabetisch sortiert.
|
Ein einfaches, benutzerfreundliches Python-Tool mit grafischer Oberfläche (Tkinter), das WAV-Dateien in MP3-Dateien konvertiert. Es unterstützt automatische Metadaten-Erstellung (Künstler, Album, Titel, Tracknummer) und fügt sogar ein Cover-Bild ein. Alle Dateien werden automatisch alphabetisch sortiert.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ✅ Features
|
## ✅ Features
|
||||||
|
|
||||||
- 📂 Mehrere WAV-Dateien auswählen
|
- 📂 Mehrere WAV-Dateien auswählen
|
||||||
- 📝 Standard-Metadaten definieren (Künstler, Album, Cover)
|
- 📝 Standard-Metadaten definieren (Künstler, Album, Cover)
|
||||||
- 🧠 Vorschau & Bearbeitung der Metadaten vor der Konvertierung
|
- 🧠 Vorschau & Bearbeitung der Metadaten vor der Konvertierung
|
||||||
- 🔄 Automatische Sortierung nach Dateinamen
|
- 🔄 Automatische Sortierung nach Dateinamen
|
||||||
- 🖼️ Cover-Bild einfügen
|
- 🖼️ Cover-Bild einfügen
|
||||||
- 💾 Einstellungen werden gespeichert (Metadaten & letzter Export-Ordner)
|
- 💾 Einstellungen werden gespeichert (Metadaten & letzter Export-Ordner)
|
||||||
- 📊 Fortschrittsbalken während der Konvertierung
|
- 📊 Fortschrittsbalken während der Konvertierung
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🛠️ 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)
|
### 🍏 macOS
|
||||||
- Virtuelle Umgebung
|
1. Öffne ein Terminal und navigiere in das Verzeichnis deines Projekts, oder speziell in den `install` Ordner.
|
||||||
- Alle benötigten Python-Pakete (pydub, mutagen)
|
2. Mache das macOS Installationsskript ausführbar und führe es aus:
|
||||||
- FFmpeg (wird automatisch heruntergeladen & eingebunden)
|
```bash
|
||||||
|
cd install
|
||||||
# Alternativ: Manuell installieren
|
chmod +x install_macos.sh
|
||||||
1. Stelle sicher, dass Python 3.11 oder neuer installiert ist.
|
./install_macos.sh
|
||||||
2. Virtuelle Umgebung erstellen und aktivieren:
|
```
|
||||||
````python -m venv .venv
|
*Dieses Skript nutzt Homebrew, um `python` und `ffmpeg` zu installieren, erstellt eine isolierte virtuelle Umgebung und lädt die benötigten Python-Bibliotheken herunter.*
|
||||||
.venv\Scripts\activate````
|
|
||||||
|
### 🪟 Windows
|
||||||
3. Abhängigkeiten installieren:
|
1. Wechsle in den Unterordner **`install`**.
|
||||||
`````pip install pydub mutagen````
|
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
|
|
||||||
1. main.py ausführen:
|
## 🚀 Anwendung starten
|
||||||
````.venv\Scripts\python.exe main.py````
|
|
||||||
|
Nach der erfolgreichen Installation, kannst du den Konverter immer kinderleicht starten:
|
||||||
2. WAV-Dateien auswählen und konvertieren.
|
|
||||||
|
- **Auf macOS:**
|
||||||
|
Führe **`start.sh`** aus dem Hauptverzeichnis aus. Entweder per Terminal (`./start.sh`) oder per Rechtsklick -> "Öffnen mit" -> "Terminal".
|
||||||
#📁 Projektstruktur
|
|
||||||
|
- **Auf Windows:**
|
||||||
📦 wav-to-mp3-converter
|
Einfach einen Doppelklick auf die Datei **`start.bat`** im Hauptverzeichnis ausführen.
|
||||||
├── setup.bat # Batch-Datei zum Starten der Installation
|
|
||||||
├── setup.ps1 # PowerShell-Setupscript
|
---
|
||||||
├── settings.json # Gespeicherte Einstellungen (automatisch erzeugt)
|
|
||||||
├── main.py # Hauptprogramm mit GUI
|
## 📁 Projektstruktur
|
||||||
└── README.md # Diese Datei
|
|
||||||
|
📦 fcco-Converter
|
||||||
#ℹ️ Hinweise
|
├── main.py # Hauptprogramm mit GUI
|
||||||
Nur .wav-Dateien werden akzeptiert.
|
├── start.bat # Startskript für Windows
|
||||||
|
├── start.sh # Startskript für macOS
|
||||||
Cover muss eine .jpg- oder .jpeg-Datei sein.
|
├── install/ # Installationsskripte
|
||||||
|
│ ├── install_windows.ps1
|
||||||
Export erfolgt im .mp3-Format, benannt nach dem Originaldateinamen.
|
│ └── install_macos.sh
|
||||||
|
├── requirements.txt # Benötigte Python-Bibliotheken
|
||||||
Metadaten können vor jeder Konvertierung überprüft und angepasst werden.
|
└── README.md # Diese Datei
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ℹ️ Hinweise
|
||||||
|
- Nur `.wav`-Dateien werden akzeptiert.
|
||||||
|
- 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.
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
# fcco-Converter.spec
|
||||||
|
# Für lokalen Build auf Windows: pyinstaller fcco-Converter.spec
|
||||||
|
|
||||||
|
block_cipher = None
|
||||||
|
|
||||||
|
a = Analysis(
|
||||||
|
['main.py'],
|
||||||
|
pathex=[],
|
||||||
|
binaries=[],
|
||||||
|
datas=[
|
||||||
|
('icon.ico', '.'), # Icon miteinbinden
|
||||||
|
('settings.json', '.'), # Standard-Settings
|
||||||
|
],
|
||||||
|
hiddenimports=[
|
||||||
|
'mutagen',
|
||||||
|
'mutagen.easyid3',
|
||||||
|
'mutagen.id3',
|
||||||
|
'pydub',
|
||||||
|
'tkinter',
|
||||||
|
'tkinter.ttk',
|
||||||
|
'tkinter.filedialog',
|
||||||
|
'tkinter.messagebox',
|
||||||
|
'tkinter.simpledialog',
|
||||||
|
],
|
||||||
|
hookspath=[],
|
||||||
|
hooksconfig={},
|
||||||
|
runtime_hooks=[],
|
||||||
|
excludes=[],
|
||||||
|
win_no_prefer_redirects=False,
|
||||||
|
win_private_assemblies=False,
|
||||||
|
cipher=block_cipher,
|
||||||
|
noarchive=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
pyz = PYZ(a.pure, a.zlib, cipher=block_cipher)
|
||||||
|
|
||||||
|
exe = EXE(
|
||||||
|
pyz,
|
||||||
|
a.scripts,
|
||||||
|
a.binaries,
|
||||||
|
a.zipfiles,
|
||||||
|
a.datas,
|
||||||
|
[],
|
||||||
|
name='fcco-Converter',
|
||||||
|
debug=False,
|
||||||
|
bootloader_ignore_signals=False,
|
||||||
|
strip=False,
|
||||||
|
upx=True,
|
||||||
|
upx_exclude=[],
|
||||||
|
runtime_tmpdir=None,
|
||||||
|
console=False, # Kein Konsolenfenster (GUI-App)
|
||||||
|
disable_windowed_traceback=False,
|
||||||
|
argv_emulation=False,
|
||||||
|
target_arch=None,
|
||||||
|
codesign_identity=None,
|
||||||
|
entitlements_file=None,
|
||||||
|
icon='icon.ico',
|
||||||
|
)
|
||||||
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
-3
@@ -1,4 +1,2 @@
|
|||||||
pydub
|
pydub
|
||||||
mutagen
|
mutagen
|
||||||
tkinter
|
|
||||||
datetime
|
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
@echo off
|
@echo off
|
||||||
REM Stelle sicher, dass Python 3.11 in deinem PATH ist oder gib den vollständigen Pfad an.
|
start /min python main.py
|
||||||
python3.11 main.py
|
exit
|
||||||
|
|
||||||
REM Optional: Das Fenster bleibt offen, damit du eventuelle Fehlermeldungen sehen kannst.
|
|
||||||
pause
|
|
||||||
Reference in New Issue
Block a user