atomicshop 2.12.4__py3-none-any.whl → 2.12.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 atomicshop might be problematic. Click here for more details.
- atomicshop/__init__.py +1 -1
- atomicshop/mains/installs/pycharm.py +9 -0
- atomicshop/wrappers/loggingw/reading.py +39 -38
- atomicshop/wrappers/pycharmw.py +56 -0
- {atomicshop-2.12.4.dist-info → atomicshop-2.12.5.dist-info}/METADATA +1 -1
- {atomicshop-2.12.4.dist-info → atomicshop-2.12.5.dist-info}/RECORD +9 -7
- {atomicshop-2.12.4.dist-info → atomicshop-2.12.5.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.12.4.dist-info → atomicshop-2.12.5.dist-info}/WHEEL +0 -0
- {atomicshop-2.12.4.dist-info → atomicshop-2.12.5.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
|
@@ -72,44 +72,45 @@ def get_logs_paths(
|
|
|
72
72
|
add_last_modified_time=True,
|
|
73
73
|
sort_by_last_modified_time=True)
|
|
74
74
|
|
|
75
|
-
if
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
logs_files
|
|
111
|
-
|
|
112
|
-
|
|
75
|
+
if len(logs_files) > 1:
|
|
76
|
+
if date_pattern:
|
|
77
|
+
latest_timestamp: float = 0
|
|
78
|
+
for file_index, single_file in enumerate(logs_files):
|
|
79
|
+
# Get file name from current loop file path.
|
|
80
|
+
current_file_name: str = Path(single_file['file_path']).name
|
|
81
|
+
# Get the datetime object from the file name by the date pattern.
|
|
82
|
+
try:
|
|
83
|
+
datetime_object = datetimes.get_datetime_from_complex_string_by_pattern(current_file_name, date_pattern)
|
|
84
|
+
timestamp_float = datetime_object.timestamp()
|
|
85
|
+
# ValueError will be raised if the date pattern does not match the file name.
|
|
86
|
+
except ValueError:
|
|
87
|
+
timestamp_float = 0
|
|
88
|
+
# Update the last modified time to the dictionary.
|
|
89
|
+
logs_files[file_index]['last_modified'] = timestamp_float
|
|
90
|
+
|
|
91
|
+
if timestamp_float > latest_timestamp:
|
|
92
|
+
latest_timestamp = timestamp_float
|
|
93
|
+
|
|
94
|
+
# Now, there should be a file that doesn't have the string date pattern in the file name.
|
|
95
|
+
# We will add one day to the latest date that we found and assign to that file path.
|
|
96
|
+
for file_index, single_file in enumerate(logs_files):
|
|
97
|
+
if single_file['last_modified'] == 0:
|
|
98
|
+
latest_timestamp += 86400
|
|
99
|
+
logs_files[file_index]['last_modified'] = latest_timestamp
|
|
100
|
+
break
|
|
101
|
+
|
|
102
|
+
# Sort the files by the last modified time.
|
|
103
|
+
logs_files = sorted(logs_files, key=lambda x: x['last_modified'], reverse=False)
|
|
104
|
+
|
|
105
|
+
if latest_only:
|
|
106
|
+
logs_files = [logs_files[-1]]
|
|
107
|
+
|
|
108
|
+
if previous_day_only:
|
|
109
|
+
# Check if there is a previous day log file.
|
|
110
|
+
if len(logs_files) == 1:
|
|
111
|
+
logs_files = []
|
|
112
|
+
else:
|
|
113
|
+
logs_files = [logs_files[-2]]
|
|
113
114
|
|
|
114
115
|
return logs_files
|
|
115
116
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
import os
|
|
3
|
+
import subprocess
|
|
4
|
+
import tempfile
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# URL to the PyCharm Community Edition download page
|
|
8
|
+
PYCHARM_DOWNLOAD_URL = 'https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=windows&code=PCC'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def download_install_main():
|
|
12
|
+
"""
|
|
13
|
+
Main function to download and install the latest PyCharm Community Edition.
|
|
14
|
+
|
|
15
|
+
Usage:
|
|
16
|
+
python -m atomicshop.mains.installs.pycharm
|
|
17
|
+
|
|
18
|
+
Or run the main function directly.
|
|
19
|
+
from atomicshop.wrappers import pycharmw
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def main():
|
|
23
|
+
pycharmw.download_install_main()
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
if __name__ == "__main__":
|
|
27
|
+
main()
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
# Get the redirect URL for the download
|
|
31
|
+
response = requests.get(PYCHARM_DOWNLOAD_URL, allow_redirects=True)
|
|
32
|
+
|
|
33
|
+
# Extract the final download URL
|
|
34
|
+
download_url = response.url
|
|
35
|
+
|
|
36
|
+
# Get the file name from the download URL
|
|
37
|
+
file_name = download_url.split('/')[-1]
|
|
38
|
+
|
|
39
|
+
# Create a temporary directory to download the installer
|
|
40
|
+
temp_dir = tempfile.mkdtemp()
|
|
41
|
+
installer_path = os.path.join(temp_dir, file_name)
|
|
42
|
+
|
|
43
|
+
# Download the installer
|
|
44
|
+
print(f"Downloading {file_name}...")
|
|
45
|
+
with requests.get(download_url, stream=True) as r:
|
|
46
|
+
r.raise_for_status()
|
|
47
|
+
with open(installer_path, 'wb') as f:
|
|
48
|
+
for chunk in r.iter_content(chunk_size=8192):
|
|
49
|
+
f.write(chunk)
|
|
50
|
+
print("Download complete.")
|
|
51
|
+
|
|
52
|
+
# Install PyCharm
|
|
53
|
+
# Run the installer
|
|
54
|
+
print("Running the installer...")
|
|
55
|
+
subprocess.run([installer_path, '/S'], check=True) # /S for silent installation
|
|
56
|
+
print("Installation complete.")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256=
|
|
1
|
+
atomicshop/__init__.py,sha256=uqlTGePEf3VopmrqXyANaBI4Z722YLLgrlwbU_6-8Eo,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
|
|
@@ -111,6 +111,7 @@ atomicshop/file_io/jsons.py,sha256=q9ZU8slBKnHLrtn3TnbK1qxrRpj5ZvCm6AlsFzoANjo,5
|
|
|
111
111
|
atomicshop/file_io/tomls.py,sha256=oa0Wm8yMkPRXKN9jgBuTnKbioSOee4mABW5IMUFCYyU,3041
|
|
112
112
|
atomicshop/file_io/xlsxs.py,sha256=v_dyg9GD4LqgWi6wA1QuWRZ8zG4ZwB6Dz52ytdcmmmI,2184
|
|
113
113
|
atomicshop/file_io/xmls.py,sha256=zh3SuK-dNaFq2NDNhx6ivcf4GYCfGM8M10PcEwDSpxk,2104
|
|
114
|
+
atomicshop/mains/installs/pycharm.py,sha256=uYTfME7hOeNkAsOZxDDPj2hDqmkxrFqVV6Nv6xnYNVk,141
|
|
114
115
|
atomicshop/mitm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
115
116
|
atomicshop/mitm/connection_thread_worker.py,sha256=PQ8bwOgrPudYP5oPnSi_DWaKXOi038M8TMImlLkxuPI,20486
|
|
116
117
|
atomicshop/mitm/import_config.py,sha256=_V-IVJ7a1L6E-VOR4CDfZj-S1odbsIlBe13ij0NlpqY,7974
|
|
@@ -155,6 +156,7 @@ atomicshop/wrappers/numpyw.py,sha256=sBV4gSKyr23kXTalqAb1oqttzE_2XxBooCui66jbAqc
|
|
|
155
156
|
atomicshop/wrappers/olefilew.py,sha256=biD5m58rogifCYmYhJBrAFb9O_Bn_spLek_9HofLeYE,2051
|
|
156
157
|
atomicshop/wrappers/pipw.py,sha256=mu4jnHkSaYNfpBiLZKMZxEX_E2LqW5BVthMZkblPB_c,1317
|
|
157
158
|
atomicshop/wrappers/process_wrapper_pbtk.py,sha256=ycPmBRnv627RWks6N8OhxJQe8Gu3h3Vwj-4HswPOw0k,599
|
|
159
|
+
atomicshop/wrappers/pycharmw.py,sha256=Ar7SDG15HD-GUiLH-Mclo7xpoPj9nzSXg4ks63lL8fw,1642
|
|
158
160
|
atomicshop/wrappers/pyopensslw.py,sha256=OBWxA6EJ2vU_Qlf4M8m6ilcG3hyYB4yB0EsXUf7NhEU,6804
|
|
159
161
|
atomicshop/wrappers/ubuntu_terminal.py,sha256=BBZD3EH6KSDORd5IZBZM-ti4U6Qh1sZwftx42s7hqB4,10917
|
|
160
162
|
atomicshop/wrappers/wslw.py,sha256=AKphiHLSddL7ErevUowr3f9Y1AgGz_R3KZ3NssW07h8,6959
|
|
@@ -214,7 +216,7 @@ atomicshop/wrappers/loggingw/formatters.py,sha256=mUtcJJfmhLNrwUVYShXTmdu40dBaJu
|
|
|
214
216
|
atomicshop/wrappers/loggingw/handlers.py,sha256=qm5Fbu8eDmlstMduUe5nKUlJU5IazFkSnQizz8Qt2os,5479
|
|
215
217
|
atomicshop/wrappers/loggingw/loggers.py,sha256=DHOOTAtqkwn1xgvLHSkOiBm6yFGNuQy1kvbhG-TDog8,2374
|
|
216
218
|
atomicshop/wrappers/loggingw/loggingw.py,sha256=v9WAseZXB50LluT9rIUcRvvevg2nLVKPgz3dbGejfV0,12151
|
|
217
|
-
atomicshop/wrappers/loggingw/reading.py,sha256=
|
|
219
|
+
atomicshop/wrappers/loggingw/reading.py,sha256=OIQaLZLtk6s3LLV1IfWFkBJRWRwWJA9v_NgoFd6iXMg,13302
|
|
218
220
|
atomicshop/wrappers/nodejsw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
219
221
|
atomicshop/wrappers/nodejsw/install_nodejs.py,sha256=QZg-R2iTQt7kFb8wNtnTmwraSGwvUs34JIasdbNa7ZU,5154
|
|
220
222
|
atomicshop/wrappers/playwrightw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -249,8 +251,8 @@ atomicshop/wrappers/socketw/socket_server_tester.py,sha256=AhpurHJmP2kgzHaUbq5ey
|
|
|
249
251
|
atomicshop/wrappers/socketw/socket_wrapper.py,sha256=aXBwlEIJhFT0-c4i8iNlFx2It9VpCEpsv--5Oqcpxao,11624
|
|
250
252
|
atomicshop/wrappers/socketw/ssl_base.py,sha256=k4V3gwkbq10MvOH4btU4onLX2GNOsSfUAdcHmL1rpVE,2274
|
|
251
253
|
atomicshop/wrappers/socketw/statistics_csv.py,sha256=t3dtDEfN47CfYVi0CW6Kc2QHTEeZVyYhc57IYYh5nmA,826
|
|
252
|
-
atomicshop-2.12.
|
|
253
|
-
atomicshop-2.12.
|
|
254
|
-
atomicshop-2.12.
|
|
255
|
-
atomicshop-2.12.
|
|
256
|
-
atomicshop-2.12.
|
|
254
|
+
atomicshop-2.12.5.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
255
|
+
atomicshop-2.12.5.dist-info/METADATA,sha256=pZCLXNyHoMpmuyqyWM8BWph8Cy-rHWAnbo4ay-gaQNA,10447
|
|
256
|
+
atomicshop-2.12.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
257
|
+
atomicshop-2.12.5.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
258
|
+
atomicshop-2.12.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|