MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _parse_pdf_for_report

Function _parse_pdf_for_report

agents/reading-agent/main.py:2685–2694  ·  view source on GitHub ↗
(pdf_path: str)

Source from the content-addressed store, hash-verified

2683
2684def _parse_pdf_for_report(pdf_path: str) -> Dict[str, Any]:
2685 pdf_parser = _load_pdf_parser()
2686 text = pdf_parser.extract_text_from_pdf(pdf_path)
2687 metadata = pdf_parser.extract_metadata(text)
2688 sections = pdf_parser.extract_sections(text)
2689 return {
2690 **metadata,
2691 "sections": sections,
2692 "full_text": text,
2693 }
2694
2695
2696def _mineru_enabled() -> bool:
2697 return _env_flag("MINERU_PARSE_ENABLED", default=True) and bool(os.environ.get("MINERU_API_KEY", "").strip())

Callers 1

Calls 1

_load_pdf_parserFunction · 0.85

Tested by

no test coverage detected