Project setup

This commit is contained in:
2026-05-12 13:04:34 +02:00
parent 47d298f4ad
commit 43e510b93d
19 changed files with 2034 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
import re
def slugify(input : str) -> str:
s = input.lower()
s = re.sub(r'\s+', '_', s)
s = re.sub(r'[^a-z0-9_]+', '', s)
s = re.sub(r'_+', '_', s)
s = s.strip('_')
if not s:
s = 'buttonplus'
while len(s) > 1 and s[0].isdigit():
s = s[1:]
return s