MCPcopy Create free account
hub / github.com/VectifyAI/PageIndex / convert_page_to_int

Function convert_page_to_int

pageindex/utils.py:541–549  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

539
540
541def convert_page_to_int(data):
542 for item in data:
543 if 'page' in item and isinstance(item['page'], str):
544 try:
545 item['page'] = int(item['page'])
546 except ValueError:
547 # Keep original value if conversion fails
548 pass
549 return data
550
551
552def add_node_text(node, pdf_pages):

Callers 1

toc_transformerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected