From 6073b4b3c9624a20ffc9ffed26022019b0d0e92b Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 10 Aug 2025 22:22:38 +0700 Subject: [PATCH] v1.2.1 --- .dockerignore | 67 ++-- .gitignore | 5 +- .idea/PRIMOSTORYFINAL.iml | 12 +- .idea/workspace.xml | 111 ++++-- BotCode/config.py | 19 - BotCode/core/__init__.py | 0 BotCode/handlers/commands/__init__.py | 7 - BotCode/handlers/commands/start_cmd.py | 36 -- BotCode/handlers/post/__init__.py | 10 - BotCode/handlers/post/create_posts.py | 210 ---------- BotCode/utils/pagination.py | 22 - Dockerfile | 25 +- LICENSE | 20 +- README.md | 78 ++-- assets/start.jpg | Bin 72016 -> 32459 bytes {BotCode => bot}/__init__.py | 3 +- bot/bots.py | 203 ++++++++++ bot/core/__init__.py | 1 + {BotCode => bot}/core/storage.py | 10 +- {BotCode => bot}/handlers/__init__.py | 7 +- {BotCode => bot}/handlers/callback.py | 20 +- bot/handlers/commands/__init__.py | 12 + bot/handlers/commands/help.py | 47 +++ bot/handlers/commands/start.py | 57 +++ {BotCode => bot}/handlers/inline.py | 17 +- bot/handlers/post/__init__.py | 13 + bot/handlers/post/create_posts.py | 420 ++++++++++++++++++++ {BotCode => bot}/handlers/post/post_list.py | 47 ++- bot/keyboards/__init__.py | 1 + bot/keyboards/inline/__init__.py | 3 + bot/keyboards/inline/decision.py | 22 + bot/keyboards/reply/__init__.py | 2 + {BotCode => bot}/loggers/__init__.py | 0 {BotCode => bot}/loggers/logs.py | 2 +- bot/templates/__init__.py | 1 + bot/templates/message_callback.py | 77 ++++ {BotCode => bot}/utils/__init__.py | 1 + bot/utils/interesting_facts.py | 29 ++ {BotCode => bot}/utils/md2_escape.py | 7 +- bot/utils/pagination.py | 28 ++ {BotCode => bot}/utils/usernames.py | 1 - configs/__init__.py | 2 + configs/cmd_list.py | 77 ++++ configs/config.py | 381 ++++++++++++++++++ docker-compose.yml | 8 + env_example | 92 +++++ main.py | 33 +- middleware/loggers/__init__.py | 1 + middleware/loggers/logs.py | 234 +++++++++++ posts/posts_6751720805.json | 291 -------------- pyproject.toml | 19 - requirements.txt | Bin 0 -> 934 bytes 52 files changed, 1981 insertions(+), 810 deletions(-) delete mode 100644 BotCode/config.py delete mode 100644 BotCode/core/__init__.py delete mode 100644 BotCode/handlers/commands/__init__.py delete mode 100644 BotCode/handlers/commands/start_cmd.py delete mode 100644 BotCode/handlers/post/__init__.py delete mode 100644 BotCode/handlers/post/create_posts.py delete mode 100644 BotCode/utils/pagination.py rename {BotCode => bot}/__init__.py (50%) create mode 100644 bot/bots.py create mode 100644 bot/core/__init__.py rename {BotCode => bot}/core/storage.py (97%) rename {BotCode => bot}/handlers/__init__.py (64%) rename {BotCode => bot}/handlers/callback.py (74%) create mode 100644 bot/handlers/commands/__init__.py create mode 100644 bot/handlers/commands/help.py create mode 100644 bot/handlers/commands/start.py rename {BotCode => bot}/handlers/inline.py (95%) create mode 100644 bot/handlers/post/__init__.py create mode 100644 bot/handlers/post/create_posts.py rename {BotCode => bot}/handlers/post/post_list.py (82%) create mode 100644 bot/keyboards/__init__.py create mode 100644 bot/keyboards/inline/__init__.py create mode 100644 bot/keyboards/inline/decision.py create mode 100644 bot/keyboards/reply/__init__.py rename {BotCode => bot}/loggers/__init__.py (100%) rename {BotCode => bot}/loggers/logs.py (99%) create mode 100644 bot/templates/__init__.py create mode 100644 bot/templates/message_callback.py rename {BotCode => bot}/utils/__init__.py (70%) create mode 100644 bot/utils/interesting_facts.py rename {BotCode => bot}/utils/md2_escape.py (91%) create mode 100644 bot/utils/pagination.py rename {BotCode => bot}/utils/usernames.py (97%) create mode 100644 configs/__init__.py create mode 100644 configs/cmd_list.py create mode 100644 configs/config.py create mode 100644 docker-compose.yml create mode 100644 env_example create mode 100644 middleware/loggers/__init__.py create mode 100644 middleware/loggers/logs.py delete mode 100644 posts/posts_6751720805.json delete mode 100644 pyproject.toml create mode 100644 requirements.txt diff --git a/.dockerignore b/.dockerignore index f90d979..4b9969e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,36 +1,39 @@ -# .dockerignore: Исключения для Docker сборки -# Игнорировать всё, кроме необходимого для production +# Исключить скрытые системные каталоги, но не всё подряд +.git/ +.gitattributes +.gitignore -**/.git -**/.gitignore -**/.dockerignore -**/Dockerfile -**/README.md +# Виртуальные окружения и Python-кэш +.venv/ +__pycache__/ +*.py[cod] +*.pyo -# Директории -**/__pycache__ -**/.mypy_cache -**/.pytest_cache -**/.idea -**/.vscode -**/test -**/tests -**/docs -**/examples +# IDE-файлы +.idea/ +.vscode/ -# Файлы -**/*.pyc -**/*.pyo -**/*.pyd -**/*.egg-info -**/*.log -**/*.logs -**/*.sqlite -**/*.db -config/.env -**/docker-compose* +# Тесты и документация +tests/ +test/ +docs/ +examples/ -# Артефакты сборки -**/build -**/dist -**/node_modules +# Логи и артефакты сборки +*.log +*.logs +Logs/ +Log/ +dist/ +build/ + +# Примеры и шаблоны +env_example +.env + +# Опционально (если не нужны в образе): +docker-compose.yml +poetry.lock +pyproject.toml +README.md +LICENSE diff --git a/.gitignore b/.gitignore index 5c7d07d..0e877d1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,8 @@ ### Python ### # Виртуальные окружения и настройки -config/.env -../../../../Desktop/PostBot/.venv +configs/.env +.venv venv/ env/ ENV/ @@ -65,3 +65,4 @@ htmlcov/ .nox/ .pytest_cache/ .mypy_cache/ +/.env diff --git a/.idea/PRIMOSTORYFINAL.iml b/.idea/PRIMOSTORYFINAL.iml index 0685815..93cd0ef 100644 --- a/.idea/PRIMOSTORYFINAL.iml +++ b/.idea/PRIMOSTORYFINAL.iml @@ -6,9 +6,19 @@ + + + - + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a8f81ca..4766e81 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,40 +5,57 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +