ScriptCollection 4.3.59__py3-none-any.whl → 4.3.61__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.
@@ -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.59"
42
+ version = "4.3.61"
43
43
  __version__ = version
44
44
 
45
45
  class VSCodeWorkspaceShellTask:
@@ -3057,6 +3057,16 @@ TXDX
3057
3057
  def create_local_docker_network(self, network_name: str) -> None:
3058
3058
  self.run_program("docker", f"network create {network_name}")
3059
3059
 
3060
+ @GeneralUtilities.check_arguments
3061
+ def format_json_file(self, file: str, indentation: int = 2) -> None:
3062
+ """Reformats the given json-file with the given indentation. The order of the properties is kept
3063
+ because in json-files which are used as configuration the order is usually chosen intentionally."""
3064
+ encoding = "utf-8"
3065
+ content = json.loads(GeneralUtilities.read_text_from_file(file, encoding))
3066
+ formatted_content = json.dumps(content, indent=indentation, sort_keys=False, ensure_ascii=False)
3067
+ GeneralUtilities.write_text_to_file(file, formatted_content.rstrip("\n") + "\n", encoding)
3068
+ self.normalize_line_endings(file)
3069
+
3060
3070
  @GeneralUtilities.check_arguments
3061
3071
  def format_xml_file(self, file: str,add_xml_declaration:bool=True) -> None:
3062
3072
  encoding = "utf-8"
@@ -3691,6 +3701,34 @@ OCR-content:
3691
3701
  self.run_with_epew("vl2svg",argument,workingfolder,encode_argument_in_base64=True)
3692
3702
  #this uses vega-light. to use vega "vg2svg" should be used instead.
3693
3703
 
3704
+ @GeneralUtilities.check_arguments
3705
+ def add_tooltips_to_chart_diagram(self, svg_file: str) -> int:
3706
+ """Adds a title-element to each data-point of a chart-diagram which was generated by generate_chart_diagram
3707
+ and returns the amount of data-points which were processed. Svg-viewers which support user-interaction (for
3708
+ example browsers) show the content of a title-element as tooltip while the mouse hovers over the according
3709
+ element. This is required because the tooltips which are defined in a vega-lite-specification are only
3710
+ available when the diagram is rendered by the vega-runtime inside a website, while the generated svg-file
3711
+ is static and does not contain that runtime. The content of the tooltip is the accessibility-label which
3712
+ vega already generates for the data-point and which contains the values of all encoded fields.
3713
+ Only data-points of symbol-marks are processed; for other mark-types (for example bars) the according
3714
+ role-description would have to be added."""
3715
+ encoding = "utf-8"
3716
+ svg_namespace = "http://www.w3.org/2000/svg"
3717
+ root = ET.XML(GeneralUtilities.read_text_from_file(svg_file, encoding))
3718
+ result = 0
3719
+ for element in root.iter():
3720
+ if element.get("aria-roledescription") != "point":
3721
+ continue
3722
+ label = element.get("aria-label")
3723
+ if label is None:
3724
+ continue
3725
+ title = ET.Element(f"{{{svg_namespace}}}title")
3726
+ title.text = label
3727
+ element.insert(0, title)#the title-element must be the first child-element of the element it describes
3728
+ result = result+1
3729
+ GeneralUtilities.write_text_to_file(svg_file, ET.tostring(root, encoding="unicode"), encoding)
3730
+ return result
3731
+
3694
3732
  @GeneralUtilities.check_arguments
3695
3733
  def inspect_container(self, container_name: str) :
3696
3734
  program_result = self.run_program(
@@ -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
@@ -232,7 +232,13 @@ class TFCPS_CodeUnit_BuildCodeUnits:
232
232
  @GeneralUtilities.check_arguments
233
233
  def __normalize_line_endings_of_common_files(self) -> None:
234
234
  #TODO add option to define exceptions (means: files which should not be normalized).
235
- self.sc.normalize_line_endings_of_files_in_folder(self.repository, ["txt", "md", "json", "xml", "csv", "yml", "yaml", "gitignore"])
235
+ self.sc.format_xml_file(os.path.join(self.repository, ".ScriptCollection", "ProductInformation.xml"))
236
+ for codeunit in self.tfcps_tools_general.get_codeunits(self.repository):
237
+ self.sc.format_xml_file(os.path.join(self.repository, codeunit, f"{codeunit}.codeunit.xml"))
238
+ workspace_file = os.path.join(self.repository, f"{self.tfcps_tools_general.get_product_name(self.repository)}.code-workspace")
239
+ if os.path.isfile(workspace_file):
240
+ self.sc.format_json_file(workspace_file)
241
+ self.sc.normalize_line_endings_of_files_in_folder(self.repository, ["txt", "md", "json", "xml", "csv", "yml", "yaml", "toml","gitignore", "gitattributes", "code-workspace"])
236
242
 
237
243
  @GeneralUtilities.check_arguments
238
244
  def is_working_branch(self)->bool:
@@ -456,25 +462,28 @@ class TFCPS_CodeUnit_BuildCodeUnits:
456
462
  "x": {
457
463
  "field": "Timestamp",
458
464
  "type": "temporal",
459
- "title": "Date"
465
+ "title": "Date",
466
+ "scale": {
467
+ "type": "utc"#render the ticks in utc so the diagram looks the same independent of the timezone of the machine which builds it
468
+ },
469
+ "axis": {
470
+ "format": "%Y-%m-%d %H:%M:%S (UTC)",#everything which is not a format-specifier starting with a percent-sign is taken literally
471
+ "labelAngle": -45,#the timestamps are too long to be displayed horizontally next to each other
472
+ "labelLimit": 250,#without this the labels would be truncated with an ellipsis because they are longer than the default-limit of 180 pixels
473
+ "tickCount": 8
474
+ }
460
475
  },
461
476
  "y": {
462
477
  "field": "LinesOfCode",
463
478
  "type": "quantitative",
464
479
  "title": "Lines of Code"
465
480
  },
481
+ #the timestamp and the lines of code are not listed here although they are part of the tooltip: the fields which are encoded
482
+ #as x respectively as y are always part of the generated tooltip anyway, so listing them again would show them twice.
466
483
  "tooltip": [
467
484
  {
468
485
  "field": "Version",
469
486
  "type": "ordinal"
470
- },
471
- {
472
- "field": "LinesOfCode",
473
- "type": "quantitative"
474
- },
475
- {
476
- "field": "Timestamp",
477
- "type": "temporal"
478
487
  }
479
488
  ]
480
489
  }
@@ -492,6 +501,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
492
501
  GeneralUtilities.ensure_file_exists(diagram_svg_file)
493
502
  GeneralUtilities.assert_condition(not self.sc.file_is_git_ignored(f"Other/Reference/Technical/Diagrams/{filenamebase}.svg",self.repository),f"Other/Reference/Technical/Diagrams/{filenamebase}.svg must not be git-ignored")#because it should be referencable in markdown-files and viewable without building the codeunits.
494
503
  self.sc.generate_chart_diagram(diagram_definition_file,os.path.basename(diagram_svg_file))
504
+ self.sc.add_tooltips_to_chart_diagram(diagram_svg_file)#so the exact values of a data-point are visible when the svg-file is opened directly in a browser
495
505
  self.sc.format_xml_file(diagram_svg_file)
496
506
 
497
507
  @GeneralUtilities.check_arguments
@@ -1,168 +1,168 @@
1
- Metadata-Version: 2.4
2
- Name: scriptcollection
3
- Version: 4.3.59
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.61
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.
@@ -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=20KVQyOQ9zIs5Sc0qiNSV2_jyNmC6rod6VzD-Vsv2VU,247435
12
+ ScriptCollection/ScriptCollectionCore.py,sha256=-2uuSZc2m-gPq5FkDC13aHIaaRAVtmsijobxd0onhaQ,249975
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
@@ -38,7 +38,7 @@ ScriptCollection/TFCPS/SCTaskRunnerServer.py,sha256=rpuwSsQ6YQfZS2LGnvOH5ql8zs_-
38
38
  ScriptCollection/TFCPS/TFCPS_BuildCodeUnitsHook.py,sha256=67_DQwoH5bhxxSmwtuAeoW1NOCMiLMzOy48OqlJX-KY,1744
39
39
  ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=N-Wvxzwv_R8EVybjQjE7wXX-VpFLa_62LinWa57C_Wo,35345
40
40
  ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=Ll5EOkpVpPiFrM2mLeQXolaF7075IwgtnHXvfdpkH4k,9904
41
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=TdyhK4KVMliYRs_kSCaKUfX6iOqYlj0uaiYbdwR0G5E,44683
41
+ ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=9vnbC8Ag_anvOb6MZpbcMPg0MF04dWLIgheQ1YMEf7M,46133
42
42
  ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=X2NgZgbOkJsdZ6wMHB_RuS_rQCuz5oQCqzYrxyXBN9Q,6680
43
43
  ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=5vCFfDiU8bvfcnoKNs2ATS8nsl6mYXcIuX7XfYE0tvg,2116
44
44
  ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=zp7n0Li7GTi4tERDMgDcJ-o3m6131m31zvkat0lALEc,7781
@@ -57,7 +57,7 @@ ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=oIJooRrhr3
57
57
  ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=CwDBogG7Lg3IyywpCGta9gcaqWpgjENNXaupS19ZwTM,8751
59
59
  ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
- ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=kyx26AnT1-LySFA46wfJ9yZUKYdMWTD0U2XZfSQbuB0,3497
60
+ ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=2AEs28F9_MspXb4QABaSR3KxpU_uuTmrGQnVqF4b2ck,3425
61
61
  ScriptCollection/TFCPS/Go/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  ScriptCollection/TFCPS/Maven/TFCPS_CodeUnitSpecific_Maven.py,sha256=WcWWtCV3GkAk53RIN_6rjXNvkKZ5i5hBEMCmPQo6j30,1685
63
63
  ScriptCollection/TFCPS/Maven/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -67,8 +67,8 @@ ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=Bd1gxCk9Fb
67
67
  ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
68
  ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
69
69
  ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
- scriptcollection-4.3.59.dist-info/METADATA,sha256=FcziUeHuhB5POdCQsGqiXgj_LJMPQVziN4-R29xukmg,7816
71
- scriptcollection-4.3.59.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
72
- scriptcollection-4.3.59.dist-info/entry_points.txt,sha256=52v0Kt6uaeQeDFjvc0Xcsd4YqQw2qKcs6GNgPO71pkU,5996
73
- scriptcollection-4.3.59.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
74
- scriptcollection-4.3.59.dist-info/RECORD,,
70
+ scriptcollection-4.3.61.dist-info/METADATA,sha256=Ju2RPrINNdI_xckarsrawCQVjV7GC2SNPA8FbkARC0o,7648
71
+ scriptcollection-4.3.61.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
72
+ scriptcollection-4.3.61.dist-info/entry_points.txt,sha256=52v0Kt6uaeQeDFjvc0Xcsd4YqQw2qKcs6GNgPO71pkU,5996
73
+ scriptcollection-4.3.61.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
74
+ scriptcollection-4.3.61.dist-info/RECORD,,