MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _configured_path

Function _configured_path

deployments/desktop/shared/agents.py:374–387  ·  view source on GitHub ↗
(env_name: str, default_relative: str)

Source from the content-addressed store, hash-verified

372
373
374def _configured_path(env_name: str, default_relative: str) -> str:
375 notes_root = _configured_notes_root_dir()
376 if notes_root is not None:
377 if env_name in {"PAPERFLOW_PDF_DIR", "PAPERFLOW_READING_REPORTS_DIR"}:
378 return str(notes_root)
379 if env_name == "PAPERFLOW_WIKI_DIR":
380 return str(notes_root / "wiki")
381 raw = os.environ.get(env_name, "").strip()
382 if raw:
383 path = Path(raw).expanduser()
384 if not path.is_absolute():
385 path = PROJECT_ROOT / path
386 return str(path)
387 return str(PROJECT_ROOT / default_relative)
388
389
390def _configured_notes_root_dir() -> Optional[Path]:

Callers 5

_reading_report_dirsFunction · 0.85
settingsFunction · 0.85
_export_sourcesFunction · 0.85
_daily_note_rootsFunction · 0.85

Calls 2

getMethod · 0.80

Tested by

no test coverage detected