ScriptCollection 4.3.51__py3-none-any.whl → 4.3.53__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.
@@ -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("-c",'--nocache', required=False, default=False, action='store_true')
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):
@@ -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.51"
42
+ version = "4.3.53"
43
43
  __version__ = version
44
44
 
45
45
  class VSCodeWorkspaceShellTask:
@@ -1,72 +1,72 @@
1
- import os
2
- from lxml import etree
3
- from ...GeneralUtilities import GeneralUtilities
4
- from ...ScriptCollectionCore import ScriptCollectionCore
5
- from ...SCLog import LogLevel
6
- from ..TFCPS_CodeUnitSpecific_Base import TFCPS_CodeUnitSpecific_Base,TFCPS_CodeUnitSpecific_Base_CLI
7
-
8
- class TFCPS_CodeUnitSpecific_Go_Functions(TFCPS_CodeUnitSpecific_Base):
9
-
10
- def __init__(self,current_file:str,verbosity:LogLevel,targetenvironmenttype:str,use_cache:bool,is_pre_merge:bool):
11
- super().__init__(current_file, verbosity,targetenvironmenttype,use_cache,is_pre_merge)
12
-
13
- @GeneralUtilities.check_arguments
14
- def build(self) -> None:
15
- #TODO
16
- self.__generate_sbom_for_go_image()
17
-
18
- @GeneralUtilities.check_arguments
19
- def __generate_sbom_for_go_image(self) -> None:
20
- pass#TODO
21
-
22
- @GeneralUtilities.check_arguments
23
- def linting(self) -> None:
24
- pass#TODO
25
-
26
- @GeneralUtilities.check_arguments
27
- def __update_coverage_file(self,coverage_file:str) -> None:
28
- tree = etree.parse(coverage_file)
29
- root = tree.getroot()
30
- for package in root.findall(".//package"):
31
- package.set("name",self.get_codeunit_name())
32
- for cls in root.findall(".//class"):
33
- filename = cls.get("filename")
34
- if filename:
35
- cls.set("filename", f"./{filename}")
36
- cls.set("name",str(filename).rsplit("/", 1)[-1])
37
- tree.write(coverage_file, encoding="utf-8", xml_declaration=True, pretty_print=True)
38
-
39
- @GeneralUtilities.check_arguments
40
- def run_testcases(self) -> None:
41
- test_coverage_folder = os.path.join(self.get_codeunit_folder(), "Other", "Artifacts", "TestCoverage").replace("\\", "/")
42
- GeneralUtilities.ensure_directory_exists(test_coverage_folder)
43
- src_folder = GeneralUtilities.resolve_relative_path(self.get_codeunit_name(), self.get_codeunit_folder())
44
- sc: ScriptCollectionCore = ScriptCollectionCore()
45
- sc.run_program_argsasarray("go", ["install", "github.com/t-yuki/gocover-cobertura@latest"], src_folder)
46
- sc.run_program_argsasarray("go", ["test", "-coverprofile=coverage.out", "./..."], src_folder)
47
- coverage_file:str=f"{test_coverage_folder}/TestCoverage.xml"
48
- sc.run_program_argsasarray("sh", ["-c", f"gocover-cobertura < coverage.out > {coverage_file}"], src_folder)
49
- self.__update_coverage_file(coverage_file)
50
- self.run_testcases_common_post_task(self.get_repository_folder(),self.get_codeunit_name(),True,self.get_type_environment_type())
51
-
52
- def get_dependencies(self)->dict[str,set[str]]:
53
- return dict[str,set[str]]()#TODO
54
-
55
- @GeneralUtilities.check_arguments
56
- def get_available_versions(self,dependencyname:str)->list[str]:
57
- return []#TODO
58
-
59
- @GeneralUtilities.check_arguments
60
- def set_dependency_version(self,name:str,new_version:str)->None:
61
- raise ValueError(f"Operation is not implemented.")
62
-
63
- class TFCPS_CodeUnitSpecific_Go_CLI:
64
-
65
- @staticmethod
66
- @GeneralUtilities.check_arguments
67
- def parse(file:str)->TFCPS_CodeUnitSpecific_Go_Functions:
68
- parser=TFCPS_CodeUnitSpecific_Base_CLI.get_base_parser()
69
- #add custom parameter if desired
70
- args=parser.parse_args()
71
- result:TFCPS_CodeUnitSpecific_Go_Functions=TFCPS_CodeUnitSpecific_Go_Functions(file,LogLevel(int(args.verbosity)),args.targetenvironmenttype,not args.nocache,args.ispremerge)
72
- return result
1
+ import os
2
+ from lxml import etree
3
+ from ...GeneralUtilities import GeneralUtilities
4
+ from ...ScriptCollectionCore import ScriptCollectionCore
5
+ from ...SCLog import LogLevel
6
+ from ..TFCPS_CodeUnitSpecific_Base import TFCPS_CodeUnitSpecific_Base,TFCPS_CodeUnitSpecific_Base_CLI
7
+
8
+ class TFCPS_CodeUnitSpecific_Go_Functions(TFCPS_CodeUnitSpecific_Base):
9
+
10
+ def __init__(self,current_file:str,verbosity:LogLevel,targetenvironmenttype:str,use_cache:bool,is_pre_merge:bool):
11
+ super().__init__(current_file, verbosity,targetenvironmenttype,use_cache,is_pre_merge)
12
+
13
+ @GeneralUtilities.check_arguments
14
+ def build(self) -> None:
15
+ #TODO
16
+ self.__generate_sbom_for_go_image()
17
+
18
+ @GeneralUtilities.check_arguments
19
+ def __generate_sbom_for_go_image(self) -> None:
20
+ pass#TODO
21
+
22
+ @GeneralUtilities.check_arguments
23
+ def linting(self) -> None:
24
+ pass#TODO
25
+
26
+ @GeneralUtilities.check_arguments
27
+ def __update_coverage_file(self,coverage_file:str) -> None:
28
+ tree = etree.parse(coverage_file)
29
+ root = tree.getroot()
30
+ for package in root.findall(".//package"):
31
+ package.set("name",self.get_codeunit_name())
32
+ for cls in root.findall(".//class"):
33
+ filename = cls.get("filename")
34
+ if filename:
35
+ cls.set("filename", f"./{filename}")
36
+ cls.set("name",str(filename).rsplit("/", 1)[-1])
37
+ tree.write(coverage_file, encoding="utf-8", xml_declaration=True, pretty_print=True)
38
+
39
+ @GeneralUtilities.check_arguments
40
+ def run_testcases(self) -> None:
41
+ test_coverage_folder = os.path.join(self.get_codeunit_folder(), "Other", "Artifacts", "TestCoverage").replace("\\", "/")
42
+ GeneralUtilities.ensure_directory_exists(test_coverage_folder)
43
+ src_folder = GeneralUtilities.resolve_relative_path(self.get_codeunit_name(), self.get_codeunit_folder())
44
+ sc: ScriptCollectionCore = ScriptCollectionCore()
45
+ sc.run_program_argsasarray("go", ["install", "github.com/t-yuki/gocover-cobertura@latest"], src_folder)
46
+ sc.run_program_argsasarray("go", ["test", "-coverprofile=coverage.out", "./..."], src_folder)
47
+ coverage_file:str=f"{test_coverage_folder}/TestCoverage.xml"
48
+ sc.run_program_argsasarray("sh", ["-c", f"gocover-cobertura < coverage.out > {coverage_file}"], src_folder)
49
+ self.__update_coverage_file(coverage_file)
50
+ self.run_testcases_common_post_task(self.get_repository_folder(),self.get_codeunit_name(),True,self.get_type_environment_type())
51
+
52
+ def get_dependencies(self)->dict[str,set[str]]:
53
+ return dict[str,set[str]]()#TODO
54
+
55
+ @GeneralUtilities.check_arguments
56
+ def get_available_versions(self,dependencyname:str)->list[str]:
57
+ return []#TODO
58
+
59
+ @GeneralUtilities.check_arguments
60
+ def set_dependency_version(self,name:str,new_version:str)->None:
61
+ raise ValueError(f"Operation is not implemented.")
62
+
63
+ class TFCPS_CodeUnitSpecific_Go_CLI:
64
+
65
+ @staticmethod
66
+ @GeneralUtilities.check_arguments
67
+ def parse(file:str)->TFCPS_CodeUnitSpecific_Go_Functions:
68
+ parser=TFCPS_CodeUnitSpecific_Base_CLI.get_base_parser()
69
+ #add custom parameter if desired
70
+ args=parser.parse_args()
71
+ result:TFCPS_CodeUnitSpecific_Go_Functions=TFCPS_CodeUnitSpecific_Go_Functions(file,LogLevel(int(args.verbosity)),args.targetenvironmenttype,not args.nocache,args.ispremerge)
72
+ return result
@@ -699,13 +699,13 @@ 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, version: str) -> str:
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", version)
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)
707
+ local_resource_name = os.path.join("PlantUML", program_version)
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=program_version)
709
709
 
710
710
  @GeneralUtilities.check_arguments
711
711
  def get_plantuml_version(self, repository_folder: str = None) -> str:
@@ -1,168 +1,168 @@
1
- Metadata-Version: 2.4
2
- Name: scriptcollection
3
- Version: 4.3.51
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.53
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,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=cSnyAwQq3c79hKrARAh0MO3SH61iTtxwjfr0cchECro,67063
4
- ScriptCollection/GeneralUtilities.py,sha256=5b6GB8Ixsa_qbmc3_RdZviO05Ak1B7hlnzU0SyE37bw,71603
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=g-VlCRX_x0JPVuvrgByWevy4-wxGPZxJEBy1AQo7OWc,248737
12
+ ScriptCollection/ScriptCollectionCore.py,sha256=BBszCzFt9dRNmA98sZaZmlf2JVpKHThs1bwGMTLamKE,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=JbOd40pj3XeIIFTL-B_k5zHlRm9R8QXW-nJgkl4dvhE,133172
46
+ ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=1lTI_K4pZcwfGy1xtAcp6pvd0cU7i9VUQxBUB_1n0v0,133196
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
@@ -54,7 +54,7 @@ ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=jPLgGKd0Vz
54
54
  ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
55
  ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=CwDBogG7Lg3IyywpCGta9gcaqWpgjENNXaupS19ZwTM,8751
56
56
  ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
- ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=2AEs28F9_MspXb4QABaSR3KxpU_uuTmrGQnVqF4b2ck,3425
57
+ ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=kyx26AnT1-LySFA46wfJ9yZUKYdMWTD0U2XZfSQbuB0,3497
58
58
  ScriptCollection/TFCPS/Go/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
59
  ScriptCollection/TFCPS/Maven/TFCPS_CodeUnitSpecific_Maven.py,sha256=WcWWtCV3GkAk53RIN_6rjXNvkKZ5i5hBEMCmPQo6j30,1685
60
60
  ScriptCollection/TFCPS/Maven/__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.51.dist-info/METADATA,sha256=PAsXAgWMHNGEJmyjovANZSnUGP_6sXtPxkKiaKRZJm8,7648
68
- scriptcollection-4.3.51.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
69
- scriptcollection-4.3.51.dist-info/entry_points.txt,sha256=xWOFHGufgef8jsKQ3c2pFBfM_hjweFXuxfKmghQs-VI,5814
70
- scriptcollection-4.3.51.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
71
- scriptcollection-4.3.51.dist-info/RECORD,,
67
+ scriptcollection-4.3.53.dist-info/METADATA,sha256=vi7WHaf_068WffrAeJqvGXnDJDoud8qSffEkEb4rvWw,7816
68
+ scriptcollection-4.3.53.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
69
+ scriptcollection-4.3.53.dist-info/entry_points.txt,sha256=SCaysPSowWjcCsPpNgVQIKYfo1I5BMiVI39LTWl4qDI,5915
70
+ scriptcollection-4.3.53.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
71
+ scriptcollection-4.3.53.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