ScriptCollection 4.2.73__py3-none-any.whl → 4.2.75__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/ScriptCollectionCore.py +14 -4
- {scriptcollection-4.2.73.dist-info → scriptcollection-4.2.75.dist-info}/METADATA +1 -1
- {scriptcollection-4.2.73.dist-info → scriptcollection-4.2.75.dist-info}/RECORD +6 -6
- {scriptcollection-4.2.73.dist-info → scriptcollection-4.2.75.dist-info}/WHEEL +0 -0
- {scriptcollection-4.2.73.dist-info → scriptcollection-4.2.75.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.2.73.dist-info → scriptcollection-4.2.75.dist-info}/top_level.txt +0 -0
|
@@ -37,7 +37,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
37
37
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
38
38
|
from .SCLog import SCLog, LogLevel
|
|
39
39
|
|
|
40
|
-
version = "4.2.
|
|
40
|
+
version = "4.2.75"
|
|
41
41
|
__version__ = version
|
|
42
42
|
|
|
43
43
|
class VSCodeWorkspaceShellTask:
|
|
@@ -650,12 +650,14 @@ class ScriptCollectionCore:
|
|
|
650
650
|
# TODO check if this will also be done for submodules
|
|
651
651
|
|
|
652
652
|
@GeneralUtilities.check_arguments
|
|
653
|
-
def git_commit(self, directory: str, message: str = "Saved changes.", author_name: str = None, author_email: str = None, stage_all_changes: bool = True, no_changes_behavior: int = 0) -> str:
|
|
653
|
+
def git_commit(self, directory: str, message: str = "Saved changes.", author_name: str = None, author_email: str = None, stage_all_changes: bool = True, no_changes_behavior: int = 0,commit_message_body:str=None) -> str:
|
|
654
654
|
"""no_changes_behavior=0 => No commit; no_changes_behavior=1 => Commit anyway; no_changes_behavior=2 => Exception"""
|
|
655
655
|
self.assert_is_git_repository(directory)
|
|
656
656
|
author_name = GeneralUtilities.str_none_safe(author_name).strip()
|
|
657
657
|
author_email = GeneralUtilities.str_none_safe(author_email).strip()
|
|
658
658
|
argument = ['commit', '--quiet', '--allow-empty', '--message', message]
|
|
659
|
+
if commit_message_body is not None:
|
|
660
|
+
argument.extend(['--message', commit_message_body])
|
|
659
661
|
if (GeneralUtilities.string_has_content(author_name)):
|
|
660
662
|
argument.append(f'--author="{author_name} <{author_email}>"')
|
|
661
663
|
git_repository_has_uncommitted_changes = self.git_repository_has_uncommitted_changes(directory)
|
|
@@ -2751,6 +2753,10 @@ OCR-content:
|
|
|
2751
2753
|
"jpeg": "image/jpeg",
|
|
2752
2754
|
"txt": "text/plain",
|
|
2753
2755
|
"json": "application/json",
|
|
2756
|
+
"doc": "application/msword",
|
|
2757
|
+
"docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
2758
|
+
"xls": "application/vnd.ms-excel",
|
|
2759
|
+
"xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
2754
2760
|
}
|
|
2755
2761
|
if serviceaddress is None:
|
|
2756
2762
|
server_url_file:str= GeneralUtilities.normalize_path(f"{str(Path.home())}/.ScriptCollection/OCR/ServiceURL.txt")
|
|
@@ -2769,9 +2775,13 @@ OCR-content:
|
|
|
2769
2775
|
files_to_analyse = {
|
|
2770
2776
|
"fileContent": (os.path.basename(file), f, mime_type)
|
|
2771
2777
|
}
|
|
2772
|
-
r = requests.put(service_url, timeout=
|
|
2778
|
+
r = requests.put(service_url, timeout=3600, headers=headers, files=files_to_analyse,verify=True)
|
|
2773
2779
|
if r.status_code != 200:
|
|
2774
|
-
|
|
2780
|
+
if r.status_code == 400:
|
|
2781
|
+
return f"Could not calculate ocr-content for file \"{file}\". File may be broken."
|
|
2782
|
+
else:
|
|
2783
|
+
raise ValueError(f"Retrieving ocr-content for file \"{file}\" resulted in HTTP-response-code {r.status_code}.")
|
|
2784
|
+
|
|
2775
2785
|
result = GeneralUtilities.bytes_to_string(r.content)
|
|
2776
2786
|
return result
|
|
2777
2787
|
|
|
@@ -9,7 +9,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
|
|
|
9
9
|
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
|
10
10
|
ScriptCollection/ProgramRunnerSudo.py,sha256=_khC3xuTdrPoLluBJZWfldltmmuKltABJPcbjZSFW-4,4835
|
|
11
11
|
ScriptCollection/SCLog.py,sha256=8TRy1LeYMsPOIuWUcnUNNbO5pd-cNBS-3cn-kdzP8FU,4768
|
|
12
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
12
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=zymaRBLpPzYa3RJpmT5_VM4sMgtHwMftUjTrI62AbfI,182101
|
|
13
13
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=83qDMILwxhH9DbC0sb358Vu8PXEysmJJyap_6gECZqs,1627
|
|
15
15
|
ScriptCollection/OCIImages/OCIImageManager.py,sha256=aBogkSXNDyi8NO11N-s03nuFJEv7PyJ-wjHuYYeZfvs,6662
|
|
@@ -47,8 +47,8 @@ ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=GQLE6FeR-X
|
|
|
47
47
|
ScriptCollection/TFCPS/NodeJS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
48
|
ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=9XK7XnbeOnq_4siVoWovogStoKFiZLhGh3C_f2YaznI,13621
|
|
49
49
|
ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
|
-
scriptcollection-4.2.
|
|
51
|
-
scriptcollection-4.2.
|
|
52
|
-
scriptcollection-4.2.
|
|
53
|
-
scriptcollection-4.2.
|
|
54
|
-
scriptcollection-4.2.
|
|
50
|
+
scriptcollection-4.2.75.dist-info/METADATA,sha256=uAmn_kWmbQn8rdmRBj3VatLg0j8LNhwY62kOrS-i7nQ,7691
|
|
51
|
+
scriptcollection-4.2.75.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
52
|
+
scriptcollection-4.2.75.dist-info/entry_points.txt,sha256=27XwAJEcaMEc1be0Ec1vKHCbiU4Ziu8jKL-SqsrYOIQ,4680
|
|
53
|
+
scriptcollection-4.2.75.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
54
|
+
scriptcollection-4.2.75.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|