public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH v2 00/18] New feature to handle atom URLs and broadcast
@ 2022-07-29  0:44 Muhammad Rizki
  2022-07-29  0:44 ` [PATCH v2 01/18] Add atom_broadcast.sql Muhammad Rizki
                   ` (18 more replies)
  0 siblings, 19 replies; 23+ messages in thread
From: Muhammad Rizki @ 2022-07-29  0:44 UTC (permalink / raw)
  To: Ammar Faizi; +Cc: Muhammad Rizki, GNU/Weeb Mailing List

Morning sir,

In this series I want to create a new feature to handle the atom URLs
and broadcast chats, such as add atom, add chat, del_atom and del_chat,
with this feature, we do not manual manage them again, just using
the bot commands and it will update in database.

There are 18 patches in this series:
- Patch 1 is just add atom_broadcast.sql to create tables
- Patch 2 is to add get atom URLs and get broadcast chats
- Patch 3 is to fix MySQL InternalError when query the atom and chats
- Patch 4 is to create /add_atom bot command to atom URL to database
- Patch 5 is to add some utility functions to handle code in /add_atom
- Patch 6 is to refactor db class to easily access over DaemonClient
- Patch 7 is to add insert_atom() in scraper/db.py to insert atom URLs
- Patch 8 is to rename admin.py to debugger.
- Patch 9 is to add delete_atom() in scraper/db.py for /del_atom command
- Patch 10 is to add button_numbers() in utility file to create btn nums
- Patch 11 is to split files between bot commands and bot CallbackQuery
- Patch 12 is to add del_atom for CallbackQuery to handle delete atom
- Patch 13 is to add insert_broadcast() in scraper/db.py to insert chats
- Patch 14 is to add delete_broadcast() in scraper/db.py to delete chats
- Patch 15 is to create /add_bc bot command to add chat to the database
- Patch 16 is to add create_chat_link() in utility file for chat link
- Patch 17 is to add /del_bc bot command to remove chat in the database
- Patch 18 is to add del_chat in bot CallbackQuery to handle delete chat

Already tested and it works fine, please give it a test too if there is
a bug or unexpected errors, thanks.

## Changelog

v1 -> v2
- Improve delete_broadcast() source code in scraper/db.py
- Fix typehints to int for chat_id param in scraper/db.py

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

Muhammad Rizki (18):
  Add atom_broadcast.sql
  Add ATOM_URLS and BROADCAST_CHAT methods
  Fix MySQL InternalError: Unread result found
  Create /add_atom command
  Add utility functions for /add_atom
  Refactor database methods
  Add insert_atom() in scraper/db.py
  Rename admin.py to debugger.py
  Add delete_atom() function in scraper/db.py
  Add utility function buton_numbers()
  Move bot commands related files to packages/plugins/commands/
  Add del_atom callback query
  Add insert_broadcast() in scraper/db.py
  Add delete_broadcast() in scraper/db.py
  Create /add_bc bot command
  Add create_chat_link() function
  Add /del_bc bot command
  Add del_chat callback query

 .gitignore                                    |   4 +
 daemon/atom_broadcast.sql                     |  25 +++++
 daemon/packages/client.py                     |   4 +-
 daemon/packages/plugins/callbacks/del_atom.py |  31 +++++
 daemon/packages/plugins/callbacks/del_chat.py |  36 ++++++
 .../{admin.py => commands/debugger.py}        |   0
 .../packages/plugins/commands/manage_atom.py  |  50 +++++++++
 .../plugins/commands/manage_broadcast.py      |  66 +++++++++++
 .../packages/plugins/{ => commands}/scrape.py |   0
 daemon/run.py                                 |  16 +--
 daemon/scraper/bot.py                         |  22 +---
 daemon/scraper/db.py                          | 106 +++++++++++++++++-
 daemon/scraper/utils.py                       |  45 ++++++++
 13 files changed, 379 insertions(+), 26 deletions(-)
 create mode 100644 daemon/atom_broadcast.sql
 create mode 100644 daemon/packages/plugins/callbacks/del_atom.py
 create mode 100644 daemon/packages/plugins/callbacks/del_chat.py
 rename daemon/packages/plugins/{admin.py => commands/debugger.py} (100%)
 create mode 100644 daemon/packages/plugins/commands/manage_atom.py
 create mode 100644 daemon/packages/plugins/commands/manage_broadcast.py
 rename daemon/packages/plugins/{ => commands}/scrape.py (100%)


base-commit: f8c5aef0aa85e1262c90f818638d255c3c38373f
-- 
Muhammad Rizki


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [PATCH v1 00/18] New feature to handle atom URLs and broadcast
@ 2022-07-29  0:40 Muhammad Rizki
  2022-07-29  0:40 ` [PATCH v2 16/18] Add create_chat_link() function Muhammad Rizki
  0 siblings, 1 reply; 23+ messages in thread
From: Muhammad Rizki @ 2022-07-29  0:40 UTC (permalink / raw)
  To: Ammar Faizi; +Cc: Muhammad Rizki, GNU/Weeb Mailing List

Morning sir,

In this series I want to create a new feature to handle the atom URLs
and broadcast chats, such as add atom, add chat, del_atom and del_chat,
with this feature, we do not manual manage them again, just using
the bot commands and it will update in database.

There are 18 patches in this series:
- Patch 1 is just add atom_broadcast.sql to create tables
- Patch 2 is to add get atom URLs and get broadcast chats
- Patch 3 is to fix MySQL InternalError when query the atom and chats
- Patch 4 is to create /add_atom bot command to atom URL to database
- Patch 5 is to add some utility functions to handle code in /add_atom
- Patch 6 is to refactor db class to easily access over DaemonClient
- Patch 7 is to add insert_atom() in scraper/db.py to insert atom URLs
- Patch 8 is to rename admin.py to debugger.
- Patch 9 is to add delete_atom() in scraper/db.py for /del_atom command
- Patch 10 is to add button_numbers() in utility file to create btn nums
- Patch 11 is to split files between bot commands and bot CallbackQuery
- Patch 12 is to add del_atom for CallbackQuery to handle delete atom
- Patch 13 is to add insert_broadcast() in scraper/db.py to insert chats
- Patch 14 is to add delete_broadcast() in scraper/db.py to delete chats
- Patch 15 is to create /add_bc bot command to add chat to the database
- Patch 16 is to add create_chat_link() in utility file for chat link
- Patch 17 is to add /del_bc bot command to remove chat in the database
- Patch 18 is to add del_chat in bot CallbackQuery to handle delete chat

Already tested and it works fine, please give it a test too if there is
a bug or unexpected errors, thanks.

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

Muhammad Rizki (18):
  Add atom_broadcast.sql
  Add ATOM_URLS and BROADCAST_CHAT methods
  Fix MySQL InternalError: Unread result found
  Create /add_atom command
  Add utility functions for /add_atom
  Refactor database methods
  Add insert_atom() in scraper/db.py
  Rename admin.py to debugger.py
  Add delete_atom() function in scraper/db.py
  Add utility function buton_numbers()
  Move bot commands related files to packages/plugins/commands/
  Add del_atom callback query
  Add insert_broadcast() in scraper/db.py
  Add delete_broadcast() in scraper/db.py
  Create /add_bc bot command
  Add create_chat_link() function
  Add /del_bc bot command
  Add del_chat callback query

 .gitignore                                    |   4 +
 daemon/atom_broadcast.sql                     |  25 ++++
 daemon/packages/client.py                     |   4 +-
 daemon/packages/plugins/callbacks/del_atom.py |  31 +++++
 daemon/packages/plugins/callbacks/del_chat.py |  36 ++++++
 .../{admin.py => commands/debugger.py}        |   0
 .../packages/plugins/commands/manage_atom.py  |  50 ++++++++
 .../plugins/commands/manage_broadcast.py      |  66 ++++++++++
 .../packages/plugins/{ => commands}/scrape.py |   0
 daemon/run.py                                 |  16 +--
 daemon/scraper/bot.py                         |  22 +---
 daemon/scraper/db.py                          | 115 +++++++++++++++++-
 daemon/scraper/utils.py                       |  45 +++++++
 13 files changed, 388 insertions(+), 26 deletions(-)
 create mode 100644 daemon/atom_broadcast.sql
 create mode 100644 daemon/packages/plugins/callbacks/del_atom.py
 create mode 100644 daemon/packages/plugins/callbacks/del_chat.py
 rename daemon/packages/plugins/{admin.py => commands/debugger.py} (100%)
 create mode 100644 daemon/packages/plugins/commands/manage_atom.py
 create mode 100644 daemon/packages/plugins/commands/manage_broadcast.py
 rename daemon/packages/plugins/{ => commands}/scrape.py (100%)


base-commit: f8c5aef0aa85e1262c90f818638d255c3c38373f
-- 
Muhammad Rizki


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-07-29  1:06 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-29  0:44 [PATCH v2 00/18] New feature to handle atom URLs and broadcast Muhammad Rizki
2022-07-29  0:44 ` [PATCH v2 01/18] Add atom_broadcast.sql Muhammad Rizki
2022-07-29  0:44 ` [PATCH v2 02/18] Add ATOM_URLS and BROADCAST_CHAT methods Muhammad Rizki
2022-07-29  0:44 ` [PATCH v2 03/18] Fix MySQL InternalError: Unread result found Muhammad Rizki
2022-07-29  0:44 ` [PATCH v2 04/18] Create /add_atom command Muhammad Rizki
2022-07-29  0:44 ` [PATCH v2 05/18] Add utility functions for /add_atom Muhammad Rizki
2022-07-29  0:44 ` [PATCH v2 06/18] Refactor database methods Muhammad Rizki
2022-07-29  0:44 ` [PATCH v2 07/18] Add insert_atom() in scraper/db.py Muhammad Rizki
2022-07-29  0:44 ` [PATCH v2 08/18] Rename admin.py to debugger.py Muhammad Rizki
2022-07-29  0:44 ` [PATCH v2 09/18] Add delete_atom() function in scraper/db.py Muhammad Rizki
2022-07-29  0:44 ` [PATCH v2 10/18] Add utility function buton_numbers() Muhammad Rizki
2022-07-29  0:45 ` [PATCH v2 11/18] Move bot commands related files to packages/plugins/commands/ Muhammad Rizki
2022-07-29  0:45 ` [PATCH v2 12/18] Add del_atom callback query Muhammad Rizki
2022-07-29  0:45 ` [PATCH v2 13/18] Add insert_broadcast() in scraper/db.py Muhammad Rizki
2022-07-29  0:45 ` [PATCH v2 14/18] Add delete_broadcast() " Muhammad Rizki
2022-07-29  0:45 ` [PATCH v2 15/18] Create /add_bc bot command Muhammad Rizki
2022-07-29  0:45 ` [PATCH v2 16/18] Add create_chat_link() function Muhammad Rizki
2022-07-29  0:45 ` [PATCH v2 17/18] Add /del_bc bot command Muhammad Rizki
2022-07-29  0:45 ` [PATCH v2 18/18] Add del_chat callback query Muhammad Rizki
2022-07-29  0:57 ` [PATCH v2 00/18] New feature to handle atom URLs and broadcast Ammar Faizi
2022-07-29  1:01   ` Muhammad Rizki
2022-07-29  1:06     ` Ammar Faizi
  -- strict thread matches above, loose matches on Subject: below --
2022-07-29  0:40 [PATCH v1 " Muhammad Rizki
2022-07-29  0:40 ` [PATCH v2 16/18] Add create_chat_link() function Muhammad Rizki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox