ScriptCollection 4.3.46__py3-none-any.whl → 4.3.47__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -253,7 +253,7 @@ def BuildCodeUnits() -> int:
253
253
  parser.add_argument('-v', '--verbosity', required=False, default=3, help=f"Sets the loglevel. Possible values: {verbosity_values}")
254
254
  parser.add_argument('-e','--targetenvironment', required=False, default="QualityCheck")
255
255
  parser.add_argument('-a','--additionalargumentsfile', required=False, default=None)
256
- parser.add_argument("-c",'--nocache', required=False, default=False, action='store_true')
256
+ parser.add_argument("-n",'--nocache', required=False, default=False, action='store_true')
257
257
  parser.add_argument('-p','--ispremerge', required=False, default=False, action='store_true')
258
258
  parser.add_argument('-u','--assertnonewchanges', required=False, default=False, action='store_true')
259
259
  parser.add_argument('-m','--addreadytomergeflag', required=False, default=False, action='store_true')
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -39,7 +39,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
39
39
  from .ProgramRunnerPopen import ProgramRunnerPopen
40
40
  from .SCLog import SCLog, LogLevel
41
41
 
42
- version = "4.3.46"
42
+ version = "4.3.47"
43
43
  __version__ = version
44
44
 
45
45
  class VSCodeWorkspaceShellTask:
@@ -2548,6 +2548,17 @@ class ScriptCollectionCore:
2548
2548
  lines = ["/Cache/"]
2549
2549
  GeneralUtilities.write_lines_to_file(gitignore_file, lines)
2550
2550
 
2551
+ @GeneralUtilities.check_arguments
2552
+ def ensure_line_is_in_gitignore(self, repository_folder: str, line: str) -> None:
2553
+ """Ensures that "<repository>/.gitignore" exists and contains the given line. The line is appended if it is not contained yet."""
2554
+ gitignore_file = os.path.join(repository_folder, ".gitignore")
2555
+ if os.path.isfile(gitignore_file):
2556
+ existing_lines = GeneralUtilities.read_lines_from_file(gitignore_file)
2557
+ else:
2558
+ existing_lines = []
2559
+ if line not in existing_lines:
2560
+ GeneralUtilities.write_lines_to_file(gitignore_file, existing_lines+[line])
2561
+
2551
2562
  @GeneralUtilities.check_arguments
2552
2563
  def check_python_ast(self, path: str) -> list[tuple[str, int, int, str]]:
2553
2564
  """
@@ -3079,6 +3090,14 @@ TXDX
3079
3090
  if normalized_content != content:
3080
3091
  GeneralUtilities.write_binary_to_file(file, normalized_content)
3081
3092
 
3093
+ @GeneralUtilities.check_arguments
3094
+ def normalize_line_endings_of_files_in_folder(self, folder: str, file_extensions: list[str]) -> None:
3095
+ """Normalizes the line-endings of all not-git-ignored files inside 'folder' which have one of the given
3096
+ file-extensions. The file-extensions must be given without a leading dot (example: ["ts", "js"])."""
3097
+ for file_extension in file_extensions:
3098
+ for file in self.get_not_git_ignored_files_of_folder(folder, f".{file_extension}"):
3099
+ self.normalize_line_endings(file)
3100
+
3082
3101
  @GeneralUtilities.check_arguments
3083
3102
  def remove_trailing_linebreak(self, file: str) -> None:
3084
3103
  content = GeneralUtilities.read_binary_from_file(file)
@@ -3419,6 +3438,21 @@ OCR-content:
3419
3438
  arcname = os.path.relpath(file_path, start=folder)
3420
3439
  zipf.write(file_path, arcname)
3421
3440
 
3441
+ @GeneralUtilities.check_arguments
3442
+ def create_zip_archive_of_folders(self, folders:dict[str,str],zip_file:str) -> None:
3443
+ """Creates a zip-archive which contains the content of all given folders. The keys of 'folders' are the
3444
+ folder-names which are used inside the archive and the values are the paths of the folders which should be added."""
3445
+ GeneralUtilities.assert_file_does_not_exist(zip_file)
3446
+ with zipfile.ZipFile(zip_file, "w", zipfile.ZIP_DEFLATED) as zipf:
3447
+ for folder_name_in_archive, folder in folders.items():
3448
+ GeneralUtilities.assert_folder_exists(folder)
3449
+ folder = os.path.abspath(folder)
3450
+ for root, _, files in os.walk(folder):
3451
+ for file in files:
3452
+ file_path = os.path.join(root, file)
3453
+ arcname = os.path.join(folder_name_in_archive, os.path.relpath(file_path, start=folder))
3454
+ zipf.write(file_path, arcname)
3455
+
3422
3456
  @GeneralUtilities.check_arguments
3423
3457
  def start_local_test_service(self, file: str):
3424
3458
  example_folder = os.path.dirname(file)
@@ -328,9 +328,7 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
328
328
  codeunit_name = self.get_codeunit_name()
329
329
  codeunit_folder = self.get_codeunit_folder()
330
330
  # Normalize the line-endings of all non-git-ignored *.cs-files in the codeunit- and the test-project to LF.
331
- for cs_source_folder in [os.path.join(codeunit_folder, codeunit_name), os.path.join(codeunit_folder, codeunit_name + "Tests")]:
332
- for cs_file in self._protected_sc.get_not_git_ignored_files_of_folder(cs_source_folder, ".cs"):
333
- self._protected_sc.normalize_line_endings(cs_file)
331
+ self._protected_sc.normalize_line_endings_of_files_in_folder(codeunit_folder, ["cs"])
334
332
  self._protected_sc.format_xml_file(os.path.join(codeunit_folder, codeunit_name, codeunit_name + ".csproj"), add_xml_declaration=False)
335
333
  self._protected_sc.format_xml_file(os.path.join(codeunit_folder, codeunit_name + "Tests", codeunit_name + "Tests.csproj"), add_xml_declaration=False)
336
334
  self.standardized_task_verify_standard_format_csproj_files()
@@ -85,7 +85,9 @@ class TFCPS_CodeUnitSpecific_Flutter_Functions(TFCPS_CodeUnitSpecific_Base):
85
85
 
86
86
  @GeneralUtilities.check_arguments
87
87
  def linting(self) -> None:
88
- pass#TODO
88
+ codeunit_folder = self.get_codeunit_folder()
89
+ self._protected_sc.normalize_line_endings_of_files_in_folder(codeunit_folder, ["java","dart", "kt", "html"])
90
+ #TODO call the flutter-linting here when available
89
91
 
90
92
  @GeneralUtilities.check_arguments
91
93
  def do_common_tasks(self,current_codeunit_version:str )-> None:
@@ -25,16 +25,7 @@ class TFCPS_CodeUnitSpecific_NodeJS_Functions(TFCPS_CodeUnitSpecific_Base):
25
25
  @GeneralUtilities.check_arguments
26
26
  def linting(self) -> None:
27
27
  codeunit_folder = self.get_codeunit_folder()
28
- for ts_file in self._protected_sc.get_not_git_ignored_files_of_folder(codeunit_folder, ".ts"):
29
- self._protected_sc.normalize_line_endings(ts_file)
30
- for js_file in self._protected_sc.get_not_git_ignored_files_of_folder(codeunit_folder, ".js"):
31
- self._protected_sc.normalize_line_endings(js_file)
32
- for css_file in self._protected_sc.get_not_git_ignored_files_of_folder(codeunit_folder, ".css"):
33
- self._protected_sc.normalize_line_endings(css_file)
34
- for scss_file in self._protected_sc.get_not_git_ignored_files_of_folder(codeunit_folder, ".scss"):
35
- self._protected_sc.normalize_line_endings(scss_file)
36
- for sass_file in self._protected_sc.get_not_git_ignored_files_of_folder(codeunit_folder, ".sass"):
37
- self._protected_sc.normalize_line_endings(sass_file)
28
+ self._protected_sc.normalize_line_endings_of_files_in_folder(codeunit_folder, ["ts", "js", "css", "scss", "sass"])
38
29
  # The OpenAPI-generator writes its '.openapi-generator/FILES' metadata-file with the host's native
39
30
  # line-endings (CRLF on Windows, LF on Linux). Normalize it to LF like the other generated text-files
40
31
  # so the committed file does not drift between build-hosts.
@@ -49,6 +49,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
49
49
  product_information_file = os.path.join(self.repository, ".ScriptCollection", "ProductInformation.xml")
50
50
  GeneralUtilities.assert_file_exists(product_information_file, f"The file '{product_information_file}' does not exist.")
51
51
 
52
+
52
53
  #when the build runs inside a container, ensure the used SCBuilder-image is at least the version required by this repository (defined in .ScriptCollection/OCIImages/ImageDefinition.csv)
53
54
  if self.sc.is_runnning_in_container():
54
55
  scbuilder_version_environment_value = os.environ.get("SCBuilderVersion")
@@ -62,9 +63,10 @@ class TFCPS_CodeUnit_BuildCodeUnits:
62
63
  if self.is_pre_merge():
63
64
  GeneralUtilities.assert_condition(not self.__assert_no_new_changes,f"A pre-merge build can not be done with the assert-no-new-changes-option.")
64
65
 
65
- #disable autocrlf for this repository so git does not rewrite line-endings on checkout/commit. otherwise the line-endings normalized by __normalize_line_endings_of_common_files would be converted back to crlf, which results in spurious uncommitted changes (and therefore in failing assert-no-new-changes-builds) on windows.
66
66
  self.sc.git_set_local_configuration_value(self.repository, "core.autocrlf", "false")
67
67
 
68
+ #ensure the artifacts-folder of the repository is git-ignored so build-results never show up as uncommitted changes
69
+ self.sc.ensure_line_is_in_gitignore(self.repository, "Other/Resources/Artifacts")
68
70
 
69
71
  #ensure <repo>/.ScriptCollection/.gitignore is set up (ignores the cache-folder so cache-files never show up as uncommitted changes)
70
72
  self.sc.ensure_scriptcollection_gitignore_is_setup(self.repository)
@@ -135,7 +137,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
135
137
  if self.__assert_no_new_changes:
136
138
  self.sc.assert_no_uncommitted_changes(self.repository,"There are new uncommitted changes in the repository.")
137
139
 
138
- self.__log_hashes_of_artifacts(codeunits)
140
+ self.__create_artifacts_archive(codeunits)
139
141
 
140
142
  end_time:datetime=GeneralUtilities.get_now()
141
143
  duration=end_time-start_time
@@ -143,22 +145,43 @@ class TFCPS_CodeUnit_BuildCodeUnits:
143
145
  self.sc.log.log(GeneralUtilities.get_line())
144
146
 
145
147
  @GeneralUtilities.check_arguments
146
- def __log_hashes_of_artifacts(self, codeunits:list[str]) -> None:
147
- self.sc.log.log("Hashes of the artifacts of the codeunits:")
148
+ def __create_artifacts_archive(self, codeunits:list[str]) -> str:
149
+ product_name:str=self.tfcps_tools_general.get_product_name(self.repository)
150
+ product_version:str=self.tfcps_tools_general.get_version_of_project(self.repository)
151
+ target_folder:str=os.path.join(self.repository,"Other","Resources","Artifacts")
152
+ target_file_zip:str=os.path.join(target_folder,f"{product_name}_Artifacts_v{product_version}.zip")
153
+ target_file_infotxt:str=os.path.join(target_folder,f"{product_name}_Artifacts_v{product_version}.information.txt")
154
+
155
+ artifacts_folders:dict[str,str]={}
148
156
  for codeunit_name in codeunits:
149
157
  artifacts_folder = os.path.join(self.repository, codeunit_name, "Other", "Artifacts")
150
- if os.path.isdir(artifacts_folder):
151
- hash_of_artifacts:str = self.sc.create_hash_of_folder(artifacts_folder)
152
- self.sc.log.log(f" - {codeunit_name}: {hash_of_artifacts}")
153
- else:
154
- self.sc.log.log(f" - {codeunit_name}: (no artifacts-folder available)")
158
+ GeneralUtilities.assert_folder_exists(artifacts_folder,f"The artifacts-folder '{artifacts_folder}' of codeunit '{codeunit_name}' does not exist.")
159
+ artifacts_folders[codeunit_name]=artifacts_folder
160
+
161
+ GeneralUtilities.ensure_directory_exists(target_folder)
162
+ GeneralUtilities.ensure_file_does_not_exist(target_file_zip)#ensure the archive of a previous build gets replaced
163
+ self.sc.create_zip_archive_of_folders(artifacts_folders,target_file_zip)
164
+
165
+ hash_of_zip_file:str=GeneralUtilities.get_sha256_of_file(target_file_zip)
166
+ creation_timestamp:datetime=GeneralUtilities.get_now()
167
+ GeneralUtilities.ensure_file_does_not_exist(target_file_infotxt)
168
+ GeneralUtilities.ensure_file_exists(target_file_infotxt)
169
+ information_lines:list[str]=[
170
+ f"Product: {product_name}",
171
+ f"Version: {product_version}",
172
+ f"Artifacts-archive-hash: {hash_of_zip_file}",
173
+ f"Creation-timestamp: {GeneralUtilities.datetime_to_string_for_readable_entry(creation_timestamp,False)}",
174
+ ]
175
+ GeneralUtilities.write_lines_to_file(target_file_infotxt,information_lines)
176
+
177
+ self.sc.log.log(f"Created artifacts-archive \"{os.path.relpath(target_file_zip, self.repository)}\":")
178
+ for information_line in information_lines:
179
+ self.sc.log.log(f" {information_line}")
155
180
 
156
181
  @GeneralUtilities.check_arguments
157
182
  def __normalize_line_endings_of_common_files(self) -> None:
158
183
  #TODO add option to define exceptions (means: files which should not be normalized).
159
- for text_file_extension in [".txt", ".md", ".json", ".xml", ".csv", ".yml", ".yaml"]:
160
- for text_file in self.sc.get_not_git_ignored_files_of_folder(self.repository, text_file_extension):
161
- self.sc.normalize_line_endings(text_file)
184
+ self.sc.normalize_line_endings_of_files_in_folder(self.repository, ["txt", "md", "json", "xml", "csv", "yml", "yaml", "gitignore"])
162
185
 
163
186
  @GeneralUtilities.check_arguments
164
187
  def is_working_branch(self)->bool:
@@ -1,168 +1,168 @@
1
- Metadata-Version: 2.4
2
- Name: scriptcollection
3
- Version: 4.3.46
4
- Summary: The ScriptCollection is the place for reusable scripts.
5
- Author-email: Marius Göcke <marius.goecke@gmail.com>
6
- Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
7
- Project-URL: Documentation, https://aniondev.github.io/ScriptCollectionReference/index.html
8
- Project-URL: Changelog, https://github.com/anionDev/ScriptCollection/tree/main/Other/Resources/Changelog
9
- Keywords: package,release,build,management
10
- Classifier: Intended Audience :: Developers
11
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
14
- Classifier: Operating System :: POSIX :: Linux
15
- Classifier: Operating System :: Microsoft :: Windows :: Windows 10
16
- Classifier: Topic :: System :: Logging
17
- Classifier: Topic :: System :: Monitoring
18
- Classifier: Topic :: System :: Archiving :: Packaging
19
- Classifier: Topic :: System :: Systems Administration
20
- Classifier: Topic :: Terminals
21
- Classifier: Topic :: Utilities
22
- Requires-Python: >=3.11
23
- Description-Content-Type: text/markdown
24
- Requires-Dist: build>=1.5.0
25
- Requires-Dist: coverage>=7.15.2
26
- Requires-Dist: cyclonedx-bom>=7.1.0
27
- Requires-Dist: defusedxml>=0.7.1
28
- Requires-Dist: keyboard>=0.13.5
29
- Requires-Dist: lcov-cobertura>=2.1.1
30
- Requires-Dist: lxml>=6.0.1
31
- Requires-Dist: ntplib>=0.4.0
32
- Requires-Dist: Pillow>=11.3.0
33
- Requires-Dist: psutil>=7.2.2
34
- Requires-Dist: pycdlib>=1.16.0
35
- Requires-Dist: Pygments>=2.20.0
36
- Requires-Dist: pylint>=4.0.6
37
- Requires-Dist: pyOpenSSL>=25.3.0
38
- Requires-Dist: PyPDF>=6.14.2
39
- Requires-Dist: pytest>=8.4.2
40
- Requires-Dist: PyYAML>=6.0.3
41
- Requires-Dist: qrcode>=8.2.0
42
- Requires-Dist: send2trash>=1.8.3
43
- Requires-Dist: twine>=6.2.0
44
- Requires-Dist: xmlschema>=4.3.2
45
-
46
- # ScriptCollection
47
-
48
- ## General
49
-
50
- [![Supported Python versions](https://img.shields.io/pypi/pyversions/ScriptCollection.svg)](https://pypi.org/project/ScriptCollection/)
51
- ![PyPI](https://img.shields.io/pypi/v/ScriptCollection)
52
- ![Dependencies](https://img.shields.io/librariesio/github/anionDevevlopment/ScriptCollection)
53
-
54
- [![CodeFactor](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/badge/main)](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/overview/main)
55
- [![Downloads](https://pepy.tech/badge/scriptcollection)](https://pepy.tech/project/scriptcollection)
56
- ![Coverage](https://raw.githubusercontent.com/anionDevevlopment/ScriptCollection/main/ScriptCollection/Other/Resources/TestCoverageBadges/badge_shieldsio_linecoverage_blue.svg)
57
-
58
- The ScriptCollection is the place for reusable scripts.
59
-
60
- ## Reference
61
-
62
- The reference can be found [here](https://aniondev.github.io/ScriptCollectionReference/index.html).
63
-
64
- ## Hints
65
-
66
- Most of the scripts are written in [python](https://www.python.org) 3.
67
-
68
- Caution: Before executing **any** script of this repository read the sourcecode of the script (and the sourcecode of all functions called by this function directly or transitively) carefully and verify that the script does exactly what you want to do and nothing else.
69
-
70
- Some functions are not entirely available on windows or require common third-party tools. See the [Runtime dependencies](#runtime-dependencies)-section for more information.
71
-
72
- When using ScriptCollection it is not required but recommended for better usability to have [epew](https://github.com/anionDev/Epew) installed.
73
-
74
- ## Get ScriptCollection
75
-
76
- ### Installation via pip
77
-
78
- `pip3 install ScriptCollection`
79
-
80
- See the [PyPI-site for ScriptCollection](https://pypi.org/project/ScriptCollection)
81
-
82
- ### Download sourcecode using git
83
-
84
- You can simply git-clone the ScriptCollection and then use the scripts under the provided license.
85
-
86
- `git clone https://github.com/anionDevevlopment/ScriptCollection.git`
87
-
88
- It may be more easy to pip-install the ScriptCollection but technically pip is not required. Actually you need to git-clone (or download as zip-file from [GitHub](https://github.com/anionDevevlopment/ScriptCollection) the ScriptCollection to use the scripts in this repository which are not written in python.
89
-
90
- ## Troubleshooting
91
-
92
- It is recommended to always use only the newest version of the ScriptCollection. If you have an older version: Update it (e. g. using `pip3 install ScriptCollection --upgrade` if you installed the ScriptCollection via pip). If you still have problems, then feel free to create an [issue](https://github.com/anionDevevlopment/ScriptCollection/issues).
93
-
94
- If you have installed the ScriptCollection as pip-package you can simply check the version using Python with the following commands:
95
-
96
- ```lang-bash
97
- from ScriptCollection.ScriptCollectionCore import ScriptCollectionCore
98
- ScriptCollectionCore.get_scriptcollection_version()
99
- ```
100
-
101
- Or you can simply run `pip3 freeze` folder to get information about (all) currently installed pip-packages.
102
-
103
- ## Development
104
-
105
- ### Branching-system
106
-
107
- This repository applies the [GitFlowSimplified](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/BranchingSystem/GitFlowSimplified/GitFlowSimplified.md)-branching-system.
108
-
109
- ### Repository-structure
110
-
111
- This repository applies the [CommonProjectStructure](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/RepositoryStructure/CommonProjectStructure/CommonProjectStructure.md)-branching-system.
112
-
113
- ### Install dependencies
114
-
115
- ScriptCollection requires [Python](https://www.python.org) 3.10.
116
-
117
- To develop ScriptCollection it is obviously required that the following commandline-commands are available on your system:
118
-
119
- - `python` (on some systems `python3`)
120
- - `pip3`
121
-
122
- The pip-packages which are required for developing on this project are defined in `requirements.txt`.
123
-
124
- ### IDE
125
-
126
- The recommended IDE for developing ScriptCollection is Visual Studio Code.
127
- The recommended addons for developing ScriptCollection with Visual Studio Code are:
128
-
129
- - [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
130
- - [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
131
- - [Spell Right](https://marketplace.visualstudio.com/items?itemName=ban.spellright)
132
- - [docs-markdown](https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-markdown)
133
-
134
- ### Build
135
-
136
- To create and install an ScriptCollection locally simply do the following commands:
137
-
138
- ```bash
139
- python ./ScriptCollection/Other/Build/Build.py
140
- pip3 install --force-reinstall ./ScriptCollection/Other/Artifacts/Wheel/ScriptCollection-x.x.x-py3-none-any.whl
141
- ```
142
-
143
- (Note: `x.x.x` must be replaced by the appropriate version-number.)
144
-
145
- ### Coding style
146
-
147
- In this repository [pylint](https://pylint.org/) will be used to report linting-issues.
148
- If you change code in this repository please ensure pylint does not find any issues before creating a pull-request.
149
-
150
- If linting-issues exist in the current code-base can be checked by running `python ./ScriptCollection/Other/QualityCheck/Linting.py`.
151
-
152
- ## Runtime dependencies
153
-
154
- ScriptCollection requires [Python](https://www.python.org) 3.10.
155
-
156
- The usual Python-dependencies will be installed automagically by `pip`.
157
-
158
- For functions to to read or change the permissions or the owner of a file the ScriptCollection relies on the functionality of the following tools:
159
-
160
- - chmod
161
- - chown
162
- - ls
163
-
164
- This tools must be available on the system where the functions should be executed. Meanwhile this tools are also available on Windows but may have a slightly limited functionality.
165
-
166
- ## License
167
-
168
- See [License.txt](https://raw.githubusercontent.com/anionDevevlopment/ScriptCollection/main/License.txt) for license-information.
1
+ Metadata-Version: 2.4
2
+ Name: scriptcollection
3
+ Version: 4.3.47
4
+ Summary: The ScriptCollection is the place for reusable scripts.
5
+ Author-email: Marius Göcke <marius.goecke@gmail.com>
6
+ Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
7
+ Project-URL: Documentation, https://aniondev.github.io/ScriptCollectionReference/index.html
8
+ Project-URL: Changelog, https://github.com/anionDev/ScriptCollection/tree/main/Other/Resources/Changelog
9
+ Keywords: package,release,build,management
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 10
16
+ Classifier: Topic :: System :: Logging
17
+ Classifier: Topic :: System :: Monitoring
18
+ Classifier: Topic :: System :: Archiving :: Packaging
19
+ Classifier: Topic :: System :: Systems Administration
20
+ Classifier: Topic :: Terminals
21
+ Classifier: Topic :: Utilities
22
+ Requires-Python: >=3.11
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: build>=1.5.0
25
+ Requires-Dist: coverage>=7.15.2
26
+ Requires-Dist: cyclonedx-bom>=7.1.0
27
+ Requires-Dist: defusedxml>=0.7.1
28
+ Requires-Dist: keyboard>=0.13.5
29
+ Requires-Dist: lcov-cobertura>=2.1.1
30
+ Requires-Dist: lxml>=6.0.1
31
+ Requires-Dist: ntplib>=0.4.0
32
+ Requires-Dist: Pillow>=11.3.0
33
+ Requires-Dist: psutil>=7.2.2
34
+ Requires-Dist: pycdlib>=1.16.0
35
+ Requires-Dist: Pygments>=2.20.0
36
+ Requires-Dist: pylint>=4.0.6
37
+ Requires-Dist: pyOpenSSL>=25.3.0
38
+ Requires-Dist: PyPDF>=6.14.2
39
+ Requires-Dist: pytest>=8.4.2
40
+ Requires-Dist: PyYAML>=6.0.3
41
+ Requires-Dist: qrcode>=8.2.0
42
+ Requires-Dist: send2trash>=1.8.3
43
+ Requires-Dist: twine>=6.2.0
44
+ Requires-Dist: xmlschema>=4.3.2
45
+
46
+ # ScriptCollection
47
+
48
+ ## General
49
+
50
+ [![Supported Python versions](https://img.shields.io/pypi/pyversions/ScriptCollection.svg)](https://pypi.org/project/ScriptCollection/)
51
+ ![PyPI](https://img.shields.io/pypi/v/ScriptCollection)
52
+ ![Dependencies](https://img.shields.io/librariesio/github/anionDevevlopment/ScriptCollection)
53
+
54
+ [![CodeFactor](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/badge/main)](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/overview/main)
55
+ [![Downloads](https://pepy.tech/badge/scriptcollection)](https://pepy.tech/project/scriptcollection)
56
+ ![Coverage](https://raw.githubusercontent.com/anionDevevlopment/ScriptCollection/main/ScriptCollection/Other/Resources/TestCoverageBadges/badge_shieldsio_linecoverage_blue.svg)
57
+
58
+ The ScriptCollection is the place for reusable scripts.
59
+
60
+ ## Reference
61
+
62
+ The reference can be found [here](https://aniondev.github.io/ScriptCollectionReference/index.html).
63
+
64
+ ## Hints
65
+
66
+ Most of the scripts are written in [python](https://www.python.org) 3.
67
+
68
+ Caution: Before executing **any** script of this repository read the sourcecode of the script (and the sourcecode of all functions called by this function directly or transitively) carefully and verify that the script does exactly what you want to do and nothing else.
69
+
70
+ Some functions are not entirely available on windows or require common third-party tools. See the [Runtime dependencies](#runtime-dependencies)-section for more information.
71
+
72
+ When using ScriptCollection it is not required but recommended for better usability to have [epew](https://github.com/anionDev/Epew) installed.
73
+
74
+ ## Get ScriptCollection
75
+
76
+ ### Installation via pip
77
+
78
+ `pip3 install ScriptCollection`
79
+
80
+ See the [PyPI-site for ScriptCollection](https://pypi.org/project/ScriptCollection)
81
+
82
+ ### Download sourcecode using git
83
+
84
+ You can simply git-clone the ScriptCollection and then use the scripts under the provided license.
85
+
86
+ `git clone https://github.com/anionDevevlopment/ScriptCollection.git`
87
+
88
+ It may be more easy to pip-install the ScriptCollection but technically pip is not required. Actually you need to git-clone (or download as zip-file from [GitHub](https://github.com/anionDevevlopment/ScriptCollection) the ScriptCollection to use the scripts in this repository which are not written in python.
89
+
90
+ ## Troubleshooting
91
+
92
+ It is recommended to always use only the newest version of the ScriptCollection. If you have an older version: Update it (e. g. using `pip3 install ScriptCollection --upgrade` if you installed the ScriptCollection via pip). If you still have problems, then feel free to create an [issue](https://github.com/anionDevevlopment/ScriptCollection/issues).
93
+
94
+ If you have installed the ScriptCollection as pip-package you can simply check the version using Python with the following commands:
95
+
96
+ ```lang-bash
97
+ from ScriptCollection.ScriptCollectionCore import ScriptCollectionCore
98
+ ScriptCollectionCore.get_scriptcollection_version()
99
+ ```
100
+
101
+ Or you can simply run `pip3 freeze` folder to get information about (all) currently installed pip-packages.
102
+
103
+ ## Development
104
+
105
+ ### Branching-system
106
+
107
+ This repository applies the [GitFlowSimplified](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/BranchingSystem/GitFlowSimplified/GitFlowSimplified.md)-branching-system.
108
+
109
+ ### Repository-structure
110
+
111
+ This repository applies the [CommonProjectStructure](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/RepositoryStructure/CommonProjectStructure/CommonProjectStructure.md)-branching-system.
112
+
113
+ ### Install dependencies
114
+
115
+ ScriptCollection requires [Python](https://www.python.org) 3.10.
116
+
117
+ To develop ScriptCollection it is obviously required that the following commandline-commands are available on your system:
118
+
119
+ - `python` (on some systems `python3`)
120
+ - `pip3`
121
+
122
+ The pip-packages which are required for developing on this project are defined in `requirements.txt`.
123
+
124
+ ### IDE
125
+
126
+ The recommended IDE for developing ScriptCollection is Visual Studio Code.
127
+ The recommended addons for developing ScriptCollection with Visual Studio Code are:
128
+
129
+ - [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
130
+ - [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
131
+ - [Spell Right](https://marketplace.visualstudio.com/items?itemName=ban.spellright)
132
+ - [docs-markdown](https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-markdown)
133
+
134
+ ### Build
135
+
136
+ To create and install an ScriptCollection locally simply do the following commands:
137
+
138
+ ```bash
139
+ python ./ScriptCollection/Other/Build/Build.py
140
+ pip3 install --force-reinstall ./ScriptCollection/Other/Artifacts/Wheel/ScriptCollection-x.x.x-py3-none-any.whl
141
+ ```
142
+
143
+ (Note: `x.x.x` must be replaced by the appropriate version-number.)
144
+
145
+ ### Coding style
146
+
147
+ In this repository [pylint](https://pylint.org/) will be used to report linting-issues.
148
+ If you change code in this repository please ensure pylint does not find any issues before creating a pull-request.
149
+
150
+ If linting-issues exist in the current code-base can be checked by running `python ./ScriptCollection/Other/QualityCheck/Linting.py`.
151
+
152
+ ## Runtime dependencies
153
+
154
+ ScriptCollection requires [Python](https://www.python.org) 3.10.
155
+
156
+ The usual Python-dependencies will be installed automagically by `pip`.
157
+
158
+ For functions to to read or change the permissions or the owner of a file the ScriptCollection relies on the functionality of the following tools:
159
+
160
+ - chmod
161
+ - chown
162
+ - ls
163
+
164
+ This tools must be available on the system where the functions should be executed. Meanwhile this tools are also available on Windows but may have a slightly limited functionality.
165
+
166
+ ## License
167
+
168
+ See [License.txt](https://raw.githubusercontent.com/anionDevevlopment/ScriptCollection/main/License.txt) for license-information.
@@ -1,6 +1,6 @@
1
1
  ScriptCollection/AnionBuildPlatform.py,sha256=GP-jnb1GbvT8jzlH-cqnxgOzBzeUdiaWnDXtKNjsxiA,12153
2
2
  ScriptCollection/CertificateUpdater.py,sha256=dR5JpJDlZdjD4_pgMz7zCrt1IM7VfatmK6pULSczxQw,9693
3
- ScriptCollection/Executables.py,sha256=7HPkyAqil8G0WO7kukInq0ineI9Gq3PnV4BYfVlOsQA,67063
3
+ ScriptCollection/Executables.py,sha256=cSnyAwQq3c79hKrARAh0MO3SH61iTtxwjfr0cchECro,67063
4
4
  ScriptCollection/GeneralUtilities.py,sha256=qYhrKkwbEewGIppuxYRmGhLP50C443tw7sBlwH7Mkbc,71606
5
5
  ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
6
6
  ScriptCollection/ProcessesRunner.py,sha256=yYaC95h40uszuZPggn2kK3qXIN2ZjGMCavo-NQ53ElQ,1537
@@ -9,7 +9,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
9
9
  ScriptCollection/ProgramRunnerPopen.py,sha256=zVD-gZY85o8wiGFcpYAGNDl-tXaKzipl1Bkhqy2ois4,4681
10
10
  ScriptCollection/ProgramRunnerSudo.py,sha256=RXsiceQ8W6a8YDk_2BPscVbIAmDIpIxqe9WHBy2r4CM,5233
11
11
  ScriptCollection/SCLog.py,sha256=LdzSJy3NnnwYCCefz2h4tiTy4BjT8lOz3IBG_bMOg9E,4821
12
- ScriptCollection/ScriptCollectionCore.py,sha256=vHxXBcT-LKI00_N54OK4wWMsNm7T84Zsrp5ENTkEvqM,246508
12
+ ScriptCollection/ScriptCollectionCore.py,sha256=p_aLrI1CymPmdpJ8r-MGP5FWKyiURNZjbJww5tiSCQc,248737
13
13
  ScriptCollection/UnassignedVariablesCheck.py,sha256=v59qLQ5RRvx31ouuCW7NWZj3McWENvGBPkV5ZGBmqJE,4344
14
14
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=WO2M28c2tUwsXFNa2L9zqMhdlyObWm3qpPE0LdIs7SE,2315
@@ -35,7 +35,7 @@ ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html,sha256=CX9S1bdOz
35
35
  ScriptCollection/TFCPS/SCTaskRunnerServer.py,sha256=rpuwSsQ6YQfZS2LGnvOH5ql8zs_-cHU4LQttS7XNT60,11272
36
36
  ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=H9FWlS6BPK-UWJXdWN686ePky4Hq-Q13T0Kx8HSJu7s,34990
37
37
  ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=Ll5EOkpVpPiFrM2mLeQXolaF7075IwgtnHXvfdpkH4k,9904
38
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=ufnDoe_YIMGlB-kyW_1mOKXUOl93PdmkktcjLneoB_s,32292
38
+ ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=6d-QBNA9Bw47JRRdVgEu6WWO5WHX_RB_jNzlNq3qfqA,33611
39
39
  ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=X2NgZgbOkJsdZ6wMHB_RuS_rQCuz5oQCqzYrxyXBN9Q,6680
40
40
  ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=5vCFfDiU8bvfcnoKNs2ATS8nsl6mYXcIuX7XfYE0tvg,2116
41
41
  ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=zp7n0Li7GTi4tERDMgDcJ-o3m6131m31zvkat0lALEc,7781
@@ -49,22 +49,22 @@ ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
49
49
  ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationBase.py,sha256=bT6Gd5pQpZCw4OQz6HWkPCSn5z__eUUEisABLDSxd0o,200
50
50
  ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationGenerate.py,sha256=QyjOfMY22JWCvKjMelHiDWbJiWqotOfebpJpgDUaoO4,237
51
51
  ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationNoGenerate.py,sha256=i0zEGehj0sttxjjZtoq2KFSKp_ulxVyWp_ZgAhIY_So,241
52
- ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=X-yrZJBE3EvN4hciPeWZ9jkLs8dOXzNyriMUT1-GFk8,46587
52
+ ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=ovi0WKgNykkGVQBLI6F5IS3xUD53MxqOgZWF1W2RnCw,46368
53
53
  ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
- ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=d8U-sIhsneMplYkG73BJRQQZh4uLoX7QiOhbnZNuOM8,8540
54
+ ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=CwDBogG7Lg3IyywpCGta9gcaqWpgjENNXaupS19ZwTM,8751
55
55
  ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
56
  ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=kyx26AnT1-LySFA46wfJ9yZUKYdMWTD0U2XZfSQbuB0,3497
57
57
  ScriptCollection/TFCPS/Go/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  ScriptCollection/TFCPS/Maven/TFCPS_CodeUnitSpecific_Maven.py,sha256=WcWWtCV3GkAk53RIN_6rjXNvkKZ5i5hBEMCmPQo6j30,1685
59
59
  ScriptCollection/TFCPS/Maven/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
- ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=i2msd3tmXaB8EWF3tIR5jwveIFlZcmeYXMde4UP32P4,14310
60
+ ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=doXQZKwTh1AI3he0DHRzl3dDCbo3nPq4odmZR6u-JxQ,13579
61
61
  ScriptCollection/TFCPS/NodeJS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=Bd1gxCk9Fb6JO4XFk-sUWdn4bOvMJp1xpvN6wTKMh0Y,15890
63
63
  ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
64
  ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
65
65
  ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
- scriptcollection-4.3.46.dist-info/METADATA,sha256=CEzicWf-ylGhyuAkBXLTWkLRHpcWMg0tRpeCmzBagRQ,7648
67
- scriptcollection-4.3.46.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
68
- scriptcollection-4.3.46.dist-info/entry_points.txt,sha256=xWOFHGufgef8jsKQ3c2pFBfM_hjweFXuxfKmghQs-VI,5814
69
- scriptcollection-4.3.46.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
70
- scriptcollection-4.3.46.dist-info/RECORD,,
66
+ scriptcollection-4.3.47.dist-info/METADATA,sha256=G_2TqST5k5NBQW1Gnm83whVm1bV7ukqvQEBaXsRyl6Q,7816
67
+ scriptcollection-4.3.47.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
68
+ scriptcollection-4.3.47.dist-info/entry_points.txt,sha256=xWOFHGufgef8jsKQ3c2pFBfM_hjweFXuxfKmghQs-VI,5814
69
+ scriptcollection-4.3.47.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
70
+ scriptcollection-4.3.47.dist-info/RECORD,,