Task: URL slugify
# Task: URL slugify
## Deliverable
Implement `slugify(text: str) -> str` in `slugify.py`.
## Spec
- Lowercase the string.
- Replace any run of characters that are **not** ASCII letters or digits with a single `-`.
- Strip leading/trailing `-`.
- Collapse multiple `-` to one (already implied by “run”).
- Empty / all-separator input → `""`.
- Unicode letters: strip them (not kept). Only `[a-z0-9]` remain after processing.
- Do not depend on third-party packages.
## Constraints
- Edit only the starter tree you were given.
- Do not modify hidden tests.
## Done means
`slugify` meets the spec; note how you verified.when to use it
Community prompt sourced from the open-source GitHub repo TinkerandScribe/gxp (MIT). A "Task: URL slugify" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
TinkerandScribe/gxp · MIT
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar