Initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def get_config_dir() -> Path:
|
||||
"""Return the user configuration directory for hunyuan3dweb."""
|
||||
xdg = os.environ.get("XDG_CONFIG_HOME")
|
||||
base = Path(xdg) if xdg else Path.home() / ".config"
|
||||
path = base / "hunyuan3dweb"
|
||||
path.mkdir(parents=True, exist_ok=True)
|
||||
return path
|
||||
|
||||
|
||||
def get_cookie_path() -> Path:
|
||||
"""Return the path to the cookies file."""
|
||||
return get_config_dir() / "cookies.txt"
|
||||
|
||||
|
||||
def get_profile_dir() -> Path:
|
||||
"""Return the path to the browser profile directory."""
|
||||
path = get_config_dir() / "profile"
|
||||
path.mkdir(parents=True, exist_ok=True)
|
||||
return path
|
||||
Reference in New Issue
Block a user