cpl@2022.6.3 - Verbesserung der Parameter #67

Merged
edraft merged 25 commits from 2022.6.3 into 2022.6 2022-05-22 17:38:22 +02:00
Showing only changes of commit 5cc663dedc - Show all commits

View File

@ -32,7 +32,7 @@ class GenerateService(CommandABC):
"Template": ABCTemplate "Template": ABCTemplate
}, },
"class": { "class": {
"Upper": "", "Upper": "Class",
"Template": ClassTemplate "Template": ClassTemplate
}, },
"enum": { "enum": {
@ -167,12 +167,19 @@ class GenerateService(CommandABC):
:param args: :param args:
:return: :return:
""" """
if len(args) == 0: schematic = None
value = None
for s in self._schematics:
value = self._config.get_configuration(s)
if value is not None:
schematic = s
break
if schematic is None:
self._help('Usage: cpl generate <schematic> [options]') self._help('Usage: cpl generate <schematic> [options]')
sys.exit() sys.exit()
schematic = args[0] name = value
name = self._config.get_configuration(schematic)
if name is None: if name is None:
name = Console.read(f'Name for the {args[0]}: ') name = Console.read(f'Name for the {args[0]}: ')