MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / resolve_pdf_path

Function resolve_pdf_path

scripts/extract_source_text.py:75–83  ·  view source on GitHub ↗
(record: dict[str, Any])

Source from the content-addressed store, hash-verified

73
74
75def resolve_pdf_path(record: dict[str, Any]) -> Path | None:
76 for key in ("pdf_path", "local_pdf_path"):
77 value = normalize_whitespace(str(record.get(key, "")))
78 if not value:
79 continue
80 path = Path(value).expanduser()
81 if path.exists() and path.is_file():
82 return path.resolve()
83 return None
84
85
86def section_id(base: str, seen: dict[str, int]) -> str:

Callers 1

mainFunction · 0.85

Calls 1

normalize_whitespaceFunction · 0.90

Tested by

no test coverage detected