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

Function new_record

scripts/extract_source_text.py:110–120  ·  view source on GitHub ↗
(kind: str, title: str, page_number: int, seen: dict[str, int])

Source from the content-addressed store, hash-verified

108
109
110def new_record(kind: str, title: str, page_number: int, seen: dict[str, int]) -> dict[str, Any]:
111 sid = section_id(title or kind, seen)
112 return {
113 "record_type": "section",
114 "section_id": sid,
115 "kind": kind,
116 "title": normalize_whitespace(title) or kind,
117 "page_start": page_number,
118 "page_end": page_number,
119 "_lines": [],
120 }
121
122
123def finalize_section(record: dict[str, Any]) -> dict[str, Any] | None:

Callers 1

extract_raw_sectionsFunction · 0.85

Calls 2

normalize_whitespaceFunction · 0.90
section_idFunction · 0.85

Tested by

no test coverage detected