(base_dir: Path, paper: Dict[str, Any], kind: str)
| 280 | |
| 281 | |
| 282 | def _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 | |
| 295 | def _safe_filename(value: Any, *, max_len: int = 120) -> str: |
no test coverage detected