MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / pdf_validate

Function pdf_validate

utils/src/experiment/crawler.py:112–120  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

110
111
112def pdf_validate(filename: str):
113 try:
114 with open(filename, "rb") as f:
115 num_pages = len(PyPDF2.PdfReader(f).pages)
116 except:
117 return False
118 if num_pages > 16:
119 return False
120 return True
121
122
123async def download_file(

Callers 1

gather_filesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected