Add python-fire, Remove pyinquirer from main runner script

This commit is contained in:
Lucas Noki 2020-01-18 05:39:23 +01:00
parent d7531412cf
commit 69c93fd894
2 changed files with 3 additions and 16 deletions

18
main.py
View File

@ -1,6 +1,6 @@
from PyInquirer import prompt
import importlib
import os
import fire
def load_modules():
@ -16,19 +16,5 @@ def load_modules():
return loaded_modules
def open_module_selection(module_names):
print("Available Modules:")
module_selection = [
{
'type': 'checkbox',
'message': 'Select modules',
'name': 'modules',
'choices': list(map(lambda x: {"name": x}, list(module_names)))
}
]
return prompt(module_selection)['modules']
modules = load_modules()
[modules[module].run() for module in open_module_selection(modules.keys())]
fire.Fire(modules)

View File

@ -1 +1,2 @@
fire
PyInquirer==1.0.3