atomicshop 3.5.2__py3-none-any.whl → 3.5.3__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 CHANGED
@@ -1,4 +1,4 @@
1
1
  """Atomic Basic functions and classes to make developer life easier"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '3.5.2'
4
+ __version__ = '3.5.3'
@@ -45,9 +45,6 @@ def archive(
45
45
 
46
46
  zip_object.write(file_path, arcname)
47
47
 
48
- # Remove the original directory after archiving.
49
- shutil.rmtree(directory_path, ignore_errors=True)
50
-
51
48
  return archive_path
52
49
 
53
50
 
@@ -107,6 +104,8 @@ def recs_archiver(
107
104
  try:
108
105
  archived_files: list = list()
109
106
  for directory_path, all_recs_files in file_list_per_directory:
107
+ print_api.print_api(f"Archiving recs files in directory: {directory_path.path}",
108
+ logger=rec_packer_logger_with_queue_handler, color='blue')
110
109
  for recs_atomic_path in all_recs_files:
111
110
  # We don't need to archive today's files.
112
111
  if today_date_string == recs_atomic_path.datetime_string:
@@ -120,9 +119,29 @@ def recs_archiver(
120
119
  # Archive directories.
121
120
  archive_directories: list = filesystem.get_paths_from_directory(
122
121
  directory_path.path, get_directory=True, recursive=False)
123
- for archive_directory in archive_directories:
124
- archived_file: str = archive(archive_directory.path, include_root_directory=True)
125
- archived_files.append(archived_file)
122
+
123
+ if not archive_directories:
124
+ print_api.print_api(
125
+ f"No directories to archive in: {directory_path.path}",
126
+ color='blue',
127
+ logger=rec_packer_logger_with_queue_handler
128
+ )
129
+ else:
130
+ total_archived_files: int = 0
131
+ for archive_directory in archive_directories:
132
+ files_to_archive: list = filesystem.get_paths_from_directory(
133
+ directory_path=archive_directory.path, get_file=True, recursive=False)
134
+ total_archived_files += len(files_to_archive)
135
+ archived_file: str = archive(archive_directory.path, include_root_directory=True)
136
+ # Remove the original directory after archiving.
137
+ shutil.rmtree(archive_directory.path, ignore_errors=True)
138
+ archived_files.append(archived_file)
139
+
140
+ print_api.print_api(
141
+ f'Archived: 'f'Directories: {len(archive_directories)} | '
142
+ f'Total Files: {total_archived_files} | In: {directory_path.path}',
143
+ logger=rec_packer_logger_with_queue_handler, color='blue')
144
+ print_api.print_api(f'Archived files: {archived_files}', logger=rec_packer_logger_with_queue_handler)
126
145
 
127
146
  finalize_output_queue.put(None)
128
147
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atomicshop
3
- Version: 3.5.2
3
+ Version: 3.5.3
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License-Expression: MIT
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=QRBJz25aMg-hOIbhIA1preZgLGMt8m94IlthV1VKS4I,122
1
+ atomicshop/__init__.py,sha256=LnBQ00KqEUelY6D3SheQBz_Ud-nTvnwerb0VWzAPXRk,122
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
@@ -123,7 +123,7 @@ atomicshop/mitm/import_config.py,sha256=7aLfKqflc3ZnzKc2_Y4T0eenzQpKG94M0r-PaVwF
123
123
  atomicshop/mitm/initialize_engines.py,sha256=qzz5jzh_lKC03bI1w5ebngVXo1K-RV3poAyW-nObyqo,11042
124
124
  atomicshop/mitm/message.py,sha256=CDhhm4BTuZE7oNZCjvIZ4BuPOW4MuIzQLOg91hJaxDI,3065
125
125
  atomicshop/mitm/mitm_main.py,sha256=i0YcLDKAYH1aUS_Rf7IbwXiSQzndsdOY_JuYTvTiTN8,40453
126
- atomicshop/mitm/recs_files.py,sha256=TyaMWV0fRmKV7MTGoP_DYDcr-MpS18FFfshq-KTQVBc,6438
126
+ atomicshop/mitm/recs_files.py,sha256=Gmo1FGS0oYVllWNnlCCoui-yNaSHaccWcIfTcXc4e-M,7661
127
127
  atomicshop/mitm/shared_functions.py,sha256=0lzeyINd44sVEfFbahJxQmz6KAMWbYrW5ou3UYfItvw,1777
128
128
  atomicshop/mitm/statistic_analyzer.py,sha256=EC9g21ocOsFzNfntV-nZHSGtrS1-Kxb0QDSGWS5FuNA,28942
129
129
  atomicshop/mitm/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -306,8 +306,8 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=_gA8bMX6Sw_UCXKi2y9wNAwlqif
306
306
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
307
307
  atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
308
308
  atomicshop/wrappers/winregw/winreg_network.py,sha256=ih0BVNwByLvf9F_Lac4EdmDYYJA3PzMvmG0PieDZrsE,9905
309
- atomicshop-3.5.2.dist-info/licenses/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
310
- atomicshop-3.5.2.dist-info/METADATA,sha256=FJWJFMaZI8SMj6Td3M1l8bSqWAXQNm6rJZ8w6OISCvs,9205
311
- atomicshop-3.5.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
312
- atomicshop-3.5.2.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
313
- atomicshop-3.5.2.dist-info/RECORD,,
309
+ atomicshop-3.5.3.dist-info/licenses/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
310
+ atomicshop-3.5.3.dist-info/METADATA,sha256=fmi3IUlo9PgbJw2LlMQ6SeIP3R1NQqB9kjfJL5PT3uE,9205
311
+ atomicshop-3.5.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
312
+ atomicshop-3.5.3.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
313
+ atomicshop-3.5.3.dist-info/RECORD,,