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

Function _obsidian_month_dir

agents/reading-agent/main.py:282–292  ·  view source on GitHub ↗
(base_dir: Path, paper: Dict[str, Any], kind: str)

Source from the content-addressed store, hash-verified

280
281
282def _obsidian_month_dir(base_dir: Path, paper: Dict[str, Any], kind: str) -> Optional[Path]:
283 year_dir = _obsidian_year_dir(base_dir, paper)
284 if year_dir is None and kind in {"pdf", "reading_reports"} and _env_flag("PAPERFLOW_DAILY_NOTE_EXPORT", True):
285 year_dir = base_dir / _daily_note_folder_name(paper)
286 if year_dir is None:
287 return None
288 if kind == "pdf":
289 return year_dir / _month_folder_name(paper)
290 if kind == "reading_reports":
291 return year_dir / _deep_reading_folder_name(paper)
292 return None
293
294
295def _safe_filename(value: Any, *, max_len: int = 120) -> str:

Callers 1

_resolve_configured_dirFunction · 0.85

Calls 5

_obsidian_year_dirFunction · 0.85
_daily_note_folder_nameFunction · 0.85
_month_folder_nameFunction · 0.85
_env_flagFunction · 0.70

Tested by

no test coverage detected