Spaces:
Running
Running
Download modules/sync/config.py from sky-meilin/SkyOSFullCore: direct link, hf CLI and curl.
- Browser
- Download file 2.02 kB
-
https://huggingface.co/spaces/sky-meilin/SkyOSFullCore/resolve/main/modules/sync/config.py
- Command line
-
hf download hf://spaces/sky-meilin/SkyOSFullCore/modules/sync/config.py
-
curl -L -o config.py https://huggingface.co/spaces/sky-meilin/SkyOSFullCore/resolve/main/modules/sync/config.py
2.02 kB
| """ | |
| config.py | |
| SkyOS Sync Configuration | |
| Zentrale Konfiguration für den Sync Manager. | |
| Autor: Sky Meilin | |
| Projekt: SkyOS | |
| """ | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| # --------------------------------------------------------- | |
| # Sync Einstellungen | |
| # --------------------------------------------------------- | |
| class SyncConfig: | |
| """ | |
| Globale Einstellungen für die Synchronisation. | |
| """ | |
| enabled: bool = True | |
| auto_sync: bool = False | |
| sync_interval: int = 300 # Sekunden | |
| retry_attempts: int = 3 | |
| retry_delay: int = 10 # Sekunden | |
| log_sync: bool = True | |
| # --------------------------------------------------------- | |
| # Quellen | |
| # --------------------------------------------------------- | |
| class SourceConfig: | |
| """ | |
| Aktivierte Synchronisationsquellen. | |
| """ | |
| project_cockpit: bool = True | |
| huggingface: bool = True | |
| google_sheets: bool = True | |
| google_drive: bool = True | |
| google_docs: bool = True | |
| wordpress: bool = False | |
| crm: bool = False | |
| # --------------------------------------------------------- | |
| # Konfliktbehandlung | |
| # --------------------------------------------------------- | |
| class ConflictConfig: | |
| """ | |
| Regeln für Konflikte. | |
| """ | |
| strategy: str = "newest" | |
| # Optionen: | |
| # newest | |
| # source | |
| # target | |
| # manual | |
| create_backup: bool = True | |
| backup_folder: str = "backups" | |
| # --------------------------------------------------------- | |
| # Instanzen | |
| # --------------------------------------------------------- | |
| SYNC = SyncConfig() | |
| SOURCES = SourceConfig() | |
| CONFLICT = ConflictConfig() | |
| # --------------------------------------------------------- | |
| # Helper | |
| # --------------------------------------------------------- | |
| def get_config() -> dict: | |
| """ | |
| Gibt die komplette Sync-Konfiguration zurück. | |
| """ | |
| return { | |
| "sync": SYNC, | |
| "sources": SOURCES, | |
| "conflict": CONFLICT, | |
| } |