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 return shared_env.env_int(name, default, min_value=min_value, max_value=max_value)
373
374
375def _configured_path(env_name: str, default_relative: str) -> str:
376 notes_root = _configured_notes_root_dir()
377 if notes_root is not None:
378 if env_name in {"PAPERFLOW_PDF_DIR", "PAPERFLOW_READING_REPORTS_DIR"}:
379 return str(notes_root)
380 if env_name == "PAPERFLOW_WIKI_DIR":
381 return str(notes_root / "wiki")
382 raw = os.environ.get(env_name, "").strip()
383 if raw:
384 path = Path(raw).expanduser()
385 if not path.is_absolute():
386 path = PROJECT_ROOT / path
387 return str(path)
388 return str(PROJECT_ROOT / default_relative)
389
390

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