diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9926458 --- /dev/null +++ b/.gitignore @@ -0,0 +1,136 @@ +# ---> Python +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit model / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Custom Environments +dis-env/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# IDE +.vscode/ +.idea/ diff --git a/.vscode/settings.json b/.vscode/settings.json index 90b44d8..123758a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,8 +13,13 @@ "titleBar.activeBackground": "#832561", "titleBar.activeForeground": "#e7e7e7", "titleBar.inactiveBackground": "#83256199", - "titleBar.inactiveForeground": "#e7e7e799" + "titleBar.inactiveForeground": "#e7e7e799", + "editorGroup.border": "#ab307e", + "panel.border": "#ab307e", + "sash.hoverBorder": "#ab307e", + "sideBar.border": "#ab307e", + "statusBarItem.remoteBackground": "#832561", + "statusBarItem.remoteForeground": "#e7e7e7" }, "peacock.color": "#832561", - "python.pythonPath": "C:\\Users\\sattler\\AppData\\Local\\Programs\\Python\\Python39\\python.exe" } \ No newline at end of file diff --git a/LICENSE b/LICENSE index 52d76c7..e69de29 100644 --- a/LICENSE +++ b/LICENSE @@ -1,19 +0,0 @@ -MIT License Copyright (c) 2021 Sven Heidemann - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 5efd3c4..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,14 +0,0 @@ -# sh-edraft Debian Installation scripts - -Run script as root: - -```sh -bash users/public/scripts/default_installation.sh -/usr/sbin/usermod -aG sudo -``` - -Run script as user: - -```sh -bash users//scripts/ -``` diff --git a/appsettings.json b/appsettings.json new file mode 100644 index 0000000..629e6eb --- /dev/null +++ b/appsettings.json @@ -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" + } +} diff --git a/cpl-workspace.json b/cpl-workspace.json new file mode 100644 index 0000000..00a6926 --- /dev/null +++ b/cpl-workspace.json @@ -0,0 +1,10 @@ +{ + "WorkspaceSettings": { + "DefaultProject": "debian-installation-scripts", + "Projects": { + "debian-installation-scripts": "src/debian_installation_scripts/debian-installation-scripts.json", + "apps": "src/apps/apps.json" + }, + "Scripts": {} + } +} \ No newline at end of file diff --git a/old/LICENSE b/old/LICENSE new file mode 100644 index 0000000..52d76c7 --- /dev/null +++ b/old/LICENSE @@ -0,0 +1,19 @@ +MIT License Copyright (c) 2021 Sven Heidemann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/old/README.md b/old/README.md new file mode 100644 index 0000000..5efd3c4 --- /dev/null +++ b/old/README.md @@ -0,0 +1,14 @@ +# sh-edraft Debian Installation scripts + +Run script as root: + +```sh +bash users/public/scripts/default_installation.sh +/usr/sbin/usermod -aG sudo +``` + +Run script as user: + +```sh +bash users//scripts/ +``` diff --git a/common/apps/barrier.sh b/old/common/apps/barrier.sh similarity index 100% rename from common/apps/barrier.sh rename to old/common/apps/barrier.sh diff --git a/common/apps/boxes.sh b/old/common/apps/boxes.sh similarity index 100% rename from common/apps/boxes.sh rename to old/common/apps/boxes.sh diff --git a/common/apps/chrome.sh b/old/common/apps/chrome.sh similarity index 100% rename from common/apps/chrome.sh rename to old/common/apps/chrome.sh diff --git a/common/apps/discord.sh b/old/common/apps/discord.sh similarity index 100% rename from common/apps/discord.sh rename to old/common/apps/discord.sh diff --git a/common/apps/etcher.sh b/old/common/apps/etcher.sh similarity index 100% rename from common/apps/etcher.sh rename to old/common/apps/etcher.sh diff --git a/common/apps/flameshot.sh b/old/common/apps/flameshot.sh similarity index 100% rename from common/apps/flameshot.sh rename to old/common/apps/flameshot.sh diff --git a/common/apps/geary.sh b/old/common/apps/geary.sh similarity index 100% rename from common/apps/geary.sh rename to old/common/apps/geary.sh diff --git a/common/apps/git.sh b/old/common/apps/git.sh similarity index 100% rename from common/apps/git.sh rename to old/common/apps/git.sh diff --git a/common/apps/gnome_shell.sh b/old/common/apps/gnome_shell.sh similarity index 100% rename from common/apps/gnome_shell.sh rename to old/common/apps/gnome_shell.sh diff --git a/common/apps/gnome_tweaks.sh b/old/common/apps/gnome_tweaks.sh similarity index 100% rename from common/apps/gnome_tweaks.sh rename to old/common/apps/gnome_tweaks.sh diff --git a/common/apps/gpick.sh b/old/common/apps/gpick.sh similarity index 100% rename from common/apps/gpick.sh rename to old/common/apps/gpick.sh diff --git a/common/apps/kcolorchooser.sh b/old/common/apps/kcolorchooser.sh similarity index 100% rename from common/apps/kcolorchooser.sh rename to old/common/apps/kcolorchooser.sh diff --git a/common/apps/keepassxc.sh b/old/common/apps/keepassxc.sh similarity index 100% rename from common/apps/keepassxc.sh rename to old/common/apps/keepassxc.sh diff --git a/common/apps/lsd.sh b/old/common/apps/lsd.sh similarity index 100% rename from common/apps/lsd.sh rename to old/common/apps/lsd.sh diff --git a/common/apps/ncdu.sh b/old/common/apps/ncdu.sh similarity index 100% rename from common/apps/ncdu.sh rename to old/common/apps/ncdu.sh diff --git a/common/apps/neofetch.sh b/old/common/apps/neofetch.sh similarity index 100% rename from common/apps/neofetch.sh rename to old/common/apps/neofetch.sh diff --git a/common/apps/nextcloud.sh b/old/common/apps/nextcloud.sh similarity index 100% rename from common/apps/nextcloud.sh rename to old/common/apps/nextcloud.sh diff --git a/common/apps/signal.sh b/old/common/apps/signal.sh similarity index 100% rename from common/apps/signal.sh rename to old/common/apps/signal.sh diff --git a/common/apps/snap/pycharm.sh b/old/common/apps/snap/pycharm.sh similarity index 100% rename from common/apps/snap/pycharm.sh rename to old/common/apps/snap/pycharm.sh diff --git a/common/apps/snap/simplenote.sh b/old/common/apps/snap/simplenote.sh similarity index 100% rename from common/apps/snap/simplenote.sh rename to old/common/apps/snap/simplenote.sh diff --git a/common/apps/stacer.sh b/old/common/apps/stacer.sh similarity index 100% rename from common/apps/stacer.sh rename to old/common/apps/stacer.sh diff --git a/common/apps/sublime_text.sh b/old/common/apps/sublime_text.sh similarity index 100% rename from common/apps/sublime_text.sh rename to old/common/apps/sublime_text.sh diff --git a/common/apps/timeshift.sh b/old/common/apps/timeshift.sh similarity index 100% rename from common/apps/timeshift.sh rename to old/common/apps/timeshift.sh diff --git a/common/apps/trash-cli.sh b/old/common/apps/trash-cli.sh similarity index 100% rename from common/apps/trash-cli.sh rename to old/common/apps/trash-cli.sh diff --git a/common/apps/ulauncher.sh b/old/common/apps/ulauncher.sh similarity index 100% rename from common/apps/ulauncher.sh rename to old/common/apps/ulauncher.sh diff --git a/common/apps/vscode.sh b/old/common/apps/vscode.sh similarity index 100% rename from common/apps/vscode.sh rename to old/common/apps/vscode.sh diff --git a/common/scripts/first_install.sh b/old/common/scripts/first_install.sh similarity index 100% rename from common/scripts/first_install.sh rename to old/common/scripts/first_install.sh diff --git a/common/scripts/update.sh b/old/common/scripts/update.sh similarity index 100% rename from common/scripts/update.sh rename to old/common/scripts/update.sh diff --git a/common/themes/chrome-icon-fix.sh b/old/common/themes/chrome-icon-fix.sh similarity index 100% rename from common/themes/chrome-icon-fix.sh rename to old/common/themes/chrome-icon-fix.sh diff --git a/common/themes/grub_theme.sh b/old/common/themes/grub_theme.sh similarity index 100% rename from common/themes/grub_theme.sh rename to old/common/themes/grub_theme.sh diff --git a/common/themes/orchis.sh b/old/common/themes/orchis.sh similarity index 100% rename from common/themes/orchis.sh rename to old/common/themes/orchis.sh diff --git a/common/themes/tela_circle_icons.sh b/old/common/themes/tela_circle_icons.sh similarity index 100% rename from common/themes/tela_circle_icons.sh rename to old/common/themes/tela_circle_icons.sh diff --git a/common/themes/vimix_cursors.sh b/old/common/themes/vimix_cursors.sh similarity index 100% rename from common/themes/vimix_cursors.sh rename to old/common/themes/vimix_cursors.sh diff --git a/users/bianyx/config/hello-world.conf b/old/test-console/cpl-workspace.json similarity index 100% rename from users/bianyx/config/hello-world.conf rename to old/test-console/cpl-workspace.json diff --git a/users/benjasat/config/client/neofetch/config.conf b/old/users/benjasat/config/client/neofetch/config.conf similarity index 100% rename from users/benjasat/config/client/neofetch/config.conf rename to old/users/benjasat/config/client/neofetch/config.conf diff --git a/users/benjasat/config/neofetch.sh b/old/users/benjasat/config/neofetch.sh similarity index 100% rename from users/benjasat/config/neofetch.sh rename to old/users/benjasat/config/neofetch.sh diff --git a/users/benjasat/config/server/neofetch/config.conf b/old/users/benjasat/config/server/neofetch/config.conf similarity index 100% rename from users/benjasat/config/server/neofetch/config.conf rename to old/users/benjasat/config/server/neofetch/config.conf diff --git a/users/benjasat/scripts/server/default_installation.sh b/old/users/benjasat/scripts/server/default_installation.sh similarity index 100% rename from users/benjasat/scripts/server/default_installation.sh rename to old/users/benjasat/scripts/server/default_installation.sh diff --git a/users/bianyx/scripts/hello-world.sh b/old/users/bianyx/config/hello-world.conf similarity index 100% rename from users/bianyx/scripts/hello-world.sh rename to old/users/bianyx/config/hello-world.conf diff --git a/old/users/bianyx/scripts/hello-world.sh b/old/users/bianyx/scripts/hello-world.sh new file mode 100644 index 0000000..e69de29 diff --git a/users/edraft/config/arc-menu.template b/old/users/edraft/config/arc-menu.template similarity index 100% rename from users/edraft/config/arc-menu.template rename to old/users/edraft/config/arc-menu.template diff --git a/users/edraft/config/arc-menu_arcmenu.conf b/old/users/edraft/config/arc-menu_arcmenu.conf similarity index 100% rename from users/edraft/config/arc-menu_arcmenu.conf rename to old/users/edraft/config/arc-menu_arcmenu.conf diff --git a/users/edraft/config/arc-menu_raven.conf b/old/users/edraft/config/arc-menu_raven.conf similarity index 100% rename from users/edraft/config/arc-menu_raven.conf rename to old/users/edraft/config/arc-menu_raven.conf diff --git a/users/edraft/config/dash-to-panel.conf b/old/users/edraft/config/dash-to-panel.conf similarity index 100% rename from users/edraft/config/dash-to-panel.conf rename to old/users/edraft/config/dash-to-panel.conf diff --git a/users/edraft/scripts/mint_desktop_installation.sh b/old/users/edraft/scripts/mint_desktop_installation.sh similarity index 98% rename from users/edraft/scripts/mint_desktop_installation.sh rename to old/users/edraft/scripts/mint_desktop_installation.sh index 2319887..831b6c5 100644 --- a/users/edraft/scripts/mint_desktop_installation.sh +++ b/old/users/edraft/scripts/mint_desktop_installation.sh @@ -29,7 +29,7 @@ source $PWD/common/apps/ulauncher.sh source $PWD/common/apps/vscode.sh update -default_install +first_install install_barrier install_boxes diff --git a/users/edraft/scripts/theme_installation.sh b/old/users/edraft/scripts/theme_installation.sh similarity index 100% rename from users/edraft/scripts/theme_installation.sh rename to old/users/edraft/scripts/theme_installation.sh diff --git a/users/edraft/scripts/ubuntu_desktop_installation.sh b/old/users/edraft/scripts/ubuntu_desktop_installation.sh similarity index 100% rename from users/edraft/scripts/ubuntu_desktop_installation.sh rename to old/users/edraft/scripts/ubuntu_desktop_installation.sh diff --git a/users/public/scripts/default_installation.sh b/old/users/public/scripts/default_installation.sh similarity index 100% rename from users/public/scripts/default_installation.sh rename to old/users/public/scripts/default_installation.sh diff --git a/users/vsrv/scripts/server_installation.sh b/old/users/vsrv/scripts/server_installation.sh similarity index 100% rename from users/vsrv/scripts/server_installation.sh rename to old/users/vsrv/scripts/server_installation.sh diff --git a/users/vsrv/scripts/write_bashrc.py b/old/users/vsrv/scripts/write_bashrc.py similarity index 100% rename from users/vsrv/scripts/write_bashrc.py rename to old/users/vsrv/scripts/write_bashrc.py diff --git a/src/apps/__init__.py b/src/apps/__init__.py new file mode 100644 index 0000000..ad5eca3 --- /dev/null +++ b/src/apps/__init__.py @@ -0,0 +1 @@ +# imports: diff --git a/src/apps/apps.json b/src/apps/apps.json new file mode 100644 index 0000000..41e5849 --- /dev/null +++ b/src/apps/apps.json @@ -0,0 +1,43 @@ +{ + "ProjectSettings": { + "Name": "apps", + "Version": { + "Major": "0", + "Minor": "0", + "Micro": "0" + }, + "Author": "", + "AuthorEmail": "", + "Description": "", + "LongDescription": "", + "URL": "", + "CopyrightDate": "", + "CopyrightName": "", + "LicenseName": "", + "LicenseDescription": "", + "Dependencies": [ + "sh_cpl>=2021.10.0" + ], + "PythonVersion": ">=3.9.2", + "PythonPath": { + "linux": "" + }, + "Classifiers": [] + }, + "BuildSettings": { + "ProjectType": "library", + "SourcePath": "", + "OutputPath": "../../dist", + "Main": "apps.main", + "EntryPoint": "apps", + "IncludePackageData": false, + "Included": [], + "Excluded": [ + "*/__pycache__", + "*/logs", + "*/tests" + ], + "PackageData": {}, + "ProjectReferences": [] + } +} \ No newline at end of file diff --git a/src/debian_installation_scripts/__init__.py b/src/debian_installation_scripts/__init__.py new file mode 100644 index 0000000..ad5eca3 --- /dev/null +++ b/src/debian_installation_scripts/__init__.py @@ -0,0 +1 @@ +# imports: diff --git a/src/debian_installation_scripts/application.py b/src/debian_installation_scripts/application.py new file mode 100644 index 0000000..34a68c8 --- /dev/null +++ b/src/debian_installation_scripts/application.py @@ -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') diff --git a/src/debian_installation_scripts/debian-installation-scripts.json b/src/debian_installation_scripts/debian-installation-scripts.json new file mode 100644 index 0000000..6a8998d --- /dev/null +++ b/src/debian_installation_scripts/debian-installation-scripts.json @@ -0,0 +1,43 @@ +{ + "ProjectSettings": { + "Name": "debian-installation-scripts", + "Version": { + "Major": "0", + "Minor": "1", + "Micro": "0" + }, + "Author": "Sven Heidemann", + "AuthorEmail": "sven.heidemann@sh-edraft.de", + "Description": "Debian installation scripts", + "LongDescription": "Package installer for Debian only running with apt and snap for ubuntu", + "URL": "", + "CopyrightDate": "2021", + "CopyrightName": "Debian installation scripts", + "LicenseName": "", + "LicenseDescription": "", + "Dependencies": [ + "sh_cpl>=2021.10.0" + ], + "PythonVersion": ">=3.9.2", + "PythonPath": { + "linux": "./dis-env/bin/python3.9" + }, + "Classifiers": [] + }, + "BuildSettings": { + "ProjectType": "console", + "SourcePath": "", + "OutputPath": "../../dist", + "Main": "debian_installation_scripts.main", + "EntryPoint": "dis", + "IncludePackageData": false, + "Included": [], + "Excluded": [ + "*/__pycache__", + "*/logs", + "*/tests" + ], + "PackageData": {}, + "ProjectReferences": [] + } +} \ No newline at end of file diff --git a/src/debian_installation_scripts/main.py b/src/debian_installation_scripts/main.py new file mode 100644 index 0000000..b7a0d59 --- /dev/null +++ b/src/debian_installation_scripts/main.py @@ -0,0 +1,14 @@ +from cpl_core.application import ApplicationBuilder + +from debian_installation_scripts.application import Application +from debian_installation_scripts.startup import Startup + + +def main(): + app_builder = ApplicationBuilder(Application) + app_builder.use_startup(Startup) + app_builder.build().run() + + +if __name__ == '__main__': + main() diff --git a/src/debian_installation_scripts/startup.py b/src/debian_installation_scripts/startup.py new file mode 100644 index 0000000..f6d5748 --- /dev/null +++ b/src/debian_installation_scripts/startup.py @@ -0,0 +1,17 @@ +from cpl_core.application import StartupABC +from cpl_core.configuration import ConfigurationABC +from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC + + +class Startup(StartupABC): + + def __init__(self): + StartupABC.__init__(self) + + def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC: + environment.set_runtime_directory(os.path.dirname(__file__)) + + return self._configuration + + def configure_services(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ServiceProviderABC: + return self._services.build_service_provider() diff --git a/src/tests/__init__.py b/src/tests/__init__.py new file mode 100644 index 0000000..ad5eca3 --- /dev/null +++ b/src/tests/__init__.py @@ -0,0 +1 @@ +# imports: