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

Function _doi_value

deployments/desktop/shared/agents.py:199–209  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

197 return ""
198
199
200def _doi_value(value: Any) -> str:
201 text = str(value or "").strip()
202 if not text:
203 return ""
204 lower = text.lower()
205 for prefix in ("https://doi.org/", "http://doi.org/", "doi.org/"):
206 if lower.startswith(prefix):
207 return text[len(prefix) :].strip("/")
208 if lower.startswith("doi:"):
209 return text[4:].strip()
210 return text
211
212

Callers 2

_doi_urlFunction · 0.85
_paper_doiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected