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

Function _patch_report_body_institution

deployments/desktop/shared/agents.py:612–620  ·  view source on GitHub ↗
(body: str, institution: str)

Source from the content-addressed store, hash-verified

610 return _extract_institution_from_pdf(metadata.get("pdf_path"))
611
612
613def _patch_report_body_institution(body: str, institution: str) -> str:
614 if not institution:
615 return body
616 return re.sub(
617 r"(^-\s*(?:机构|Affiliation)\s*[::]\s*)(?:未提供|Not provided|unknown|Unknown)\s*$",
618 rf"\g<1>{institution}",
619 body,
620 flags=re.MULTILINE,
621 )
622
623

Callers 1

_report_recordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected