ScriptCollection 4.3.51__py3-none-any.whl → 4.3.52__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/Executables.py +14 -4
- ScriptCollection/GeneralUtilities.py +12 -0
- ScriptCollection/ScriptCollectionCore.py +1 -1
- ScriptCollection/TFCPS/TFCPS_Tools_General.py +2 -2
- {scriptcollection-4.3.51.dist-info → scriptcollection-4.3.52.dist-info}/METADATA +1 -1
- {scriptcollection-4.3.51.dist-info → scriptcollection-4.3.52.dist-info}/RECORD +9 -9
- {scriptcollection-4.3.51.dist-info → scriptcollection-4.3.52.dist-info}/entry_points.txt +1 -0
- {scriptcollection-4.3.51.dist-info → scriptcollection-4.3.52.dist-info}/WHEEL +0 -0
- {scriptcollection-4.3.51.dist-info → scriptcollection-4.3.52.dist-info}/top_level.txt +0 -0
ScriptCollection/Executables.py
CHANGED
|
@@ -272,16 +272,16 @@ def BuildCodeUnits() -> int:
|
|
|
272
272
|
def BuildCodeUnitsC() -> int:
|
|
273
273
|
parser = argparse.ArgumentParser()
|
|
274
274
|
parser.add_argument('-r','--repositoryfolder', required=False, default=".")
|
|
275
|
-
parser.add_argument('-b','--basemountfolder', required=False, default=None)
|
|
276
275
|
verbosity_values = ", ".join(f"{lvl.value}={lvl.name}" for lvl in LogLevel)
|
|
277
276
|
parser.add_argument('-v', '--verbosity', required=False, default=3, help=f"Sets the loglevel. Possible values: {verbosity_values}")
|
|
278
|
-
parser.add_argument('--targetenvironment', required=False, default="QualityCheck")
|
|
279
|
-
parser.add_argument('--additionalargumentsfile', required=False, default=None)
|
|
280
|
-
parser.add_argument("-
|
|
277
|
+
parser.add_argument('-e','--targetenvironment', required=False, default="QualityCheck")
|
|
278
|
+
parser.add_argument('-a','--additionalargumentsfile', required=False, default=None)
|
|
279
|
+
parser.add_argument("-n",'--nocache', required=False, default=False, action='store_true')
|
|
281
280
|
parser.add_argument('-p','--ispremerge', required=False, default=False, action='store_true')
|
|
282
281
|
parser.add_argument('--image', required=False, default="scbuilder:latest")
|
|
283
282
|
parser.add_argument('-u','--assertnonewchanges', required=False, default=False, action='store_true')
|
|
284
283
|
parser.add_argument('-m','--addreadytomergeflag', required=False, default=False, action='store_true')
|
|
284
|
+
parser.add_argument('-b','--basemountfolder', required=False, default=None)
|
|
285
285
|
args = parser.parse_args()
|
|
286
286
|
|
|
287
287
|
GeneralUtilities.reconfigure_standard_input_and_outputs()
|
|
@@ -568,6 +568,16 @@ def NormalizeLineEndings() -> int:
|
|
|
568
568
|
return 0
|
|
569
569
|
|
|
570
570
|
|
|
571
|
+
def RemoveInvisibleCharactersFromFile() -> int:
|
|
572
|
+
parser = argparse.ArgumentParser(description="Removes invisible characters from a file. The only exception is the line-feed character, which is kept.")
|
|
573
|
+
parser.add_argument('-p', '--path', required=True)
|
|
574
|
+
parser.add_argument('-e', '--encoding', default="utf-8")
|
|
575
|
+
args = parser.parse_args()
|
|
576
|
+
file = GeneralUtilities.resolve_relative_path(args.path, os.getcwd())
|
|
577
|
+
GeneralUtilities.remove_invisible_characters_from_file(file, args.encoding)
|
|
578
|
+
return 0
|
|
579
|
+
|
|
580
|
+
|
|
571
581
|
def PrintFileSize() -> int:
|
|
572
582
|
parser = argparse.ArgumentParser(description="This function prints the size of a file")
|
|
573
583
|
parser.add_argument('-p', '--path', required=True)
|
|
@@ -367,6 +367,18 @@ class GeneralUtilities:
|
|
|
367
367
|
text = GeneralUtilities.replace_underscores_in_text(text, replacements)
|
|
368
368
|
GeneralUtilities.write_text_to_file(file, text, encoding)
|
|
369
369
|
|
|
370
|
+
@staticmethod
|
|
371
|
+
@check_arguments
|
|
372
|
+
def remove_invisible_characters(text: str) -> str:
|
|
373
|
+
return "".join(character for character in text if character == "\n" or character.isprintable())
|
|
374
|
+
|
|
375
|
+
@staticmethod
|
|
376
|
+
@check_arguments
|
|
377
|
+
def remove_invisible_characters_from_file(file: str, encoding: str = "utf-8") -> None:
|
|
378
|
+
text = GeneralUtilities.read_text_from_file(file, encoding)
|
|
379
|
+
text = GeneralUtilities.remove_invisible_characters(text)
|
|
380
|
+
GeneralUtilities.write_text_to_file(file, text, encoding)
|
|
381
|
+
|
|
370
382
|
@staticmethod
|
|
371
383
|
@check_arguments
|
|
372
384
|
def print_text(text: str, print_to_stdout: bool = True):
|
|
@@ -699,12 +699,12 @@ class TFCPS_Tools_General:
|
|
|
699
699
|
self.__generate_svg_files_from_plantuml(target_folder, plantuml_jar_file, java_executable)
|
|
700
700
|
|
|
701
701
|
@GeneralUtilities.check_arguments
|
|
702
|
-
def ensure_plantuml_is_available(self, enforce_update: bool,
|
|
702
|
+
def ensure_plantuml_is_available(self, enforce_update: bool, program_version: str) -> str:
|
|
703
703
|
"""Ensures the plantuml.jar for the given version is available in the global cache and returns its absolute path.
|
|
704
704
|
The jar is stored under a version-specific subfolder ('<cache>/Tools/PlantUML/<version>/plantuml.jar') so that
|
|
705
705
|
different versions coexist without evicting each other. The version must be given explicitly (there is no default);
|
|
706
706
|
callers resolve it via get_plantuml_version (the repository-pin or the bundled default)."""
|
|
707
|
-
local_resource_name = os.path.join("PlantUML",
|
|
707
|
+
local_resource_name = os.path.join("PlantUML", program_version)
|
|
708
708
|
return self.ensure_file_from_github_assets_is_available_with_retry("plantuml", "plantuml", local_resource_name, "plantuml.jar", lambda latest_version: "plantuml.jar", enforce_update=enforce_update, pinned_version=version)
|
|
709
709
|
|
|
710
710
|
@GeneralUtilities.check_arguments
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptcollection
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.52
|
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
5
|
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
ScriptCollection/AnionBuildPlatform.py,sha256=GP-jnb1GbvT8jzlH-cqnxgOzBzeUdiaWnDXtKNjsxiA,12153
|
|
2
2
|
ScriptCollection/CertificateUpdater.py,sha256=dR5JpJDlZdjD4_pgMz7zCrt1IM7VfatmK6pULSczxQw,9693
|
|
3
|
-
ScriptCollection/Executables.py,sha256=
|
|
4
|
-
ScriptCollection/GeneralUtilities.py,sha256=
|
|
3
|
+
ScriptCollection/Executables.py,sha256=x91j_zkKezLekL7i7eiR_KNbV4N5HdltlhanwNXP5AI,67593
|
|
4
|
+
ScriptCollection/GeneralUtilities.py,sha256=SBP37EyUcU0_x0-XV5zlwi557AlZssU1QXrKIhkdTIs,72145
|
|
5
5
|
ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
|
|
6
6
|
ScriptCollection/ProcessesRunner.py,sha256=yYaC95h40uszuZPggn2kK3qXIN2ZjGMCavo-NQ53ElQ,1537
|
|
7
7
|
ScriptCollection/ProgramRunnerBase.py,sha256=eZenpiIFW1dhvSVCG7cfBs5hO4_KLlOxR7oXoSxUDmk,2286
|
|
@@ -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=
|
|
12
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=7ai85wX0vy-5dNatdWuTqv73pX_ushoiuK7qVTiAGUo,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
|
|
@@ -43,7 +43,7 @@ ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=zp7n0Li7GTi4tERDMgDcJ-o3m6131
|
|
|
43
43
|
ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=jQ0B3yq45we-8a0KuNFMfXCk9MfzPpTv2QgDWMN34x4,22792
|
|
44
44
|
ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py,sha256=JYiDqDsfVJQWS9xWMi_UzfXnXsJRnPRxAzFr82bUEvI,2370
|
|
45
45
|
ScriptCollection/TFCPS/TFCPS_RemoteBuild.py,sha256=Z8Gw-j5I7VPafHEsVeQJ2gTTKVLAnnhwZhY8IVTi2Qk,11867
|
|
46
|
-
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=
|
|
46
|
+
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=IgIXtzzztfEQEhsnxsMPC-bO_8iTJTvudPyJ1Ab5a8k,133188
|
|
47
47
|
ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
48
|
ScriptCollection/TFCPS/Docker/TFCPS_CodeUnitSpecific_Docker.py,sha256=wS2yzYUmJ4m0cf6cBYVTHsiXSXfYhHoLFFy8x6yEQvY,19573
|
|
49
49
|
ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -64,8 +64,8 @@ ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=Bd1gxCk9Fb
|
|
|
64
64
|
ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
65
65
|
ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
|
|
66
66
|
ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
67
|
-
scriptcollection-4.3.
|
|
68
|
-
scriptcollection-4.3.
|
|
69
|
-
scriptcollection-4.3.
|
|
70
|
-
scriptcollection-4.3.
|
|
71
|
-
scriptcollection-4.3.
|
|
67
|
+
scriptcollection-4.3.52.dist-info/METADATA,sha256=f8cQEajZpjsRigZvvJv_RWVdIGHsK5kI9efGqJgNlBY,7648
|
|
68
|
+
scriptcollection-4.3.52.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
69
|
+
scriptcollection-4.3.52.dist-info/entry_points.txt,sha256=SCaysPSowWjcCsPpNgVQIKYfo1I5BMiVI39LTWl4qDI,5915
|
|
70
|
+
scriptcollection-4.3.52.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
71
|
+
scriptcollection-4.3.52.dist-info/RECORD,,
|
|
@@ -60,6 +60,7 @@ screclaimspacefromdocker = ScriptCollection.Executables:ReclaimSpaceFromDocker
|
|
|
60
60
|
scregexreplaceinfile = ScriptCollection.Executables:RegexReplaceInFile
|
|
61
61
|
scremovefile = ScriptCollection.Executables:RemoveFile
|
|
62
62
|
scremovefolder = ScriptCollection.Executables:RemoveFolder
|
|
63
|
+
scremoveinvisiblecharactersfromfile = ScriptCollection.Executables:RemoveInvisibleCharactersFromFile
|
|
63
64
|
scremovetrailinglinebreak = ScriptCollection.Executables:RemoveTrailingLinebreak
|
|
64
65
|
screname = ScriptCollection.Executables:Rename
|
|
65
66
|
screplacesubstringsinfilenames = ScriptCollection.Executables:ReplaceSubstringsInFilenames
|
|
File without changes
|
|
File without changes
|