1
0
Fork 0
mirror of https://github.com/homarr-labs/dashboard-icons.git synced 2025-07-03 09:46:29 +02:00
dashboard-icons/scripts/common.py
Meier Lukas d1e008be5f
feat: add issue_templates for creation of icons ()
Co-authored-by: Dashboard Icons Bot <homarr-labs@proton.me>
2025-02-15 15:59:12 +01:00

7 lines
No EOL
239 B
Python

import re
def convert_to_kebab_case(name: str) -> str:
"""Convert a filename to kebab-case."""
cleaned = re.sub(r'[^a-zA-Z0-9\s-]', '', name)
kebab_case_name = re.sub(r'[\s_]+', '-', cleaned).lower()
return kebab_case_name