pyxecm 1.3.0__py3-none-any.whl → 1.5__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.
Potentially problematic release.
This version of pyxecm might be problematic. Click here for more details.
- pyxecm/__init__.py +3 -0
- pyxecm/coreshare.py +2636 -0
- pyxecm/customizer/__init__.py +6 -0
- pyxecm/customizer/browser_automation.py +231 -56
- pyxecm/customizer/customizer.py +466 -235
- pyxecm/customizer/k8s.py +49 -27
- pyxecm/customizer/m365.py +1183 -263
- pyxecm/customizer/payload.py +13854 -5368
- pyxecm/customizer/pht.py +503 -0
- pyxecm/customizer/salesforce.py +1782 -0
- pyxecm/customizer/sap.py +5 -5
- pyxecm/customizer/servicenow.py +1221 -0
- pyxecm/customizer/successfactors.py +1056 -0
- pyxecm/customizer/translate.py +2 -2
- pyxecm/helper/__init__.py +2 -0
- pyxecm/helper/assoc.py +27 -7
- pyxecm/helper/data.py +1527 -0
- pyxecm/helper/web.py +189 -25
- pyxecm/helper/xml.py +244 -40
- pyxecm/otac.py +311 -25
- pyxecm/otcs.py +3866 -1103
- pyxecm/otds.py +397 -150
- pyxecm/otiv.py +1 -1
- pyxecm/otmm.py +808 -0
- pyxecm/otpd.py +17 -12
- {pyxecm-1.3.0.dist-info → pyxecm-1.5.dist-info}/METADATA +4 -1
- pyxecm-1.5.dist-info/RECORD +30 -0
- {pyxecm-1.3.0.dist-info → pyxecm-1.5.dist-info}/WHEEL +1 -1
- pyxecm-1.3.0.dist-info/RECORD +0 -23
- {pyxecm-1.3.0.dist-info → pyxecm-1.5.dist-info}/LICENSE +0 -0
- {pyxecm-1.3.0.dist-info → pyxecm-1.5.dist-info}/top_level.txt +0 -0
pyxecm/customizer/translate.py
CHANGED
|
@@ -12,7 +12,7 @@ translateV3: Translate a string from one language to another using the Google Tr
|
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
14
|
__author__ = "Dr. Marc Diefenbruch"
|
|
15
|
-
__copyright__ = "Copyright
|
|
15
|
+
__copyright__ = "Copyright 2024, OpenText"
|
|
16
16
|
__credits__ = ["Kai-Philip Gatzweiler"]
|
|
17
17
|
__maintainer__ = "Dr. Marc Diefenbruch"
|
|
18
18
|
__email__ = "mdiefenb@opentext.com"
|
|
@@ -25,7 +25,7 @@ logger = logging.getLogger("pyxecm.customizer.translate")
|
|
|
25
25
|
|
|
26
26
|
class Translator:
|
|
27
27
|
"""Class for translation of of strings based on the Google Translate API.
|
|
28
|
-
|
|
28
|
+
The class supports V2 and V3 translation APIs
|
|
29
29
|
"""
|
|
30
30
|
|
|
31
31
|
_config = None
|
pyxecm/helper/__init__.py
CHANGED
pyxecm/helper/assoc.py
CHANGED
|
@@ -12,7 +12,7 @@ dictToString: converting an Assoc dict to an Assoc string
|
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
14
|
__author__ = "Dr. Marc Diefenbruch"
|
|
15
|
-
__copyright__ = "Copyright
|
|
15
|
+
__copyright__ = "Copyright 2024, OpenText"
|
|
16
16
|
__credits__ = ["Kai-Philip Gatzweiler"]
|
|
17
17
|
__maintainer__ = "Dr. Marc Diefenbruch"
|
|
18
18
|
__email__ = "mdiefenb@opentext.com"
|
|
@@ -22,8 +22,7 @@ import html
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
class Assoc:
|
|
25
|
-
"""Class to handle Extended ECM Assoc data structures.
|
|
26
|
-
"""
|
|
25
|
+
"""Class to handle Extended ECM Assoc data structures."""
|
|
27
26
|
|
|
28
27
|
@classmethod
|
|
29
28
|
def is_unicode_escaped(cls, assoc_string: str) -> bool:
|
|
@@ -41,7 +40,6 @@ class Assoc:
|
|
|
41
40
|
|
|
42
41
|
return len(matches) > 0
|
|
43
42
|
|
|
44
|
-
|
|
45
43
|
@classmethod
|
|
46
44
|
def escape_unicode(cls, assoc_string: str) -> str:
|
|
47
45
|
"""Escape / Encode a given string in Unicode
|
|
@@ -53,11 +51,10 @@ class Assoc:
|
|
|
53
51
|
str: Escaped string
|
|
54
52
|
"""
|
|
55
53
|
|
|
56
|
-
encoded_string = assoc_string.encode(
|
|
54
|
+
encoded_string = assoc_string.encode("unicode_escape") # .decode()
|
|
57
55
|
|
|
58
56
|
return encoded_string
|
|
59
57
|
|
|
60
|
-
|
|
61
58
|
@classmethod
|
|
62
59
|
def unescape_unicode(cls, assoc_string: str) -> str:
|
|
63
60
|
"""Unescape / Decode a given string
|
|
@@ -168,7 +165,19 @@ class Assoc:
|
|
|
168
165
|
@classmethod
|
|
169
166
|
def extract_substring(
|
|
170
167
|
cls, input_string: str, start_sequence: str, stop_sequence: str
|
|
171
|
-
):
|
|
168
|
+
) -> str | None:
|
|
169
|
+
"""A generic method to extract a substring that is delimited
|
|
170
|
+
by a strart and stop sequence.
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
input_string (str): Input string to search the delimited substring in.
|
|
174
|
+
start_sequence (str): Start esequence of characters.
|
|
175
|
+
stop_sequence (str): Stopß sequence of characters
|
|
176
|
+
|
|
177
|
+
Returns:
|
|
178
|
+
str | None: the deliminated substring or None if not found.
|
|
179
|
+
"""
|
|
180
|
+
|
|
172
181
|
start_index = input_string.find(start_sequence)
|
|
173
182
|
if start_index == -1:
|
|
174
183
|
return None
|
|
@@ -182,6 +191,17 @@ class Assoc:
|
|
|
182
191
|
|
|
183
192
|
@classmethod
|
|
184
193
|
def extract_assoc_string(cls, input_string: str, is_escaped: bool = False) -> str:
|
|
194
|
+
"""Extract an Assoc from a string. The assoc is deliminated by A< ... >.
|
|
195
|
+
|
|
196
|
+
Args:
|
|
197
|
+
input_string (str): Input string that includes the Assoc as a substring.
|
|
198
|
+
is_escaped (bool, optional): Whether or not the input string includes the
|
|
199
|
+
assoc escaped or not.
|
|
200
|
+
|
|
201
|
+
Returns:
|
|
202
|
+
str: the assoc string
|
|
203
|
+
"""
|
|
204
|
+
|
|
185
205
|
if is_escaped:
|
|
186
206
|
assoc_string = cls.extract_substring(input_string, "A<", ">")
|
|
187
207
|
else:
|