for testing some lines
This commit is contained in:
parent
a10b74253b
commit
9b07ca5b7b
1 changed files with 18 additions and 0 deletions
18
fillform.py
18
fillform.py
|
@ -82,3 +82,21 @@ def parse():
|
|||
return args
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
arguments = parse()
|
||||
except argparse.ArgumentTypeError as e:
|
||||
print("Error while parsing the command line arguments:\n",
|
||||
e)
|
||||
else:
|
||||
print(arguments)
|
||||
config = readformdata.listFields([], arguments["config"])
|
||||
data = {f: readformdata.listFields([], f) for f in arguments["data"]}
|
||||
# todo: find commands in config, sort them, do them
|
||||
comms = itertools.chain(*[commands.Command.extractCommands(
|
||||
field, config, data) for field in config])
|
||||
# comms = commands.Command.extractCommands(config[0], config, data)
|
||||
print(comms)
|
||||
for command in comms:
|
||||
command()
|
||||
print(config[0])
|
||||
|
|
Loading…
Reference in a new issue