From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [101.128.125.149]) by gnuweeb.org (Postfix) with ESMTPSA id 1BE5280F5A; Sun, 25 Sep 2022 21:14:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1664140496; bh=/StQ+Snj8NZwsOQC7jlnLDtRLVwaJyBF+WBbC2MrpAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mIcbjaHiqj/77DUiKdiE54jFoGCNNCce55n+C5++1Dmr+CsjQ9FWn65sDO7yp/jHM Ojg7vq7eh71gOLY0m1qRCYgFahODy4bXDxcA9ahgIgTiRzMbKPE/F+iphRPiTKhbY+ 5lwycJLis632xpRrFoODKHrajYPHgXXyhpEbU/ZWTHyqLZ3KVsfDyMjHHIXowC7LJ5 S2wXdRFRZpen7P9cxgU/jtcB5MeN0ZL6YjLU/YDBvtUyM8RtQ9wSwToEqcHb5250DA iwx3wbWHX6l1lriAFlKMGk3AFZMevh7goUjJXAGANvccIB8Z8NqYok/55/eHe5u60w hrwJXuL0wotaQ== From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [RFC PATCH v5 06/18] telegram: Renames in telegram mailer directory Date: Mon, 26 Sep 2022 04:14:15 +0700 Message-Id: <20220925211427.412-7-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20220925211427.412-1-kiizuha@gnuweeb.org> References: <20220925211427.412-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Rename a mailer directory and listener file. Directory: - telegram/scraper => telegram/mailer File: - telegram/scraper/bot.py => telegram/mailer/listener.py While renaming them, adapt the import statement to avoid errors. Signed-off-by: Muhammad Rizki --- daemon/telegram/{scraper => mailer}/__init__.py | 4 ++-- daemon/telegram/{scraper/bot.py => mailer/listener.py} | 2 +- daemon/telegram/{scraper => mailer}/scraper.py | 0 daemon/telegram/{scraper => mailer}/utils.py | 0 daemon/telegram/packages/client.py | 2 +- daemon/telegram/packages/plugins/callbacks/del_atom.py | 2 +- daemon/telegram/packages/plugins/callbacks/del_chat.py | 2 +- daemon/telegram/packages/plugins/commands/manage_atom.py | 2 +- daemon/telegram/packages/plugins/commands/manage_broadcast.py | 2 +- daemon/telegram/packages/plugins/commands/scrape.py | 4 ++-- 10 files changed, 10 insertions(+), 10 deletions(-) rename daemon/telegram/{scraper => mailer}/__init__.py (77%) rename daemon/telegram/{scraper/bot.py => mailer/listener.py} (98%) rename daemon/telegram/{scraper => mailer}/scraper.py (100%) rename daemon/telegram/{scraper => mailer}/utils.py (100%) diff --git a/daemon/telegram/scraper/__init__.py b/daemon/telegram/mailer/__init__.py similarity index 77% rename from daemon/telegram/scraper/__init__.py rename to daemon/telegram/mailer/__init__.py index 4294302..75f27df 100644 --- a/daemon/telegram/scraper/__init__.py +++ b/daemon/telegram/mailer/__init__.py @@ -5,5 +5,5 @@ # from .scraper import Scraper -from .bot import BotMutexes -from .bot import Bot +from .listener import BotMutexes +from .listener import Bot diff --git a/daemon/telegram/scraper/bot.py b/daemon/telegram/mailer/listener.py similarity index 98% rename from daemon/telegram/scraper/bot.py rename to daemon/telegram/mailer/listener.py index ac183be..f92ae1d 100644 --- a/daemon/telegram/scraper/bot.py +++ b/daemon/telegram/mailer/listener.py @@ -7,7 +7,7 @@ from pyrogram.types import Message from apscheduler.schedulers.asyncio import AsyncIOScheduler from telegram.packages import DaemonClient -from telegram.scraper import Scraper +from . import Scraper from . import utils import asyncio import shutil diff --git a/daemon/telegram/scraper/scraper.py b/daemon/telegram/mailer/scraper.py similarity index 100% rename from daemon/telegram/scraper/scraper.py rename to daemon/telegram/mailer/scraper.py diff --git a/daemon/telegram/scraper/utils.py b/daemon/telegram/mailer/utils.py similarity index 100% rename from daemon/telegram/scraper/utils.py rename to daemon/telegram/mailer/utils.py diff --git a/daemon/telegram/packages/client.py b/daemon/telegram/packages/client.py index e419d40..950665b 100644 --- a/daemon/telegram/packages/client.py +++ b/daemon/telegram/packages/client.py @@ -8,7 +8,7 @@ from pyrogram.enums import ParseMode from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton from typing import Union from email.message import Message -from telegram.scraper import utils +from telegram.mailer import utils from telegram.database import DB from .decorator import handle_flood diff --git a/daemon/telegram/packages/plugins/callbacks/del_atom.py b/daemon/telegram/packages/plugins/callbacks/del_atom.py index 94b2489..57be8c6 100644 --- a/daemon/telegram/packages/plugins/callbacks/del_atom.py +++ b/daemon/telegram/packages/plugins/callbacks/del_atom.py @@ -4,7 +4,7 @@ # from telegram.packages import DaemonClient -from telegram.scraper import utils +from telegram.mailer import utils from pyrogram.types import CallbackQuery from telegram import config diff --git a/daemon/telegram/packages/plugins/callbacks/del_chat.py b/daemon/telegram/packages/plugins/callbacks/del_chat.py index ae21179..854b172 100644 --- a/daemon/telegram/packages/plugins/callbacks/del_chat.py +++ b/daemon/telegram/packages/plugins/callbacks/del_chat.py @@ -4,7 +4,7 @@ # from telegram.packages import DaemonClient -from telegram.scraper import utils +from telegram.mailer import utils from pyrogram.types import CallbackQuery from telegram import config diff --git a/daemon/telegram/packages/plugins/commands/manage_atom.py b/daemon/telegram/packages/plugins/commands/manage_atom.py index a4ccc46..37b06cb 100644 --- a/daemon/telegram/packages/plugins/commands/manage_atom.py +++ b/daemon/telegram/packages/plugins/commands/manage_atom.py @@ -6,7 +6,7 @@ from pyrogram.types import Message from pyrogram import filters from telegram.packages import DaemonClient -from telegram.scraper import utils +from telegram.mailer import utils from telegram import config diff --git a/daemon/telegram/packages/plugins/commands/manage_broadcast.py b/daemon/telegram/packages/plugins/commands/manage_broadcast.py index 16a494a..b99b712 100644 --- a/daemon/telegram/packages/plugins/commands/manage_broadcast.py +++ b/daemon/telegram/packages/plugins/commands/manage_broadcast.py @@ -6,7 +6,7 @@ from pyrogram.types import Message from pyrogram import filters, enums from telegram.packages import DaemonClient -from telegram.scraper import utils +from telegram.mailer import utils from telegram import config diff --git a/daemon/telegram/packages/plugins/commands/scrape.py b/daemon/telegram/packages/plugins/commands/scrape.py index a83420c..253993f 100644 --- a/daemon/telegram/packages/plugins/commands/scrape.py +++ b/daemon/telegram/packages/plugins/commands/scrape.py @@ -7,8 +7,8 @@ from pyrogram.types import Message from pyrogram import filters from telegram.packages import DaemonClient -from telegram.scraper import Scraper -from telegram.scraper import utils +from telegram.mailer import Scraper +from telegram.mailer import utils from telegram import config import shutil import re -- Muhammad Rizki