lastsummerkape commited on
Commit
5a14568
·
verified ·
1 Parent(s): 4940572

Create unzip_docs.py

Browse files
Files changed (1) hide show
  1. unzip_docs.py +11 -0
unzip_docs.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import zipfile, pathlib, shutil
2
+
3
+ ZIP_PATH = pathlib.Path("docs_txt.zip")
4
+ OUT_DIR = pathlib.Path("docs_txt")
5
+ if not ZIP_PATH.exists():
6
+ raise SystemExit("Архив docs_txt.zip не найден.")
7
+ if OUT_DIR.exists():
8
+ shutil.rmtree(OUT_DIR) # чистим старую распаковку
9
+ with zipfile.ZipFile(ZIP_PATH, "r") as z:
10
+ z.extractall(OUT_DIR)
11
+ print("✓ Файлы распакованы в", OUT_DIR)