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 v3 00/17] Code improvements
Date: Fri, 22 Jul 2022 06:29:21 +0700	[thread overview]
Message-ID: <[email protected]> (raw)

Morning sir,

In this series I just want to improve some codes like adding type in
@handle_flood and replace some codes that already created with a good
one.

There are 17 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 to remove whitespace after newline
- Patch 12 is to remove unused functions because it's already moved
- Patch 13 is to create @handle_flood decorator to handle floodwait
- Patch 14 is to remove __send_patch_msg() and displace some codes
- Patch 15 is just remove unused imports
- Patch 16 is to replace some functions in packages/plugins/scrape.py
- Patch 17 is to Add some code typing in @handle_flood decorator

Already tested it and works fine too, please give it a test too.
Thanks!

## Changelog

v2 ->  v3
- Remove duplicated patch.
- Modify patch 10 to look more practice.
- Indentation patch issues were removed and patched in patch 7
- Replace send email and patch email with the custom one.
- Add code typing in @handle_flood decorator

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 (16):
  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
  Remove whitespace
  Remove prepare patch and clean up patch
  daemon: Add @handle_flood decorator and remove some functions
  daemon: Remove __send_patch_msg()
  daemon: Remove unused imports
  Replace send email functions
  Add typing in decorator

 daemon/packages/__init__.py       |   1 +
 daemon/packages/client.py         |  73 +++++++++++++++
 daemon/packages/decorator.py      |  43 +++++++++
 daemon/packages/plugins/scrape.py |  49 ++--------
 daemon/run.py                     |   8 +-
 daemon/scraper/bot.py             | 146 ++++--------------------------
 daemon/scraper/scraper.py         |   4 -
 daemon/scraper/utils.py           |  48 ++++++++--
 8 files changed, 187 insertions(+), 185 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-21 23:29 UTC|newest]

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

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