Added minimal outputting to files
parent
88c93ae18d
commit
3a86e10c0b
|
@ -0,0 +1,25 @@
|
|||
""" Makes the configs as a massive string """
|
||||
def makeCFG(cfg):
|
||||
ret = ''
|
||||
for key, data in cfg.items():
|
||||
# I know all of these fields exist because it was verified in verify.py
|
||||
bindType = firstTypeIn(data.keys())
|
||||
bindContent = data[bindType]
|
||||
ret += branch(key, bindType, bindContent)
|
||||
|
||||
return ret
|
||||
|
||||
def firstTypeIn(inputList):
|
||||
""" Find the first element common to both lists """
|
||||
types = [
|
||||
"impulse",
|
||||
"hold",
|
||||
"toggle",
|
||||
"double"
|
||||
]
|
||||
for e in types:
|
||||
if e in inputList:
|
||||
return e
|
||||
|
||||
def branch(keyName, bindType, bindContent):
|
||||
return f'placeholder for {keyName}\n'
|
Loading…
Reference in New Issue