MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / slugify

Method slugify

scripts/migrate_posts.py:151–156  ·  view source on GitHub ↗
(self, text: str)

Source from the content-addressed store, hash-verified

149 return t.strip()
150
151 def slugify(self, text: str) -> str:
152 text = text.lower()
153 text = re.sub(r"[^\w\s-]", "", text)
154 text = re.sub(r"[\s_]+", "-", text)
155 text = re.sub(r"-+", "-", text)
156 return text.strip("-")[:80]
157
158 def save_post(self, post: dict) -> Tuple[Optional[Path], Optional[dict]]:
159 """Save a single post as a Markdown file."""

Callers 1

save_postMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected