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

Function _report_institution

deployments/desktop/shared/agents.py:599–609  ·  view source on GitHub ↗
(metadata: Dict[str, Any])

Source from the content-addressed store, hash-verified

597 return "; ".join(institutions[:8])
598
599
600def _report_institution(metadata: Dict[str, Any]) -> str:
601 for key in ("institution", "affiliation", "institutions", "affiliations"):
602 value = metadata.get(key)
603 if isinstance(value, list):
604 joined = "; ".join(str(item).strip() for item in value if str(item).strip())
605 if joined:
606 return joined
607 text = str(value or "").strip()
608 if text and text not in {"未提供", "Not provided", "unknown", "Unknown"}:
609 return text
610 return _extract_institution_from_pdf(metadata.get("pdf_path"))
611
612

Callers 1

_report_recordFunction · 0.85

Calls 2

getMethod · 0.80

Tested by

no test coverage detected