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

Function _report_abs_url

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

Source from the content-addressed store, hash-verified

539 return ""
540
541
542def _report_abs_url(metadata: Dict[str, Any], body: str) -> str:
543 for key in ("abs_url", "paper_url", "url", "openreview_url"):
544 value = str(metadata.get(key) or "").strip()
545 if value.startswith(("http://", "https://")):
546 return value
547 arxiv_id = _extract_arxiv_id(metadata.get("arxiv_id") or metadata.get("pdf_url") or metadata.get("pdf_path"))
548 if arxiv_id:
549 return f"https://arxiv.org/abs/{arxiv_id}"
550 doi_url = _doi_url(metadata.get("doi") or metadata.get("doi_url"))
551 if doi_url:
552 return doi_url
553 return _first_matching_url(body, "/abs/")
554
555

Callers 1

_report_recordFunction · 0.85

Calls 4

_extract_arxiv_idFunction · 0.85
_doi_urlFunction · 0.85
_first_matching_urlFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected