ScriptCollection 4.4.44__py3-none-any.whl → 4.4.46__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.
- ScriptCollection/GeneralUtilities.py +6 -6
- ScriptCollection/OCIImages/OCIImageManager.py +7 -7
- ScriptCollection/ScriptCollectionCore.py +22 -21
- ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py +3 -3
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py +29 -4
- ScriptCollection/TFCPS/TFCPS_Tools_General.py +8 -8
- {scriptcollection-4.4.44.dist-info → scriptcollection-4.4.46.dist-info}/METADATA +172 -171
- {scriptcollection-4.4.44.dist-info → scriptcollection-4.4.46.dist-info}/RECORD +11 -11
- {scriptcollection-4.4.44.dist-info → scriptcollection-4.4.46.dist-info}/WHEEL +0 -0
- {scriptcollection-4.4.44.dist-info → scriptcollection-4.4.46.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.4.44.dist-info → scriptcollection-4.4.46.dist-info}/top_level.txt +0 -0
|
@@ -15,7 +15,7 @@ import urllib
|
|
|
15
15
|
import stat
|
|
16
16
|
import fnmatch
|
|
17
17
|
import secrets
|
|
18
|
-
import string as
|
|
18
|
+
import string as string_module
|
|
19
19
|
import sys
|
|
20
20
|
from importlib import resources
|
|
21
21
|
from enum import Enum
|
|
@@ -198,8 +198,8 @@ class GeneralUtilities:
|
|
|
198
198
|
@check_arguments
|
|
199
199
|
def string_to_date(value: str) -> date:
|
|
200
200
|
"""expects a value in the format 2022-10-06"""
|
|
201
|
-
|
|
202
|
-
return date(int(
|
|
201
|
+
parts = value.split("-")
|
|
202
|
+
return date(int(parts[0]), int(parts[1]), int(parts[2]))
|
|
203
203
|
|
|
204
204
|
@staticmethod
|
|
205
205
|
@check_arguments
|
|
@@ -1198,7 +1198,7 @@ class GeneralUtilities:
|
|
|
1198
1198
|
@check_arguments
|
|
1199
1199
|
def generate_password(length: int = 16, alphabet: str = None) -> None:
|
|
1200
1200
|
if alphabet is None:
|
|
1201
|
-
alphabet =
|
|
1201
|
+
alphabet = string_module.ascii_letters + string_module.digits+"_"
|
|
1202
1202
|
return GeneralUtilities.empty_string.join(secrets.choice(alphabet) for i in range(length))
|
|
1203
1203
|
|
|
1204
1204
|
@staticmethod
|
|
@@ -1448,8 +1448,8 @@ class GeneralUtilities:
|
|
|
1448
1448
|
def float_to_string(number: float, leading_zeroplaces: int, trailing_zeroplaces: int) -> str:
|
|
1449
1449
|
plain_str = str(number)
|
|
1450
1450
|
GeneralUtilities.assert_condition("." in plain_str)
|
|
1451
|
-
|
|
1452
|
-
return
|
|
1451
|
+
parts: list[str] = plain_str.split(".")
|
|
1452
|
+
return parts[0].zfill(leading_zeroplaces)+"."+parts[1].ljust(trailing_zeroplaces, '0')
|
|
1453
1453
|
|
|
1454
1454
|
@staticmethod
|
|
1455
1455
|
@check_arguments
|
|
@@ -95,9 +95,9 @@ class OCIImageManager:
|
|
|
95
95
|
def custom_registry_is_defined(self,image_name:str)->bool:
|
|
96
96
|
global_docker_image_registries_file=self.get_global_docker_image_registries_file()
|
|
97
97
|
for line in GeneralUtilities.read_nonempty_lines_from_file(global_docker_image_registries_file)[1:]:
|
|
98
|
-
|
|
99
|
-
if image_name==
|
|
100
|
-
GeneralUtilities.assert_condition(GeneralUtilities.string_has_content(
|
|
98
|
+
line_parts=line.split(";")
|
|
99
|
+
if image_name==line_parts[0]:
|
|
100
|
+
GeneralUtilities.assert_condition(GeneralUtilities.string_has_content(line_parts[1]),f"No registry defined for image {image_name}.")
|
|
101
101
|
return True
|
|
102
102
|
return False
|
|
103
103
|
|
|
@@ -191,10 +191,10 @@ class OCIImageManager:
|
|
|
191
191
|
if line.startswith("ImageName;"): #header line
|
|
192
192
|
new_lines.append(line)
|
|
193
193
|
continue
|
|
194
|
-
|
|
195
|
-
image_name=
|
|
196
|
-
registry_address=
|
|
197
|
-
default_tag=
|
|
194
|
+
line_parts=line.split(";")
|
|
195
|
+
image_name=line_parts[0]
|
|
196
|
+
registry_address=line_parts[1]
|
|
197
|
+
default_tag=line_parts[2]
|
|
198
198
|
tag=default_tag
|
|
199
199
|
try:
|
|
200
200
|
addresses_to_check=[]
|
|
@@ -40,7 +40,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
40
40
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
41
41
|
from .SCLog import SCLog, LogLevel
|
|
42
42
|
|
|
43
|
-
version = "4.4.
|
|
43
|
+
version = "4.4.46"
|
|
44
44
|
__version__ = version
|
|
45
45
|
|
|
46
46
|
class VSCodeWorkspaceShellTask:
|
|
@@ -1740,8 +1740,8 @@ class ScriptCollectionCore:
|
|
|
1740
1740
|
|
|
1741
1741
|
@GeneralUtilities.check_arguments
|
|
1742
1742
|
def __sort_fmd(self, line: str):
|
|
1743
|
-
|
|
1744
|
-
filetype: str =
|
|
1743
|
+
parts: list = line.split(";")
|
|
1744
|
+
filetype: str = parts[1]
|
|
1745
1745
|
if filetype == "d":
|
|
1746
1746
|
return -1
|
|
1747
1747
|
if filetype == "f":
|
|
@@ -1753,11 +1753,11 @@ class ScriptCollectionCore:
|
|
|
1753
1753
|
lines = GeneralUtilities.read_lines_from_file(source_file, encoding)
|
|
1754
1754
|
lines.sort(key=self.__sort_fmd)
|
|
1755
1755
|
for line in lines:
|
|
1756
|
-
|
|
1757
|
-
full_path_of_file_or_folder: str = os.path.join(folder,
|
|
1758
|
-
filetype: str =
|
|
1759
|
-
user: str =
|
|
1760
|
-
permissions: str =
|
|
1756
|
+
parts: list = line.split(";")
|
|
1757
|
+
full_path_of_file_or_folder: str = os.path.join(folder, parts[0])
|
|
1758
|
+
filetype: str = parts[1]
|
|
1759
|
+
user: str = parts[2]
|
|
1760
|
+
permissions: str = parts[3]
|
|
1761
1761
|
if filetype == "d" and create_folder_is_not_exist and not os.path.isdir(full_path_of_file_or_folder):
|
|
1762
1762
|
GeneralUtilities.ensure_directory_exists(full_path_of_file_or_folder)
|
|
1763
1763
|
if (filetype == "f" and os.path.isfile(full_path_of_file_or_folder)) or (filetype == "d" and os.path.isdir(full_path_of_file_or_folder)):
|
|
@@ -2446,8 +2446,8 @@ resolving a name requires fontconfig, which does not exist on every system ffmpe
|
|
|
2446
2446
|
|
|
2447
2447
|
@GeneralUtilities.check_arguments
|
|
2448
2448
|
def __get_file_owner_helper(self, ls_output: str) -> str:
|
|
2449
|
-
|
|
2450
|
-
return f"{
|
|
2449
|
+
parts = ls_output.split()
|
|
2450
|
+
return f"{parts[2]}:{parts[3]}"
|
|
2451
2451
|
|
|
2452
2452
|
@GeneralUtilities.check_arguments
|
|
2453
2453
|
def get_file_owner_and_file_permission(self, file: str) -> str:
|
|
@@ -2947,11 +2947,11 @@ resolving a name requires fontconfig, which does not exist on every system ffmpe
|
|
|
2947
2947
|
"""Increments a version in the format "major.minor.patch". Incrementing a part resets the less significant parts to 0;
|
|
2948
2948
|
if several flags are set they are applied in the order major, minor, patch (so for example major and patch together
|
|
2949
2949
|
turn "1.2.3" into "2.0.1"). Raises a ValueError if input_version does not consist of exactly three parts."""
|
|
2950
|
-
|
|
2951
|
-
GeneralUtilities.assert_condition(len(
|
|
2952
|
-
major = int(
|
|
2953
|
-
minor = int(
|
|
2954
|
-
patch = int(
|
|
2950
|
+
parts = input_version.split(".")
|
|
2951
|
+
GeneralUtilities.assert_condition(len(parts) == 3, f"Version '{input_version}' does not have the 'major.minor.patch'-pattern.")
|
|
2952
|
+
major = int(parts[0])
|
|
2953
|
+
minor = int(parts[1])
|
|
2954
|
+
patch = int(parts[2])
|
|
2955
2955
|
if increment_major:
|
|
2956
2956
|
major = major+1
|
|
2957
2957
|
minor=0
|
|
@@ -3017,8 +3017,8 @@ resolving a name requires fontconfig, which does not exist on every system ffmpe
|
|
|
3017
3017
|
result = self.increment_version(current_version, False, False, True)
|
|
3018
3018
|
elif self.is_minor_branch(current_branch_name):
|
|
3019
3019
|
incremented = self.increment_version(current_version, False, True, False)
|
|
3020
|
-
|
|
3021
|
-
result = f"{
|
|
3020
|
+
parts = incremented.split(".")
|
|
3021
|
+
result = f"{parts[0]}.{parts[1]}.0"
|
|
3022
3022
|
elif self.is_major_branch(current_branch_name):
|
|
3023
3023
|
incremented = self.increment_version(current_version, True, False, False)
|
|
3024
3024
|
major = incremented.split(".")[0]
|
|
@@ -3524,8 +3524,8 @@ TXDX
|
|
|
3524
3524
|
result: list[str] = []
|
|
3525
3525
|
for std_out_line in std_out_lines:
|
|
3526
3526
|
normalized_line = ';'.join(std_out_line.split())
|
|
3527
|
-
|
|
3528
|
-
result.append(
|
|
3527
|
+
parts = normalized_line.split(";")
|
|
3528
|
+
result.append(parts[1])
|
|
3529
3529
|
return result
|
|
3530
3530
|
|
|
3531
3531
|
@GeneralUtilities.check_arguments
|
|
@@ -4372,14 +4372,15 @@ OCR-content:
|
|
|
4372
4372
|
self.run_program_with_retry("docker","buildx prune -a -f",amount_of_attempts=amount_of_attempts,throw_exception_if_exitcode_is_not_zero=False) # buildx prune is not available on every machine.
|
|
4373
4373
|
self.run_program_with_retry("docker","system df",print_live_output=self.log.loglevel==LogLevel.Debug,amount_of_attempts=amount_of_attempts)
|
|
4374
4374
|
|
|
4375
|
+
|
|
4375
4376
|
@GeneralUtilities.check_arguments
|
|
4376
4377
|
def get_docker_networks(self)->list[str]:
|
|
4377
4378
|
program_result=self.run_program("docker","network list")
|
|
4378
4379
|
result=[]
|
|
4379
4380
|
lines=program_result[1].split("\n")[1:]
|
|
4380
4381
|
for line in lines:
|
|
4381
|
-
|
|
4382
|
-
result.append(
|
|
4382
|
+
parts=[item for item in line.split(' ') if GeneralUtilities.string_has_content(item)]
|
|
4383
|
+
result.append(parts[1].replace("\n","").replace("\r","").strip())
|
|
4383
4384
|
return result
|
|
4384
4385
|
|
|
4385
4386
|
@GeneralUtilities.check_arguments
|
|
@@ -321,8 +321,8 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
321
321
|
result: dict[str, str] = dict[str, str]()
|
|
322
322
|
files_tuples = GeneralUtilities.to_list(result_plain, ";")
|
|
323
323
|
for files_tuple in files_tuples:
|
|
324
|
-
|
|
325
|
-
result[
|
|
324
|
+
parts = files_tuple.split("=")
|
|
325
|
+
result[parts[0]] = parts[1]
|
|
326
326
|
return result
|
|
327
327
|
|
|
328
328
|
@GeneralUtilities.check_arguments
|
|
@@ -444,7 +444,7 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
444
444
|
def linting(self) -> None:
|
|
445
445
|
codeunit_name = self.get_codeunit_name()
|
|
446
446
|
codeunit_folder = self.get_codeunit_folder()
|
|
447
|
-
self._protected_sc.normalize_invisible_characters_of_files_in_folder(codeunit_folder, ["cs"])
|
|
447
|
+
self._protected_sc.normalize_invisible_characters_of_files_in_folder(codeunit_folder, ["cs","sql"])
|
|
448
448
|
nuspec_file = os.path.join(codeunit_folder, "Other", "Build", f"{codeunit_name}.nuspec")
|
|
449
449
|
if os.path.isfile(nuspec_file):
|
|
450
450
|
self._protected_sc.format_xml_file(nuspec_file)
|
|
@@ -200,6 +200,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
200
200
|
self.tfcps_tools_general.generate_svg_files_from_plantuml_files_for_repository(self.repository, self.use_cache())
|
|
201
201
|
self.tfcps_tools_general.generate_svg_files_from_vega_files_for_repository(self.repository, self.use_cache())
|
|
202
202
|
self.tfcps_tools_general.generate_svg_files_from_vegalite_files_for_repository(self.repository, self.use_cache())
|
|
203
|
+
self.__do_project_linting(self.repository)
|
|
203
204
|
self.__normalize_line_endings_of_common_files()
|
|
204
205
|
|
|
205
206
|
self.sc.log.log(GeneralUtilities.get_line())
|
|
@@ -235,6 +236,30 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
235
236
|
self.sc.log.log(GeneralUtilities.get_line())
|
|
236
237
|
|
|
237
238
|
|
|
239
|
+
@GeneralUtilities.check_arguments
|
|
240
|
+
def __do_project_linting(self, repository_folder: str) -> None:
|
|
241
|
+
self.sc.log.log("Do project-linting...")
|
|
242
|
+
self.__do_project_linting_using_codespell(repository_folder)
|
|
243
|
+
|
|
244
|
+
@GeneralUtilities.check_arguments
|
|
245
|
+
def __do_project_linting_using_codespell(self, repository_folder: str) -> None:
|
|
246
|
+
"""Searches for typos in the repository using codespell. Findings are only reported as warnings and do not let the build fail.
|
|
247
|
+
codespell runs in the repository-folder, so an optional "<repository>/.codespellrc" is used automatically, for example to
|
|
248
|
+
define words which are no typos in the context of the repository (option "ignore-words-list")."""
|
|
249
|
+
try:
|
|
250
|
+
self.sc.log.log("Search for typos using codespell...")
|
|
251
|
+
(exit_code, stdout, stderr, _) = self.sc.run_program_argsasarray("codespell", [], repository_folder, throw_exception_if_exitcode_is_not_zero=False)
|
|
252
|
+
codespell_exitcode_for_found_typos: int = 65
|
|
253
|
+
if exit_code not in (0, codespell_exitcode_for_found_typos):
|
|
254
|
+
raise ValueError(f"codespell failed with exit-code {exit_code}: {stderr}")
|
|
255
|
+
findings: list[str] = [line for line in GeneralUtilities.string_to_lines(stdout) if GeneralUtilities.string_has_content(line)]
|
|
256
|
+
for finding in findings:
|
|
257
|
+
self.sc.log.log(f"Possible typo: {finding}", LogLevel.Warning)
|
|
258
|
+
if 0 < len(findings):
|
|
259
|
+
self.sc.log.log(f"codespell found {len(findings)} possible typo(s). It is recommended to fix them by running \"codespell -w\" in the repository-folder. Known false positives can be ignored using the file \".codespellrc\" in the repository-folder.", LogLevel.Warning)
|
|
260
|
+
except Exception as e:
|
|
261
|
+
self.sc.log.log(f"An error occurred while running codespell: {e}", LogLevel.Warning)
|
|
262
|
+
|
|
238
263
|
@GeneralUtilities.check_arguments
|
|
239
264
|
def __ensure_scriptcollection_gitignore_is_setup(self, repository_folder: str) -> None:
|
|
240
265
|
"""Ensures that "<repository>/.ScriptCollection/.gitignore" exists and contains the expected entries."""
|
|
@@ -577,10 +602,10 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
577
602
|
csv_lines=[]
|
|
578
603
|
for line in GeneralUtilities.read_lines_from_file(loc_metric_file):
|
|
579
604
|
if GeneralUtilities.string_has_content(line):
|
|
580
|
-
|
|
581
|
-
v=
|
|
582
|
-
t=
|
|
583
|
-
loc=
|
|
605
|
+
parts=line.split(";")
|
|
606
|
+
v=parts[0]
|
|
607
|
+
t=parts[1]
|
|
608
|
+
loc=parts[2]
|
|
584
609
|
csv_lines.append(f"{v},{t},{loc}")
|
|
585
610
|
GeneralUtilities.write_lines_to_file(loc_data_file,csv_lines)
|
|
586
611
|
self.sc.normalize_invisible_characters(loc_data_file) # ensure the generated LoC-diagram-csv always uses LF line-endings
|
|
@@ -105,12 +105,12 @@ class TFCPS_Tools_General:
|
|
|
105
105
|
|
|
106
106
|
@GeneralUtilities.check_arguments
|
|
107
107
|
def download_cyclonedx(self, enforce_update: bool = False) -> None:
|
|
108
|
-
self.__sc.log.log("Download
|
|
108
|
+
self.__sc.log.log("Download cacheable tool \"CycloneDX-CLI\" into global cache...", LogLevel.Debug)
|
|
109
109
|
self.ensure_cyclonedxcli_is_available(enforce_update)
|
|
110
110
|
|
|
111
111
|
@GeneralUtilities.check_arguments
|
|
112
112
|
def download_jre(self, enforce_update: bool = False) -> None:
|
|
113
|
-
self.__sc.log.log("Download
|
|
113
|
+
self.__sc.log.log("Download cacheable tool \"JRE\" into global cache...", LogLevel.Debug)
|
|
114
114
|
# No repository-context is available when warming the global cache (e.g. scdownloadcachabletools in a
|
|
115
115
|
# build-image), so download the default version pinned by the ScriptCollection-package. Actual builds
|
|
116
116
|
# pass the version pinned in their own '<repo>/Other/Resources/Dependencies/JRE/Version.txt'. This is
|
|
@@ -120,23 +120,23 @@ class TFCPS_Tools_General:
|
|
|
120
120
|
|
|
121
121
|
@GeneralUtilities.check_arguments
|
|
122
122
|
def download_mediamtx(self, enforce_update: bool = False) -> None:
|
|
123
|
-
self.__sc.log.log("Download
|
|
123
|
+
self.__sc.log.log("Download cacheable tool \"MediaMTX\" into global cache...", LogLevel.Debug)
|
|
124
124
|
for architecture in [Platform.Windows_AMD64, Platform.Linux_AMD64, Platform.Linux_ARM64, Platform.MacOS_ARM64]:
|
|
125
125
|
self.__ensure_mediamtx_archive_in_global_cache(architecture, enforce_update)
|
|
126
126
|
|
|
127
127
|
@GeneralUtilities.check_arguments
|
|
128
128
|
def download_trufflehog(self, enforce_update: bool = False) -> None:
|
|
129
|
-
self.__sc.log.log("Download
|
|
129
|
+
self.__sc.log.log("Download cacheable tool \"TruffleHog\" into global cache...", LogLevel.Debug)
|
|
130
130
|
self.ensure_trufflehog_is_available(enforce_update)
|
|
131
131
|
|
|
132
132
|
@GeneralUtilities.check_arguments
|
|
133
133
|
def download_openapigenerator(self, enforce_update: bool = False) -> None:
|
|
134
|
-
self.__sc.log.log("Download
|
|
134
|
+
self.__sc.log.log("Download cacheable tool \"OpenAPIGenerator\" into global cache...", LogLevel.Debug)
|
|
135
135
|
self.ensure_openapigenerator_is_available(not enforce_update)
|
|
136
136
|
|
|
137
137
|
@GeneralUtilities.check_arguments
|
|
138
138
|
def download_androidappbundletool(self, enforce_update: bool = False) -> None:
|
|
139
|
-
self.__sc.log.log("Download
|
|
139
|
+
self.__sc.log.log("Download cacheable tool \"AndroidAppBundleTool\" into global cache...", LogLevel.Debug)
|
|
140
140
|
# target_folder is not used by ensure_androidappbundletool_is_available (the jar is
|
|
141
141
|
# always stored in the global cache); pass the cache folder as a harmless value.
|
|
142
142
|
self.ensure_androidappbundletool_is_available(self.__sc.get_global_cache_folder(), enforce_update)
|
|
@@ -335,8 +335,8 @@ class TFCPS_Tools_General:
|
|
|
335
335
|
result: list[tuple[str, str]] = []
|
|
336
336
|
for item in plain_content:
|
|
337
337
|
if len(re.findall(space_character, item)) == 1:
|
|
338
|
-
|
|
339
|
-
result.append((
|
|
338
|
+
parts = item.split(space_character)
|
|
339
|
+
result.append((parts[0], parts[1]))
|
|
340
340
|
else:
|
|
341
341
|
raise ValueError(f'Unexpected author: "{item}"')
|
|
342
342
|
return result
|
|
@@ -1,171 +1,172 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: scriptcollection
|
|
3
|
-
Version: 4.4.
|
|
4
|
-
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
|
-
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
|
-
License-Expression: GPL-3.0-only
|
|
7
|
-
Project-URL: Homepage, https://github.com/anionDevelopment/ScriptCollection
|
|
8
|
-
Project-URL: Documentation, https://aniondev.github.io/ScriptCollectionReference/index.html
|
|
9
|
-
Project-URL: Changelog, https://github.com/anionDevelopment/ScriptCollection/tree/main/Other/Resources/Changelog
|
|
10
|
-
Keywords: package,release,build,management
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
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.6.1
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
Requires-Dist:
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist:
|
|
36
|
-
Requires-Dist:
|
|
37
|
-
Requires-Dist:
|
|
38
|
-
Requires-Dist:
|
|
39
|
-
Requires-Dist:
|
|
40
|
-
Requires-Dist:
|
|
41
|
-
Requires-Dist:
|
|
42
|
-
Requires-Dist:
|
|
43
|
-
Requires-Dist:
|
|
44
|
-
Requires-Dist:
|
|
45
|
-
Requires-Dist:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
](https://pypi.org/project/ScriptCollection/)
|
|
53
|
+

|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
[](https://www.codefactor.io/repository/github/anionDevelopment/scriptcollection/overview/main)
|
|
57
|
+
[](https://pepy.tech/project/scriptcollection)
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+
The ScriptCollection is the place for reusable scripts.
|
|
61
|
+
|
|
62
|
+
## Reference
|
|
63
|
+
|
|
64
|
+
The reference can be found [here](https://aniondev.github.io/ScriptCollectionReference/index.html).
|
|
65
|
+
|
|
66
|
+
## Hints
|
|
67
|
+
|
|
68
|
+
Most of the scripts are written in [python](https://www.python.org) 3.
|
|
69
|
+
|
|
70
|
+
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.
|
|
71
|
+
|
|
72
|
+
Some functions are not entirely available on windows or require common third-party tools. See the [Runtime dependencies](#runtime-dependencies)-section for more information.
|
|
73
|
+
|
|
74
|
+
When using ScriptCollection it is not required but recommended for better usability to have [epew](https://github.com/anionDev/Epew) installed.
|
|
75
|
+
|
|
76
|
+
## Get ScriptCollection
|
|
77
|
+
|
|
78
|
+
### Installation via pip
|
|
79
|
+
|
|
80
|
+
`pip3 install ScriptCollection`
|
|
81
|
+
|
|
82
|
+
See the [PyPI-site for ScriptCollection](https://pypi.org/project/ScriptCollection)
|
|
83
|
+
|
|
84
|
+
### Download sourcecode using git
|
|
85
|
+
|
|
86
|
+
You can simply git-clone the ScriptCollection and then use the scripts under the provided license.
|
|
87
|
+
|
|
88
|
+
`git clone https://github.com/anionDevelopment/ScriptCollection.git`
|
|
89
|
+
|
|
90
|
+
It may be easier 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/anionDevelopment/ScriptCollection)) the ScriptCollection to use the scripts in this repository which are not written in python.
|
|
91
|
+
|
|
92
|
+
## Troubleshooting
|
|
93
|
+
|
|
94
|
+
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/anionDevelopment/ScriptCollection/issues).
|
|
95
|
+
|
|
96
|
+
If you have installed the ScriptCollection as pip-package you can simply check the version by running `scshowversion` or using Python with the following commands:
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
from ScriptCollection.ScriptCollectionCore import ScriptCollectionCore
|
|
100
|
+
ScriptCollectionCore.get_scriptcollection_version()
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Or you can simply run `pip3 freeze` to get information about (all) currently installed pip-packages.
|
|
104
|
+
|
|
105
|
+
## Development
|
|
106
|
+
|
|
107
|
+
### Branching-system
|
|
108
|
+
|
|
109
|
+
This repository applies the [GitFlowSimplified](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/BranchingSystem/GitFlowSimplified/GitFlowSimplified.md)-branching-system.
|
|
110
|
+
|
|
111
|
+
### Repository-structure
|
|
112
|
+
|
|
113
|
+
This repository applies the [CommonProjectStructure](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/RepositoryStructure/CommonProjectStructure/CommonProjectStructure.md) as repository-structure.
|
|
114
|
+
|
|
115
|
+
### Install dependencies
|
|
116
|
+
|
|
117
|
+
ScriptCollection requires [Python](https://www.python.org) 3.11 or newer.
|
|
118
|
+
|
|
119
|
+
To develop ScriptCollection it is obviously required that the following commandline-commands are available on your system:
|
|
120
|
+
|
|
121
|
+
- `python` (on some systems `python3`)
|
|
122
|
+
- `pip3`
|
|
123
|
+
|
|
124
|
+
The pip-packages which are required for developing on this project are defined in `ScriptCollection/requirements.txt`.
|
|
125
|
+
|
|
126
|
+
### IDE
|
|
127
|
+
|
|
128
|
+
The recommended IDE for developing ScriptCollection is Visual Studio Code.
|
|
129
|
+
The recommended addons for developing ScriptCollection with Visual Studio Code are:
|
|
130
|
+
|
|
131
|
+
- [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
|
|
132
|
+
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
|
|
133
|
+
- [Spell Right](https://marketplace.visualstudio.com/items?itemName=ban.spellright)
|
|
134
|
+
- [docs-markdown](https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-markdown)
|
|
135
|
+
|
|
136
|
+
### Build
|
|
137
|
+
|
|
138
|
+
To create and install a ScriptCollection locally simply do the following commands in the repository-root:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
python ./ScriptCollection/Other/Build/Build.py
|
|
142
|
+
pip3 install --force-reinstall ./ScriptCollection/Other/Artifacts/BuildResult_Wheel/scriptcollection-x.x.x-py3-none-any.whl
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
(Note: `x.x.x` must be replaced by the appropriate version-number.)
|
|
146
|
+
|
|
147
|
+
The complete build-pipeline (build, testcases, linting, reference-generation, etc.) is run by `scbuildcodeunits` in the repository-root (or `task bb` if [Task](https://taskfile.dev) is installed). Afterwards `task dl` installs the built wheel locally.
|
|
148
|
+
|
|
149
|
+
### Coding style
|
|
150
|
+
|
|
151
|
+
In this repository [pylint](https://pylint.org/) will be used to report linting-issues.
|
|
152
|
+
If you change code in this repository please ensure pylint does not find any issues before creating a pull-request.
|
|
153
|
+
|
|
154
|
+
If linting-issues exist in the current code-base can be checked by running `python ./ScriptCollection/Other/QualityCheck/Linting.py`.
|
|
155
|
+
|
|
156
|
+
## Runtime dependencies
|
|
157
|
+
|
|
158
|
+
ScriptCollection requires [Python](https://www.python.org) 3.11 or newer.
|
|
159
|
+
|
|
160
|
+
The usual Python-dependencies will be installed automagically by `pip`.
|
|
161
|
+
|
|
162
|
+
For functions to read or change the permissions or the owner of a file the ScriptCollection relies on the functionality of the following tools:
|
|
163
|
+
|
|
164
|
+
- chmod
|
|
165
|
+
- chown
|
|
166
|
+
- ls
|
|
167
|
+
|
|
168
|
+
These tools must be available on the system where the functions should be executed. Meanwhile these tools are also available on Windows but may have a slightly limited functionality.
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
See [License.txt](https://raw.githubusercontent.com/anionDevelopment/ScriptCollection/main/License.txt) for license-information.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
ScriptCollection/ArbTranslationsOrganizer.py,sha256=3TO4fjkYADcHGyUXdiQk-RtfCxtf9ojuBS3CbZtgXBE,12218
|
|
2
2
|
ScriptCollection/CertificateUpdater.py,sha256=yZc7KESc1F_Mc6HP2UfLmNHRc2MvtVqp0t60J_CqY3s,9755
|
|
3
3
|
ScriptCollection/Executables.py,sha256=YczSDzT4HEV9aTlYGuk6TIjQSwHMsg2MKZ9SVncOfsY,74857
|
|
4
|
-
ScriptCollection/GeneralUtilities.py,sha256=
|
|
4
|
+
ScriptCollection/GeneralUtilities.py,sha256=nNpLKKQO_vPoSw-kL_Pj15Hypm0cq1Y64UAPn3aVsoo,73443
|
|
5
5
|
ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
|
|
6
6
|
ScriptCollection/ProcessesRunner.py,sha256=EYW927zu3QGmkCoHoYLkofmQZd7Tt1RIyVuhP3UYGho,1496
|
|
7
7
|
ScriptCollection/ProgramRunnerBase.py,sha256=eZenpiIFW1dhvSVCG7cfBs5hO4_KLlOxR7oXoSxUDmk,2286
|
|
@@ -11,12 +11,12 @@ ScriptCollection/ProgramRunnerSudo.py,sha256=vwKq-MOcqsgiKhSf-MBUDBC_UyaU8evP3Ro
|
|
|
11
11
|
ScriptCollection/RepositoryDiagramGenerator.py,sha256=K_u2NW_p4ozdWD50irJEkkcDVa70TcUJpZN63TeXSLw,7092
|
|
12
12
|
ScriptCollection/RepositoryHistoryAnalyzer.py,sha256=u9141B9D-Kef-9uo3yR7BXKUMzIKLVsesnYk7H-cWm4,6157
|
|
13
13
|
ScriptCollection/SCLog.py,sha256=Fjf8Pdi63cXHGMxL_aI6A0dwGm7QIfrv3czjvpSUlaM,4705
|
|
14
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
14
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=YliW92F2xHeO5u3baE-DKY2-1cxR0FulD42gckMki8Y,308791
|
|
15
15
|
ScriptCollection/TestKind.py,sha256=jqLJwNvQeyea7SZf-UFzMC9pM0znv4do7FIC1xq8u9M,1672
|
|
16
16
|
ScriptCollection/UnassignedVariablesCheck.py,sha256=8xNcp1D5HeOLO1a1NEerq2TsnpFhw7yzYPkaay-oisY,3804
|
|
17
17
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=UB0lUYdAjFk8RIgsikKELRWDMZPlR_zNgwvCJS1naVs,2455
|
|
19
|
-
ScriptCollection/OCIImages/OCIImageManager.py,sha256=
|
|
19
|
+
ScriptCollection/OCIImages/OCIImageManager.py,sha256=MbC4OBTw3eYcfm6wQlD-SJ04VvpkLTQvMrDeanpLPpg,24099
|
|
20
20
|
ScriptCollection/OCIImages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebian.py,sha256=rty9SnftreYWLIwvdUn4LhiHqCTevb_tWuYWoOnRJuo,732
|
|
22
22
|
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebianSlim.py,sha256=M-4qxKWBZRtKdYQ-uXgfrxRBoZTXEjgqCxFXyFxTyzc,736
|
|
@@ -38,7 +38,7 @@ ScriptCollection/TFCPS/SCTaskRunnerServer.py,sha256=tub8_1QBu0nWAaGnBWp2nErOW-SO
|
|
|
38
38
|
ScriptCollection/TFCPS/TFCPS_BuildCodeUnitsHook.py,sha256=67_DQwoH5bhxxSmwtuAeoW1NOCMiLMzOy48OqlJX-KY,1744
|
|
39
39
|
ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=yosafTfbB0LBMKomZvLnFJpgJpJOMHsGKLirVjG1slk,40501
|
|
40
40
|
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=Mj9t1SyRpkYZE74cLsGWYv4xB89gXL2ld-RX3xvvGdw,9835
|
|
41
|
-
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=
|
|
41
|
+
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=N-XYZzWd96Q5OHVcO_p7y88_rDaCohMbMr9fMP5iAdQ,56823
|
|
42
42
|
ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=BVK3fpEyjcXYVHIb6YYLH7bWe6iKRaCtPrJ3tXAemYw,6582
|
|
43
43
|
ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=mRBcf7XuNWOSXbZYc3NuJow18AMZ30D6Z-BtyNYfNcM,2072
|
|
44
44
|
ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=Krt5oyGNcRAN3szsgU7LoTh8yVTOdHW-Kq7R9MDDV-Q,7673
|
|
@@ -46,7 +46,7 @@ ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=oYEhz5ZWMnbu97_CcYEqdDxakUF
|
|
|
46
46
|
ScriptCollection/TFCPS/TFCPS_OCIImageSecretScan.py,sha256=Jb7AaMcJDW-gYEYBUVZAG3QLTTNWmXlvVEW-lZsykws,14821
|
|
47
47
|
ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py,sha256=XLVsFTA1jvfDbZ7wYJgIdEByZhF_bYVbA5jkisuvK4k,2322
|
|
48
48
|
ScriptCollection/TFCPS/TFCPS_RemoteBuild.py,sha256=2Tx5HLk1ZftBWDCTiGZdP2QiiGNyWsEuTCSt33dNQjc,23891
|
|
49
|
-
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=
|
|
49
|
+
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=ueObphFdSZ4cU4Siv8XOdKDEuRWV4GrzD-vJ1qfASXg,156148
|
|
50
50
|
ScriptCollection/TFCPS/TFCPS_VisualRegressionTests.py,sha256=6_63udxHnPlu_TMk_ftLZTnzriJO8MCxVCVAsweZqHs,37073
|
|
51
51
|
ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
52
|
ScriptCollection/TFCPS/CPP/TFCPS_CodeUnitSpecific_CPP.py,sha256=BNZPMjGiWLMBH7QDtP06WEVLMnI38NLX4Dpd13bSbi4,16614
|
|
@@ -56,7 +56,7 @@ ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
|
56
56
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationBase.py,sha256=bT6Gd5pQpZCw4OQz6HWkPCSn5z__eUUEisABLDSxd0o,200
|
|
57
57
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationGenerate.py,sha256=QyjOfMY22JWCvKjMelHiDWbJiWqotOfebpJpgDUaoO4,237
|
|
58
58
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationNoGenerate.py,sha256=i0zEGehj0sttxjjZtoq2KFSKp_ulxVyWp_ZgAhIY_So,241
|
|
59
|
-
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=
|
|
59
|
+
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=aA2hii53AZP_-CMU1cmrId4PbQJnzryLMAKsqtkRTaE,63167
|
|
60
60
|
ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
61
|
ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=4z6Az3I_qhd-l7EGFYiBllKZUWD3HppZpwurNA_u15U,58484
|
|
62
62
|
ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -72,8 +72,8 @@ ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=yyjWPMHQjPLkML
|
|
|
72
72
|
ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
73
73
|
ScriptCollection/TFCPS/TypeScript/TFCPS_CodeUnitSpecific_TypeScript.py,sha256=ILVhJHvwG5TvPBBqSvyACYb7W9QnWrJpxKgHu8IQu4g,9249
|
|
74
74
|
ScriptCollection/TFCPS/TypeScript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
|
-
scriptcollection-4.4.
|
|
76
|
-
scriptcollection-4.4.
|
|
77
|
-
scriptcollection-4.4.
|
|
78
|
-
scriptcollection-4.4.
|
|
79
|
-
scriptcollection-4.4.
|
|
75
|
+
scriptcollection-4.4.46.dist-info/METADATA,sha256=ZsuzAKeVTxfRqQDuYy7wUdQv6eG991X1SFKJ7Wya2qE,8204
|
|
76
|
+
scriptcollection-4.4.46.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
77
|
+
scriptcollection-4.4.46.dist-info/entry_points.txt,sha256=1nA5gUD0Y9L105JGIfTnnqDZhFjzKcFpFaUSrLn-Sw0,5991
|
|
78
|
+
scriptcollection-4.4.46.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
79
|
+
scriptcollection-4.4.46.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|