From 23ef1597c90b4e83f7f76bbce0aca1d6e500e01d Mon Sep 17 00:00:00 2001 From: Nighty3098 <154594695+Nighty3098@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:57:05 +0700 Subject: [PATCH 1/2] Delete kb_builders.py --- kb_builders.py | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 kb_builders.py diff --git a/kb_builders.py b/kb_builders.py deleted file mode 100644 index 28e84d2..0000000 --- a/kb_builders.py +++ /dev/null @@ -1,44 +0,0 @@ -import asyncio - -import pretty_errors -from aiogram import * -from aiogram.enums import * -from aiogram.filters import * -from aiogram.types import * -from aiogram.utils.keyboard import * -from aiogram.utils.markdown import * -from requests.models import * - -from config import * - -async def month_list_kb(): - builder = InlineKeyboardBuilder() - builder.add(types.InlineKeyboardButton(text="Декабрь", callback_data="December")) - builder.add(types.InlineKeyboardButton(text="Январь", callback_data="January")) - builder.add(types.InlineKeyboardButton(text="Февраль", callback_data="February")) - builder.add(types.InlineKeyboardButton(text="Март", callback_data="March")) - builder.add(types.InlineKeyboardButton(text="Апрель", callback_data="April")) - builder.add(types.InlineKeyboardButton(text="Май", callback_data="May")) - builder.add(types.InlineKeyboardButton(text="Июнь", callback_data="June")) - builder.add(types.InlineKeyboardButton(text="Июль", callback_data="July")) - builder.add(types.InlineKeyboardButton(text="Август", callback_data="August")) - builder.add(types.InlineKeyboardButton(text="Сентябрь", callback_data="September")) - builder.add(types.InlineKeyboardButton(text="Октябрь", callback_data="October")) - builder.add(types.InlineKeyboardButton(text="Ноябрь", callback_data="November")) - builder.add(types.InlineKeyboardButton(text="<<<", callback_data="Back2")) - builder.adjust(2) - - return builder.as_markup() - - -async def back_main(): - builder = InlineKeyboardBuilder() - builder.add(types.InlineKeyboardButton(text="<<<", callback_data="Back2")) - builder.adjust(1) - return builder.as_markup() - -async def back_kb(): - builder = InlineKeyboardBuilder() - builder.add(types.InlineKeyboardButton(text="<<<", callback_data="Back")) - builder.adjust(1) - return builder.as_markup() From 9a32253fd4df7c5404cf058af70e34debabf48d9 Mon Sep 17 00:00:00 2001 From: Nighty3098 <154594695+Nighty3098@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:57:42 +0700 Subject: [PATCH 2/2] Delete categories.py --- categories.py | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 categories.py diff --git a/categories.py b/categories.py deleted file mode 100644 index 09ce9e3..0000000 --- a/categories.py +++ /dev/null @@ -1,28 +0,0 @@ -from config import * - -categories = { - "Drive": ["такси", "поездка", "автобус", "метро", "машина", "поезд"], - "Food": ["еда", "ресторан", "похавать", "кофе", "кафе"], - "Devices": ["днс", "девайсы", "пк"], - "Subscription": [ - "подписка", - "теле2", - "музыка", - "yt", - "spotify", - "netflix", - "yandex", - ], - "Books": ["книги"], - "Other": ["другое", " "], - "Taxes": ["налоги", "жэу", "жкх", "налог"], - "Courses": ["курсы", "обучение", "учёба"], - "Work": ["фриланс", "работа", "программирование", "разработка"], -} - - -async def change_category(text): - text = text.lower() - for category, words in categories.items(): - if any(word in text for word in words): - return category