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

Function _normalize_arxiv_key

deployments/feishu/daily-push-agent/main.py:1039–1048  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

1037 return ""
1038 text = text.replace("https://arxiv.org/abs/", "")
1039 text = text.replace("http://arxiv.org/abs/", "")
1040 text = text.replace("https://arxiv.org/pdf/", "")
1041 text = text.replace("http://arxiv.org/pdf/", "")
1042 text = text.removesuffix(".pdf")
1043 return re.sub(r"v\d+$", "", text)
1044
1045
1046def _normalize_identity_text(value: Any) -> str:
1047 return re.sub(r"[^a-z0-9]+", " ", str(value or "").lower()).strip()
1048
1049
1050def get_user_handled_paper_keys(user_id: str) -> Dict[str, Set[str]]:
1051 """Return paper identities this user has already acted on.

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected