first commit
This commit is contained in:
27
backend/validating_files.py
Normal file
27
backend/validating_files.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from dotenv import load_dotenv #Работа с env
|
||||
import os
|
||||
from pathlib import Path
|
||||
load_dotenv()
|
||||
dir = Path(os.getenv("DIR"))
|
||||
#Проход по всем файлам в директории
|
||||
def validating():
|
||||
for file in dir.rglob("*.xlsx"):
|
||||
name = file.stem
|
||||
match file:
|
||||
case _ if "period_closure_income" in name.lower():
|
||||
print("Реализация Яндекс ", name)
|
||||
|
||||
case _ if name == "0":
|
||||
print("Реализация ВБ", name)
|
||||
|
||||
case _ if "отчет о реализации товара" in name.lower():
|
||||
print("Реализация ОЗОН", name)
|
||||
|
||||
case _ if "вб" in name.lower() or "озон" in name.lower() or "яндекс" in name.lower():
|
||||
print("Товары, переданные на комиссию", name)
|
||||
|
||||
case _ if "realizationreportcis" in name.lower():
|
||||
print("Выкупы озон ", name)
|
||||
|
||||
case _ if "уведомление о выкупе" in name.lower():
|
||||
print("Выкупы вб ", name)
|
||||
Reference in New Issue
Block a user