This commit is contained in:
2021-03-15 18:50:53 +01:00
parent 6742023919
commit fdb9769fd2
28 changed files with 77 additions and 53 deletions

View File

@@ -15,7 +15,7 @@ __title__ = 'cpl_cli.command'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.4.1.post6'
__version__ = '2021.4.1.post7'
from collections import namedtuple
@@ -28,4 +28,4 @@ from .publish_service import PublishService
from .version_service import VersionService
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
version_info = VersionInfo(major='2021', minor='04', micro='01-6')
version_info = VersionInfo(major='2021', minor='04', micro='01-7')

View File

@@ -50,6 +50,22 @@ class NewService(CommandABC):
self._use_startup: bool = False
self._use_service_providing: bool = False
@staticmethod
def _help(message: str):
"""
Internal help output
:param message:
:return:
"""
Console.error(message)
schematics = [
'console (c|C) <name>',
]
Console.write_line('Available Schematics:')
for name in schematics:
Console.write(f'\n\t{name} ')
def _create_project_settings(self, name: str):
self._project_dict = {
ProjectSettingsNameEnum.name.value: name,
@@ -219,8 +235,16 @@ class NewService(CommandABC):
:param args:
:return:
"""
if len(args) == 0:
self._help('Usage: cpl new <schematic> [options]')
exit()
self._command = args[0]
if self._command == 'console':
self._console(args)
else:
self._help('Usage: cpl new <schematic> [options]')
exit()
Console.write('\n')