This commit is contained in:
Dmitriy Kazimirov 2025-03-30 00:01:07 +06:00
parent 27dbc21537
commit 957362f0a8
4 changed files with 9 additions and 9 deletions

8
.env
View file

@ -1,5 +1,5 @@
STORAGE_TYPE=smb # "smb" или "local"
STORAGE_TYPE=smb # "smb" ¨«¨ "local"
LOCAL_STORAGE_PATH=./local_files
SMB_STORAGE_PATH=//IP_ИЛИ_ХОСТ_СМБ/ПУТЬ_КАРЕ
SMB_USER=ТВОЙ_ЛОГИН
SMB_PASSWORD=ТВОЙ_ПАРОЛЬ
SMB_STORAGE_PATH=//IP_ˆˆ_•Ž_Œ<EFBFBD>/<2F>œ_Š_˜<CB9C>
SMB_USER=މ_Žƒˆ<EFBFBD>
SMB_PASSWORD=މ_<EFBFBD><EFBFBD>Žœ

View file

@ -21,4 +21,4 @@ def get_file(filename: str):
file_path = os.path.join(FILES_DIR, filename)
if os.path.exists(file_path):
return FileResponse(file_path, filename=filename)
return {"error": "Ôàéë íå íàéäåí"}
return {"error": "Файл не найден"}

View file

@ -41,7 +41,7 @@ def index_files():
if docs:
requests.post(f"{SEARCH_ENGINE}/indexes/{INDEX_NAME}/documents", json=docs)
print(f"Èíäåêñèðîâàíî {len(docs)} ôàéëîâ!")
print(f"Индексировано {len(docs)} файлов!")
if __name__ == "__main__":
index_files()

View file

@ -2,11 +2,11 @@
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Ïîèñê</title>
<title>Поиск</title>
</head>
<body>
<input id="query" type="text" placeholder="Ââåäèòå çàïðîñ">
<button onclick="search()">Èñêàòü</button>
<input id="query" type="text" placeholder="Введите запрос">
<button onclick="search()">Искать</button>
<ul id="results"></ul>
<script>