mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 17:55:26 -04:00
refactor(constants): single source of truth for data dir (#3368)
* refactor(constants): single source of truth for data dir + merge core/src constants Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(contributing): use named src.constants for data paths, drop core/constants references Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -10,10 +10,11 @@ import httpx
|
||||
from core.atomic_io import atomic_write_json
|
||||
from core.platform_compat import safe_chmod
|
||||
from src.secret_storage import decrypt, encrypt, is_encrypted
|
||||
from src.constants import DATA_DIR, INTEGRATIONS_FILE, SETTINGS_FILE
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
DATA_FILE = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data", "integrations.json")
|
||||
DATA_FILE = INTEGRATIONS_FILE
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Presets
|
||||
@@ -471,7 +472,7 @@ def get_integrations_prompt() -> str:
|
||||
def migrate_from_settings() -> None:
|
||||
"""If data/settings.json has miniflux_url and miniflux_api_key, create a
|
||||
Miniflux integration and clear those keys from settings."""
|
||||
settings_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data", "settings.json")
|
||||
settings_path = SETTINGS_FILE
|
||||
if not os.path.exists(settings_path):
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user