Added tool projects
This commit is contained in:
parent
bca2e02cc2
commit
c82e8e3065
@ -7,7 +7,9 @@
|
||||
"gismo-core": "src/gismo_core/gismo-core.json",
|
||||
"boot-log": "src/modules/boot_log/boot-log.json",
|
||||
"gismo_db": "src/gismo_db/gismo_db.json",
|
||||
"database": "src/database/database.json"
|
||||
"database": "src/database/database.json",
|
||||
"level-generator": "tools/level_generator/level-generator.json",
|
||||
"ontime-calculator": "tools/ontime_calculator/ontime-calculator.json"
|
||||
},
|
||||
"Scripts": {}
|
||||
}
|
||||
|
0
tools/level_generator/LICENSE
Normal file
0
tools/level_generator/LICENSE
Normal file
0
tools/level_generator/README.md
Normal file
0
tools/level_generator/README.md
Normal file
1
tools/level_generator/__init__.py
Normal file
1
tools/level_generator/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
# imports:
|
16
tools/level_generator/application.py
Normal file
16
tools/level_generator/application.py
Normal file
@ -0,0 +1,16 @@
|
||||
from cpl_core.application import ApplicationABC
|
||||
from cpl_core.configuration import ConfigurationABC
|
||||
from cpl_core.console import Console
|
||||
from cpl_core.dependency_injection import ServiceProviderABC
|
||||
|
||||
|
||||
class Application(ApplicationABC):
|
||||
|
||||
def __init__(self, config: ConfigurationABC, services: ServiceProviderABC):
|
||||
ApplicationABC.__init__(self, config, services)
|
||||
|
||||
def configure(self):
|
||||
pass
|
||||
|
||||
def main(self):
|
||||
Console.write_line('Hello World')
|
15
tools/level_generator/appsettings.json
Normal file
15
tools/level_generator/appsettings.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"TimeFormatSettings": {
|
||||
"DateFormat": "%Y-%m-%d",
|
||||
"TimeFormat": "%H:%M:%S",
|
||||
"DateTimeFormat": "%Y-%m-%d %H:%M:%S.%f",
|
||||
"DateTimeLogFormat": "%Y-%m-%d_%H-%M-%S"
|
||||
},
|
||||
|
||||
"LoggingSettings": {
|
||||
"Path": "logs/",
|
||||
"Filename": "log_$start_time.log",
|
||||
"ConsoleLogLevel": "ERROR",
|
||||
"FileLogLevel": "WARN"
|
||||
}
|
||||
}
|
43
tools/level_generator/level-generator.json
Normal file
43
tools/level_generator/level-generator.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"ProjectSettings": {
|
||||
"Name": "tools/level-generator",
|
||||
"Version": {
|
||||
"Major": "0",
|
||||
"Minor": "0",
|
||||
"Micro": "0"
|
||||
},
|
||||
"Author": "",
|
||||
"AuthorEmail": "",
|
||||
"Description": "",
|
||||
"LongDescription": "",
|
||||
"URL": "",
|
||||
"CopyrightDate": "",
|
||||
"CopyrightName": "",
|
||||
"LicenseName": "",
|
||||
"LicenseDescription": "",
|
||||
"Dependencies": [
|
||||
"sh_cpl>=2021.10.2"
|
||||
],
|
||||
"PythonVersion": ">=3.9.2",
|
||||
"PythonPath": {
|
||||
"linux": ""
|
||||
},
|
||||
"Classifiers": []
|
||||
},
|
||||
"BuildSettings": {
|
||||
"ProjectType": "console",
|
||||
"SourcePath": "",
|
||||
"OutputPath": "../../dist",
|
||||
"Main": "tools/_level_generator.main",
|
||||
"EntryPoint": "tools/level-generator",
|
||||
"IncludePackageData": false,
|
||||
"Included": [],
|
||||
"Excluded": [
|
||||
"*/__pycache__",
|
||||
"*/logs",
|
||||
"*/tests"
|
||||
],
|
||||
"PackageData": {},
|
||||
"ProjectReferences": []
|
||||
}
|
||||
}
|
14
tools/level_generator/main.py
Normal file
14
tools/level_generator/main.py
Normal file
@ -0,0 +1,14 @@
|
||||
from cpl_core.application import ApplicationBuilder
|
||||
|
||||
from level_generator.application import Application
|
||||
from level_generator.startup import Startup
|
||||
|
||||
|
||||
def main():
|
||||
app_builder = ApplicationBuilder(Application)
|
||||
app_builder.use_startup(Startup)
|
||||
app_builder.build().run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
16
tools/level_generator/startup.py
Normal file
16
tools/level_generator/startup.py
Normal file
@ -0,0 +1,16 @@
|
||||
from cpl_core.application import StartupABC
|
||||
from cpl_core.configuration import ConfigurationABC
|
||||
from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
|
||||
from cpl_core.environment import ApplicationEnvironment
|
||||
|
||||
|
||||
class Startup(StartupABC):
|
||||
|
||||
def __init__(self):
|
||||
StartupABC.__init__(self)
|
||||
|
||||
def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC:
|
||||
return configuration
|
||||
|
||||
def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC:
|
||||
return services.build_service_provider()
|
0
tools/ontime_calculator/LICENSE
Normal file
0
tools/ontime_calculator/LICENSE
Normal file
0
tools/ontime_calculator/README.md
Normal file
0
tools/ontime_calculator/README.md
Normal file
1
tools/ontime_calculator/__init__.py
Normal file
1
tools/ontime_calculator/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
# imports:
|
16
tools/ontime_calculator/application.py
Normal file
16
tools/ontime_calculator/application.py
Normal file
@ -0,0 +1,16 @@
|
||||
from cpl_core.application import ApplicationABC
|
||||
from cpl_core.configuration import ConfigurationABC
|
||||
from cpl_core.console import Console
|
||||
from cpl_core.dependency_injection import ServiceProviderABC
|
||||
|
||||
|
||||
class Application(ApplicationABC):
|
||||
|
||||
def __init__(self, config: ConfigurationABC, services: ServiceProviderABC):
|
||||
ApplicationABC.__init__(self, config, services)
|
||||
|
||||
def configure(self):
|
||||
pass
|
||||
|
||||
def main(self):
|
||||
Console.write_line('Hello World')
|
15
tools/ontime_calculator/appsettings.json
Normal file
15
tools/ontime_calculator/appsettings.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"TimeFormatSettings": {
|
||||
"DateFormat": "%Y-%m-%d",
|
||||
"TimeFormat": "%H:%M:%S",
|
||||
"DateTimeFormat": "%Y-%m-%d %H:%M:%S.%f",
|
||||
"DateTimeLogFormat": "%Y-%m-%d_%H-%M-%S"
|
||||
},
|
||||
|
||||
"LoggingSettings": {
|
||||
"Path": "logs/",
|
||||
"Filename": "log_$start_time.log",
|
||||
"ConsoleLogLevel": "ERROR",
|
||||
"FileLogLevel": "WARN"
|
||||
}
|
||||
}
|
14
tools/ontime_calculator/main.py
Normal file
14
tools/ontime_calculator/main.py
Normal file
@ -0,0 +1,14 @@
|
||||
from cpl_core.application import ApplicationBuilder
|
||||
|
||||
from ontime_calculator.application import Application
|
||||
from ontime_calculator.startup import Startup
|
||||
|
||||
|
||||
def main():
|
||||
app_builder = ApplicationBuilder(Application)
|
||||
app_builder.use_startup(Startup)
|
||||
app_builder.build().run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
43
tools/ontime_calculator/ontime-calculator.json
Normal file
43
tools/ontime_calculator/ontime-calculator.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"ProjectSettings": {
|
||||
"Name": "tools/ontime-calculator",
|
||||
"Version": {
|
||||
"Major": "0",
|
||||
"Minor": "0",
|
||||
"Micro": "0"
|
||||
},
|
||||
"Author": "",
|
||||
"AuthorEmail": "",
|
||||
"Description": "",
|
||||
"LongDescription": "",
|
||||
"URL": "",
|
||||
"CopyrightDate": "",
|
||||
"CopyrightName": "",
|
||||
"LicenseName": "",
|
||||
"LicenseDescription": "",
|
||||
"Dependencies": [
|
||||
"sh_cpl>=2021.10.2"
|
||||
],
|
||||
"PythonVersion": ">=3.9.2",
|
||||
"PythonPath": {
|
||||
"linux": ""
|
||||
},
|
||||
"Classifiers": []
|
||||
},
|
||||
"BuildSettings": {
|
||||
"ProjectType": "console",
|
||||
"SourcePath": "",
|
||||
"OutputPath": "../../dist",
|
||||
"Main": "tools/_ontime_calculator.main",
|
||||
"EntryPoint": "tools/ontime-calculator",
|
||||
"IncludePackageData": false,
|
||||
"Included": [],
|
||||
"Excluded": [
|
||||
"*/__pycache__",
|
||||
"*/logs",
|
||||
"*/tests"
|
||||
],
|
||||
"PackageData": {},
|
||||
"ProjectReferences": []
|
||||
}
|
||||
}
|
16
tools/ontime_calculator/startup.py
Normal file
16
tools/ontime_calculator/startup.py
Normal file
@ -0,0 +1,16 @@
|
||||
from cpl_core.application import StartupABC
|
||||
from cpl_core.configuration import ConfigurationABC
|
||||
from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
|
||||
from cpl_core.environment import ApplicationEnvironment
|
||||
|
||||
|
||||
class Startup(StartupABC):
|
||||
|
||||
def __init__(self):
|
||||
StartupABC.__init__(self)
|
||||
|
||||
def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC:
|
||||
return configuration
|
||||
|
||||
def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC:
|
||||
return services.build_service_provider()
|
Reference in New Issue
Block a user