Feat(video): Implement full video ingestion pipeline using yt-dlp, Whisper transcription, and LLM summarization; updates Ollama client to support options.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@@ -87,6 +88,25 @@ def library_root() -> Path:
|
||||
return _ensure_dir(DEFAULT_LIB_ROOT)
|
||||
|
||||
|
||||
def tool_root() -> Path:
|
||||
explicit_path = _path_from_env("HEIMGEIST_TOOL_DIR")
|
||||
if explicit_path is not None:
|
||||
return _ensure_dir(explicit_path)
|
||||
|
||||
base_dir = data_dir()
|
||||
if base_dir is not None:
|
||||
return _ensure_dir(base_dir / "tools")
|
||||
|
||||
if sys.platform == "darwin":
|
||||
return _ensure_dir(Path.home() / "Library" / "Application Support" / "Heimgeist" / "tools")
|
||||
if os.name == "nt":
|
||||
appdata = os.getenv("LOCALAPPDATA") or os.getenv("APPDATA")
|
||||
root = Path(appdata) if appdata else Path.home() / "AppData" / "Local"
|
||||
return _ensure_dir(root / "Heimgeist" / "tools")
|
||||
xdg_data = Path(os.getenv("XDG_DATA_HOME", str(Path.home() / ".local" / "share")))
|
||||
return _ensure_dir(xdg_data / "Heimgeist" / "tools")
|
||||
|
||||
|
||||
def sqlite_database_url(path: Path | None = None) -> str:
|
||||
target = path or database_path()
|
||||
return f"sqlite:///{target.as_posix()}"
|
||||
|
||||
Reference in New Issue
Block a user