feat: platform-dependent config path (APPDATA on Windows)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vitali Graf
2026-04-08 10:26:17 +02:00
parent 4997bc6378
commit 5c8eecbb8b
2 changed files with 28 additions and 1 deletions
+9 -1
View File
@@ -1,11 +1,19 @@
"""Konfiguration aus TOML-Datei mit sinnvollen Defaults."""
import os
import sys
from dataclasses import dataclass
from pathlib import Path
import tomllib
DEFAULT_CONFIG_PATH = Path.home() / ".config" / "whisper-local" / "config.toml"
def _default_config_path() -> Path:
if sys.platform == "win32":
return Path(os.environ.get("APPDATA", "")) / "whisper-local" / "config.toml"
return Path.home() / ".config" / "whisper-local" / "config.toml"
DEFAULT_CONFIG_PATH = _default_config_path()
@dataclass