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

Function section_ids_for_page

scripts/extract_source_text.py:181–189  ·  view source on GitHub ↗
(sections: list[dict[str, Any]], page_number: int)

Source from the content-addressed store, hash-verified

179
180
181def section_ids_for_page(sections: list[dict[str, Any]], page_number: int) -> list[str]:
182 ids = [
183 str(section.get("section_id", ""))
184 for section in sections
185 if int(section.get("page_start", 0) or 0)
186 <= page_number
187 <= int(section.get("page_end", 0) or 0)
188 ]
189 return [sid for sid in ids if sid]
190
191
192def build_pages(

Callers 2

build_pagesFunction · 0.85
primary_section_for_pageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected