Füge erweiterten Mixcloud RSS Feed Generator hinzu, der echte Audio-URLs extrahiert. Aktualisiere README, um neue Nutzungshinweise und Funktionen zu reflektieren. Ergänze Skripte für Serverstart und Feed-Aktualisierung. Aktualisiere Anforderungen in requirements.txt und füge uv.lock hinzu.
This commit is contained in:
56
run_generator.py
Normal file
56
run_generator.py
Normal file
@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Optimierter Mixcloud RSS Feed Generator
|
||||
Erstellt Podcast-kompatible RSS-Feeds mit direkten Audio-Links.
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
def run_pro_script(*args):
|
||||
"""Führt das Pro-Script mit uv run aus."""
|
||||
cmd = ["uv", "run", "python", "mixcloud_rss_pro.py"] + list(args)
|
||||
|
||||
try:
|
||||
result = subprocess.run(cmd, check=True, capture_output=True, text=True)
|
||||
print(result.stdout)
|
||||
return True
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"❌ Fehler: {e}")
|
||||
if e.stdout:
|
||||
print("STDOUT:", e.stdout)
|
||||
if e.stderr:
|
||||
print("STDERR:", e.stderr)
|
||||
return False
|
||||
except FileNotFoundError:
|
||||
print("❌ uv nicht gefunden. Verwende fallback...")
|
||||
return False
|
||||
|
||||
def main():
|
||||
"""Wrapper für das Pro-Script."""
|
||||
if not Path("mixcloud_rss_pro.py").exists():
|
||||
print("❌ mixcloud_rss_pro.py nicht gefunden!")
|
||||
sys.exit(1)
|
||||
|
||||
# Argumente weiterleiten
|
||||
args = sys.argv[1:]
|
||||
|
||||
print("🚀 Starte optimierten Mixcloud RSS Generator...")
|
||||
print("=" * 50)
|
||||
|
||||
success = run_pro_script(*args)
|
||||
|
||||
if not success:
|
||||
print("\n⚠️ Fallback: Versuche direkten Python-Aufruf...")
|
||||
try:
|
||||
import mixcloud_rss_pro
|
||||
# Hier könntest du das Script direkt aufrufen
|
||||
print("❌ Bitte verwende: uv run python mixcloud_rss_pro.py")
|
||||
except ImportError as e:
|
||||
print(f"❌ Import-Fehler: {e}")
|
||||
print("💡 Installiere die Abhängigkeiten: uv pip install -r requirements.txt")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Reference in New Issue
Block a user