rer
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-05-05 19:44:41 +10:00
parent b688336161
commit 3e2820c8ce

View File

@@ -137,10 +137,12 @@ def setup_routes(app: FastAPI) -> None:
# 2. Собираем все файлы .docx за период # 2. Собираем все файлы .docx за период
all_files = [] all_files = []
current_date = start_date current_date = start_date
finish_date += timedelta(days=1)
while current_date <= finish_date: while current_date <= finish_date:
print(current_date)
date_path = current_date.strftime("%Y/%m/%d") date_path = current_date.strftime("%Y/%m/%d")
print(date_path)
full_dir_path = os.path.join(DOCUMENTS_DIR, date_path) full_dir_path = os.path.join(DOCUMENTS_DIR, date_path)
print(full_dir_path)
if os.path.exists(full_dir_path): if os.path.exists(full_dir_path):
for file in os.listdir(full_dir_path): for file in os.listdir(full_dir_path):
@@ -148,6 +150,7 @@ def setup_routes(app: FastAPI) -> None:
file_title = file[:-5] # убираем расширение .docx file_title = file[:-5] # убираем расширение .docx
if file_title in titles_from_db: if file_title in titles_from_db:
all_files.append(os.path.join(full_dir_path, file)) all_files.append(os.path.join(full_dir_path, file))
print(all_files)
current_date += timedelta(days=1) current_date += timedelta(days=1)