public inbox for [email protected]
 help / color / mirror / Atom feed
From: Muhammad Rizki <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: Muhammad Rizki <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Subject: [PATCH v2 00/18] Plan to redesign codes
Date: Tue, 19 Jul 2022 07:17:26 +0700	[thread overview]
Message-ID: <[email protected]> (raw)

Morning sir,

In this series I want to redesign codes to make it clear and clean.
I've inherit the DaemonClient with the Pyrogram's Client, so with
this method we can create our custom functions, such as
send email message and patch message in the DaemonClient. I've fixed
some bugs to and other improvements such as create a decorator.

There are 18 patches in this series:

- Patch 1 is to fix raw lore URL at the end of URL by regex replace
- Patch 2 is to fix the lack of __send_patch_msg function parameter
- Patch 3 is just add required imports and remove unused imports
- Patch 4 is to add default temporary directory name
- Patch 5 is to move Telegram bot session file
- Patch 6 is to use traceback to get the error detail while debugging
- Patch 7 is to create send email and patch msg in the DaemonClient
- Patch 8 is just remove the ____send_patch_msg
- Patch 9 is to move utility functions to the utils file
- Patch 10 is to create fix_utf8_chars function
- Patch 11 is just cleaning some codes to make it looks more practice
- Patch 12 is to change some indentation space to indentation tab
- Patch 13 is to remove whitespace after newline
- Patch 14 is to remove unused functions because it's already moved
- Patch 15 is just remove unused imports
- Patch 16 is to create @handle_flood decorator to handle floodwait
- Patch 17 is to remove __send_patch_msg() and displace some codes
- Patch 18 is just remove unused imports

I've already tested it last night and it fully works without errors,
so please give it a test too, thanks.

## Changelog

v1 -> v2
- Create @handle_flood to handle the Telegram floodwait.
- Remove unnecessary codes to make it cleaner.
- Move some utility functions into the utility file.
- Remove whitespace after newline
- Fix indentation issues

Signed-off-by: Muhammad Rizki <[email protected]>
---

Ammar Faizi (1):
  daemon: Fix raw lore URL on the inline keyboard button

Muhammad Rizki (17):
  Fix __send_patch_msg function parameter
  Fix import problem
  Add default temporary directory
  Move the Telegram bot session into the storage directory
  daemon: Use traceback.format_exc() to get the error detail
  Re-design send email message to Telegram
  Move ____send_patch_msg
  Move prepare for patch and clean up patch functions
  Create fix_utf8_chars function
  Recode some codes
  Fix indentation issue
  Remove whitespace
  Remove prepare patch and clean up patch
  daemon: Remove unused imports
  daemon: Add @handle_flood decorator and remove some functions
  daemon: Remove __send_patch_msg()
  daemon: Remove unused imports

 daemon/packages/__init__.py       |   1 +
 daemon/packages/client.py         |  68 +++++++++++++++
 daemon/packages/decorator.py      |  38 ++++++++
 daemon/packages/plugins/scrape.py |   1 +
 daemon/run.py                     |   8 +-
 daemon/scraper/bot.py             | 140 +++---------------------------
 daemon/scraper/scraper.py         |   4 -
 daemon/scraper/utils.py           |  50 +++++++++--
 8 files changed, 167 insertions(+), 143 deletions(-)
 create mode 100644 daemon/packages/__init__.py
 create mode 100644 daemon/packages/client.py
 create mode 100644 daemon/packages/decorator.py


base-commit: 339d992bdd77f19e67d0d9a30e3ac6eef1e4035a
-- 
Muhammad Rizki


             reply	other threads:[~2022-07-19  0:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19  0:17 Muhammad Rizki [this message]
2022-07-19  0:17 ` [PATCH v2 01/18] Fix __send_patch_msg function parameter Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 02/18] Fix import problem Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 03/18] Add default temporary directory Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 04/18] Move the Telegram bot session into the storage directory Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 05/18] daemon: Fix raw lore URL on the inline keyboard button Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 06/18] daemon: Use traceback.format_exc() to get the error detail Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 07/18] Re-design send email message to Telegram Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 08/18] Move ____send_patch_msg Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 09/18] Move prepare for patch and clean up patch functions Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 10/18] Create fix_utf8_chars function Muhammad Rizki
2022-07-19  8:20   ` Ammar Faizi
2022-07-19  0:17 ` [PATCH v2 11/18] Recode some codes Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 12/18] Fix indentation issue Muhammad Rizki
2022-07-19  8:15   ` Ammar Faizi
2022-07-19  0:17 ` [PATCH v2 13/18] Remove whitespace Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 14/18] Remove prepare patch and clean up patch Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 15/18] daemon: Remove unused imports Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 16/18] daemon: Add @handle_flood decorator and remove some functions Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 17/18] daemon: Remove __send_patch_msg() Muhammad Rizki
2022-07-19  0:17 ` [PATCH v2 18/18] daemon: Remove unused imports Muhammad Rizki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox