atomicshop 2.18.34__py3-none-any.whl → 2.19.0__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 atomicshop might be problematic. Click here for more details.
- atomicshop/__init__.py +1 -1
- atomicshop/a_installs/win/robocorp.py +52 -0
- atomicshop/mitm/config_static.py +0 -6
- atomicshop/mitm/mitm_main.py +4 -4
- atomicshop/wrappers/githubw.py +15 -4
- {atomicshop-2.18.34.dist-info → atomicshop-2.19.0.dist-info}/METADATA +1 -1
- {atomicshop-2.18.34.dist-info → atomicshop-2.19.0.dist-info}/RECORD +10 -9
- {atomicshop-2.18.34.dist-info → atomicshop-2.19.0.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.18.34.dist-info → atomicshop-2.19.0.dist-info}/WHEEL +0 -0
- {atomicshop-2.18.34.dist-info → atomicshop-2.19.0.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import subprocess
|
|
3
|
+
import tempfile
|
|
4
|
+
|
|
5
|
+
from atomicshop.print_api import print_api
|
|
6
|
+
from atomicshop.wrappers import githubw
|
|
7
|
+
from atomicshop.permissions import permissions
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
WINDOWS_TESSERACT_DEFAULT_INSTALLATION_DIRECTORY: str = r"C:\Program Files\Tesseract-OCR"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main():
|
|
14
|
+
if not permissions.is_admin():
|
|
15
|
+
print_api("Please run this script as an Administrator.", color="red")
|
|
16
|
+
return 1
|
|
17
|
+
"""
|
|
18
|
+
print_api("PIP Installing Robocorp.")
|
|
19
|
+
subprocess.check_call(["pip", "install", "--upgrade", "rpaframework"])
|
|
20
|
+
|
|
21
|
+
print_api("PIP Installing Robocorp-Browser.")
|
|
22
|
+
subprocess.check_call(["pip", "install", "--upgrade", "robotframework-browser"])
|
|
23
|
+
|
|
24
|
+
print_api("PIP Installing Robocorp-Recognition.")
|
|
25
|
+
subprocess.check_call(["pip", "install", "--upgrade", "rpaframework-recognition"])
|
|
26
|
+
|
|
27
|
+
print_api("Installing Playwright browsers.")
|
|
28
|
+
subprocess.check_call(["playwright", "install"])
|
|
29
|
+
|
|
30
|
+
print_api("Initializing Robocorp Browser.")
|
|
31
|
+
subprocess.check_call(["rfbrowser", "init"])
|
|
32
|
+
|
|
33
|
+
print_api("Installing Tesseract OCR.")
|
|
34
|
+
github_wrapper = githubw.GitHubWrapper(
|
|
35
|
+
user_name="tesseract-ocr",
|
|
36
|
+
repo_name="tesseract",
|
|
37
|
+
branch="main")
|
|
38
|
+
github_wrapper.build_links_from_user_and_repo()
|
|
39
|
+
temp_file_path: str = tempfile.gettempdir()
|
|
40
|
+
tesseract_installer = github_wrapper.download_latest_release(
|
|
41
|
+
target_directory=temp_file_path,
|
|
42
|
+
string_pattern="*tesseract*exe")
|
|
43
|
+
|
|
44
|
+
# The Admin needed to install Tesseract.
|
|
45
|
+
subprocess.check_call([tesseract_installer, "/S"])
|
|
46
|
+
"""
|
|
47
|
+
# Add Tesseract to the PATH.
|
|
48
|
+
subprocess.check_call(["setx", "PATH", f"%PATH%;{WINDOWS_TESSERACT_DEFAULT_INSTALLATION_DIRECTORY}"])
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
if __name__ == '__main__':
|
|
52
|
+
sys.exit(main())
|
atomicshop/mitm/config_static.py
CHANGED
atomicshop/mitm/mitm_main.py
CHANGED
|
@@ -59,7 +59,7 @@ def exit_cleanup():
|
|
|
59
59
|
RECS_PROCESS_INSTANCE.join()
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
def mitm_server(config_file_path: str):
|
|
62
|
+
def mitm_server(config_file_path: str, script_version: str):
|
|
63
63
|
on_exit.register_exit_handler(exit_cleanup, at_exit=False)
|
|
64
64
|
|
|
65
65
|
# Main function should return integer with error code, 0 is successful.
|
|
@@ -109,7 +109,7 @@ def mitm_server(config_file_path: str):
|
|
|
109
109
|
system_logger.info("======================================")
|
|
110
110
|
system_logger.info("Server Started.")
|
|
111
111
|
system_logger.info(f"Python Version: {get_current_python_version_string()}")
|
|
112
|
-
system_logger.info(f"Script Version: {
|
|
112
|
+
system_logger.info(f"Script Version: {script_version}")
|
|
113
113
|
system_logger.info(f"Atomic Workshop Version: {atomicshop.__version__}")
|
|
114
114
|
system_logger.info(f"Log folder: {config_static.LogRec.logs_path}")
|
|
115
115
|
if config_static.LogRec.enable_request_response_recordings_in_logs:
|
|
@@ -411,10 +411,10 @@ def _loop_at_midnight_recs_archive():
|
|
|
411
411
|
time.sleep(60)
|
|
412
412
|
|
|
413
413
|
|
|
414
|
-
def mitm_server_main(config_file_path: str):
|
|
414
|
+
def mitm_server_main(config_file_path: str, script_version: str):
|
|
415
415
|
try:
|
|
416
416
|
# Main function should return integer with error code, 0 is successful.
|
|
417
|
-
return mitm_server(config_file_path)
|
|
417
|
+
return mitm_server(config_file_path, script_version)
|
|
418
418
|
except KeyboardInterrupt:
|
|
419
419
|
print_api.print_api("Server Stopped by [KeyboardInterrupt].", color='blue')
|
|
420
420
|
exit_cleanup()
|
atomicshop/wrappers/githubw.py
CHANGED
|
@@ -3,6 +3,14 @@ import fnmatch
|
|
|
3
3
|
|
|
4
4
|
from .. import web, urls
|
|
5
5
|
from ..print_api import print_api
|
|
6
|
+
from ..basics import strings
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class MoreThanOneReleaseFoundError(Exception):
|
|
10
|
+
pass
|
|
11
|
+
|
|
12
|
+
class NoReleaseFoundError(Exception):
|
|
13
|
+
pass
|
|
6
14
|
|
|
7
15
|
|
|
8
16
|
class GitHubWrapper:
|
|
@@ -174,16 +182,19 @@ class GitHubWrapper:
|
|
|
174
182
|
download_urls.remove(download_url)
|
|
175
183
|
|
|
176
184
|
# Find urls against 'string_pattern'.
|
|
177
|
-
found_urls = fnmatch.filter(download_urls, string_pattern)
|
|
185
|
+
found_urls: list = fnmatch.filter(download_urls, string_pattern)
|
|
178
186
|
|
|
179
187
|
# If more than 1 url answer the criteria, we can't download it. The user must be more specific in his input
|
|
180
188
|
# strings.
|
|
181
189
|
if len(found_urls) > 1:
|
|
182
190
|
message = f'More than 1 result found in JSON response, try changing search string or extension.\n' \
|
|
183
191
|
f'{found_urls}'
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
192
|
+
raise MoreThanOneReleaseFoundError(message)
|
|
193
|
+
elif len(found_urls) == 0:
|
|
194
|
+
message = f'No result found in JSON response, try changing search string or extension.'
|
|
195
|
+
raise NoReleaseFoundError(message)
|
|
196
|
+
else:
|
|
197
|
+
return found_urls[0]
|
|
187
198
|
|
|
188
199
|
def download_latest_release(
|
|
189
200
|
self,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256=
|
|
1
|
+
atomicshop/__init__.py,sha256=OIXYlXkKerHNZWXlxoV3_8FloSrzjYDaCOGsfFfHcjg,123
|
|
2
2
|
atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
|
|
3
3
|
atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
|
|
4
4
|
atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
|
|
@@ -55,6 +55,7 @@ atomicshop/a_installs/ubuntu/pycharm.py,sha256=Ld7YQBwPxrjuZcTG1K4kZqjbBdt8aooCV
|
|
|
55
55
|
atomicshop/a_installs/win/fibratus.py,sha256=TU4e9gdZ_zI73C40uueJ59pD3qmN-UFGdX5GFoVf6cM,179
|
|
56
56
|
atomicshop/a_installs/win/mongodb.py,sha256=AqyItXu19aaoe49pppDxtEkXey6PMy0PoT2Y_RmPpPE,179
|
|
57
57
|
atomicshop/a_installs/win/pycharm.py,sha256=j_RSd7aDOyC3yDd-_GUTMLlQTmDrqtVFG--oUfGLiZk,140
|
|
58
|
+
atomicshop/a_installs/win/robocorp.py,sha256=sxSqncQIXr4rA8lCr_SwDU18IxWZlNznDE2WY3vPEMM,1789
|
|
58
59
|
atomicshop/a_installs/win/wsl_ubuntu_lts.py,sha256=dZbPRLNKFeMd6MotjkE6UDY9cOiIaaclIdR1kGYWI50,139
|
|
59
60
|
atomicshop/a_mains/dns_gateway_setting.py,sha256=ncc2rFQCChxlNP59UshwmTonLqC6MWblrVAzbbz-13M,149
|
|
60
61
|
atomicshop/a_mains/msi_unpacker.py,sha256=5hrkqETYt9HIqR_3PMf32_q06kCrIcsdm_RJV9oY438,188
|
|
@@ -125,13 +126,13 @@ atomicshop/file_io/tomls.py,sha256=ol8EvQPf9sryTmZUf1v55BYSUQ6ml7HVVBHpNKbsIlA,9
|
|
|
125
126
|
atomicshop/file_io/xlsxs.py,sha256=v_dyg9GD4LqgWi6wA1QuWRZ8zG4ZwB6Dz52ytdcmmmI,2184
|
|
126
127
|
atomicshop/file_io/xmls.py,sha256=zh3SuK-dNaFq2NDNhx6ivcf4GYCfGM8M10PcEwDSpxk,2104
|
|
127
128
|
atomicshop/mitm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
128
|
-
atomicshop/mitm/config_static.py,sha256=
|
|
129
|
+
atomicshop/mitm/config_static.py,sha256=DjSnDtMU8srdqca8s6Q-oFCWgjjiCjXRhyk-nafRAUk,7788
|
|
129
130
|
atomicshop/mitm/config_toml_editor.py,sha256=2p1CMcktWRR_NW-SmyDwylu63ad5e0-w1QPMa8ZLDBw,1635
|
|
130
131
|
atomicshop/mitm/connection_thread_worker.py,sha256=2180oQgD3qRS53zloeALs_vYt66RJWJtnaCqjl2jVs4,28187
|
|
131
132
|
atomicshop/mitm/import_config.py,sha256=0Ij14aISTllTOiWYJpIUMOWobQqGofD6uafui5uWllE,9272
|
|
132
133
|
atomicshop/mitm/initialize_engines.py,sha256=-3B8xkXyPOwrC_mDJm_uaW9s56VeV-f6VTu4-8dou2s,8258
|
|
133
134
|
atomicshop/mitm/message.py,sha256=mNo4Lphr_Jo6IlNX5mPJzABpogWGkjOhwI4meAivwHw,2987
|
|
134
|
-
atomicshop/mitm/mitm_main.py,sha256=
|
|
135
|
+
atomicshop/mitm/mitm_main.py,sha256=RqRlh5YIY2u817n_L1IUnki6JYXSmr7fTi3bjY5ygRA,23498
|
|
135
136
|
atomicshop/mitm/recs_files.py,sha256=ZAAD0twun-FtmbSniXe3XQhIlawvANNB_HxwbHj7kwI,3151
|
|
136
137
|
atomicshop/mitm/shared_functions.py,sha256=0lzeyINd44sVEfFbahJxQmz6KAMWbYrW5ou3UYfItvw,1777
|
|
137
138
|
atomicshop/mitm/statistic_analyzer.py,sha256=5_sAYGX2Xunzo_pS2W5WijNCwr_BlGJbbOO462y_wN4,27533
|
|
@@ -186,7 +187,7 @@ atomicshop/wrappers/astw.py,sha256=VkYfkfyc_PJLIOxByT6L7B8uUmKY6-I8XGZl4t_z828,4
|
|
|
186
187
|
atomicshop/wrappers/configparserw.py,sha256=JwDTPjZoSrv44YKwIRcjyUnpN-FjgXVfMqMK_tJuSgU,22800
|
|
187
188
|
atomicshop/wrappers/cryptographyw.py,sha256=LfzTnwvJE03G6WZryOOf43VKhhnyMakzHpn8DPPCoy4,13252
|
|
188
189
|
atomicshop/wrappers/ffmpegw.py,sha256=wcq0ZnAe0yajBOuTKZCCaKI7CDBjkq7FAgdW5IsKcVE,6031
|
|
189
|
-
atomicshop/wrappers/githubw.py,sha256=
|
|
190
|
+
atomicshop/wrappers/githubw.py,sha256=Ft-QQ4sewzjEWEiW89A_nv9wcKVaQdq76TWvVS6r9mI,12576
|
|
190
191
|
atomicshop/wrappers/msiw.py,sha256=GQLqud72nfex3kvO1bJSruNriCYTYX1_G1gSf1MPkIA,6118
|
|
191
192
|
atomicshop/wrappers/numpyw.py,sha256=sBV4gSKyr23kXTalqAb1oqttzE_2XxBooCui66jbAqc,1025
|
|
192
193
|
atomicshop/wrappers/olefilew.py,sha256=biD5m58rogifCYmYhJBrAFb9O_Bn_spLek_9HofLeYE,2051
|
|
@@ -321,8 +322,8 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=fgMzDXI0cybwUEqAxprRmY3lqbh
|
|
|
321
322
|
atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
322
323
|
atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
|
|
323
324
|
atomicshop/wrappers/winregw/winreg_network.py,sha256=AENV88H1qDidrcpyM9OwEZxX5svfi-Jb4N6FkS1xtqA,8851
|
|
324
|
-
atomicshop-2.
|
|
325
|
-
atomicshop-2.
|
|
326
|
-
atomicshop-2.
|
|
327
|
-
atomicshop-2.
|
|
328
|
-
atomicshop-2.
|
|
325
|
+
atomicshop-2.19.0.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
326
|
+
atomicshop-2.19.0.dist-info/METADATA,sha256=BxY2IEfmMAFhO4teHrr8TYRCzgnf-SsrWaIh_l29YOo,10630
|
|
327
|
+
atomicshop-2.19.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
328
|
+
atomicshop-2.19.0.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
329
|
+
atomicshop-2.19.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|