gerd.lldap: added initial bootstrap
This commit is contained in:
parent
5749b1cf66
commit
06f5d3a5fb
5 changed files with 758 additions and 0 deletions
10
machines/gerd/services/lldap/bootstrap/utils.py
Normal file
10
machines/gerd/services/lldap/bootstrap/utils.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
import re
|
||||
|
||||
|
||||
def to_camelcase(s):
|
||||
s = re.sub(r"(_|-)+", " ", s).title().replace(" ", "").replace("*", "")
|
||||
return "".join([s[0].lower(), s[1:]])
|
||||
|
||||
|
||||
def to_snakecase(s):
|
||||
return re.sub(r"(?<!^)(?=[A-Z])", "_", s).lower()
|
Loading…
Add table
Add a link
Reference in a new issue