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

Method slugify

scripts/migrate_wordpress.py:179–185  ·  view source on GitHub ↗

Convert text to URL-safe slug.

(self, text: str)

Source from the content-addressed store, hash-verified

177 return t.strip()
178
179 def slugify(self, text: str) -> str:
180 """Convert text to URL-safe slug."""
181 text = text.lower()
182 text = re.sub(r"[^\w\s-]", "", text)
183 text = re.sub(r"[\s_]+", "-", text)
184 text = re.sub(r"-+", "-", text)
185 return text.strip("-")[:80]
186
187 def build_front_matter(self, doc: dict, output_path: str, regulation: str) -> dict:
188 """Build YAML front matter metadata from WordPress doc."""

Callers 2

build_front_matterMethod · 0.95
save_documentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected