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

Function _slug

agents/wiki-agent/ingest/from_feedback.py:42–45  ·  view source on GitHub ↗
(value: str, max_len: int = 80)

Source from the content-addressed store, hash-verified

40
41
42def _slug(value: str, max_len: int = 80) -> str:
43 text = re.sub(r"[^\w.\-]+", "-", str(value or "").strip(), flags=re.UNICODE)
44 text = re.sub(r"-{2,}", "-", text).strip("-._")
45 return (text or "paper")[:max_len]
46
47
48def _paper_key(paper: Dict[str, Any]) -> str:

Callers 1

_paper_keyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected