refactor: migrate all config paths to ~/.mytoolkit with MYTOOLKIT_HOME support

This commit is contained in:
Zhengshou Lai
2026-06-04 00:52:25 +08:00
parent 3a47e6963d
commit 2d2ff45fca
3 changed files with 10 additions and 6 deletions
+3 -1
View File
@@ -1,11 +1,13 @@
"""External templates registry for md→pdf / md→docx conversion."""
import json
import os
from pathlib import Path
import click
CONFIG_PATH = Path.home() / ".config" / "mytoolkit" / "templates.json"
_HOME = Path(os.environ.get("MYTOOLKIT_HOME", Path.home() / ".mytoolkit"))
CONFIG_PATH = _HOME / "templates.json"
def _read() -> dict: