rpa-suite 0.8.5__tar.gz → 0.8.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/PKG-INFO +3 -3
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/README.md +2 -2
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/email/sender_smtp.py +19 -2
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/file/counter.py +1 -1
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/regex/list_from_text.py +1 -1
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite.egg-info/PKG-INFO +3 -3
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/setup.py +1 -1
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/LICENSE +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/__init__.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/clock/__init__.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/clock/exec_at.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/clock/waiter.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/date/__init__.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/date/date.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/email/__init__.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/file/__init__.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/file/temp_dir.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/log/__init__.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/log/loggin.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/log/printer.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/regex/__init__.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/suite.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/validate/__init__.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/validate/mail_validator.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite/validate/string_validator.py +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite.egg-info/SOURCES.txt +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite.egg-info/dependency_links.txt +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite.egg-info/requires.txt +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/rpa_suite.egg-info/top_level.txt +0 -0
- {rpa_suite-0.8.5 → rpa_suite-0.8.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: rpa_suite
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.7
|
4
4
|
Summary: Conjunto de ferramentas essenciais para Automação RPA com Python, que facilitam o dia a dia de desenvolvimento.
|
5
5
|
Author: Camilo Costa de Carvalho
|
6
6
|
Author-email: camilo.carvalho@triasoftware.com.br
|
@@ -150,9 +150,9 @@ O módulo principal do rpa-suite é dividido em categorias. Cada categoria cont
|
|
150
150
|
- **string_validator** - Funções para validação/varredura (strings, substrings, palavras)
|
151
151
|
|
152
152
|
## Release
|
153
|
-
Versão: **Alpha 0.8.
|
153
|
+
Versão: **Alpha 0.8.7**
|
154
154
|
|
155
|
-
Lançamento: *
|
155
|
+
Lançamento: *29/01/2024*
|
156
156
|
|
157
157
|
Status: Em desenvolvimento.
|
158
158
|
|
@@ -125,9 +125,9 @@ O módulo principal do rpa-suite é dividido em categorias. Cada categoria cont
|
|
125
125
|
- **string_validator** - Funções para validação/varredura (strings, substrings, palavras)
|
126
126
|
|
127
127
|
## Release
|
128
|
-
Versão: **Alpha 0.8.
|
128
|
+
Versão: **Alpha 0.8.7**
|
129
129
|
|
130
|
-
Lançamento: *
|
130
|
+
Lançamento: *29/01/2024*
|
131
131
|
|
132
132
|
Status: Em desenvolvimento.
|
133
133
|
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import smtplib, os
|
2
|
+
from email.mime.image import MIMEImage
|
2
3
|
from email.mime.multipart import MIMEMultipart
|
3
4
|
from email.mime.text import MIMEText
|
4
5
|
from email.mime.base import MIMEBase
|
5
6
|
from email import encoders
|
6
|
-
from rpa_suite.log.printer import error_print, success_print
|
7
|
+
from rpa_suite.log.printer import alert_print, error_print, success_print
|
7
8
|
from rpa_suite.validate.mail_validator import email_validator
|
8
9
|
|
9
10
|
def send_email(
|
@@ -12,6 +13,7 @@ def send_email(
|
|
12
13
|
email_to: list[str],
|
13
14
|
subject_title: str,
|
14
15
|
body_message: str,
|
16
|
+
image_footer: str = None,
|
15
17
|
attachments: list[str] = None,
|
16
18
|
type_content: str = 'html',
|
17
19
|
smtp_server: str = 'smtp.office365.com',
|
@@ -29,6 +31,7 @@ def send_email(
|
|
29
31
|
``email_to: list[str]`` - list of emails to which the emails will be sent.
|
30
32
|
``subject_title: str`` - email title.
|
31
33
|
``body_message: str``- body message of the email.
|
34
|
+
``image_footer: str`` - image footer of body message of the email.
|
32
35
|
``attachments: list[str]`` - list with path of attachments if any. (default None).
|
33
36
|
``type_content: str`` - type of message content can be 'plain' or 'html' (default 'html').
|
34
37
|
``smtp_server: str`` - server to be used to connect with the email account (default 'smtp.office365.com')
|
@@ -59,6 +62,7 @@ def send_email(
|
|
59
62
|
``email_to: list[str]`` - lista de emails para os quais serão enviados os emails.
|
60
63
|
``subject_title: str`` - titulo do email.
|
61
64
|
``body_message: str``- mensagem do corpo do email.
|
65
|
+
``image_footer: str`` - imagem de rodapé do corpo do email.
|
62
66
|
``attachments: list[str]`` - lista com caminho de anexos se houver. (default None).
|
63
67
|
``type_content: str`` - tipo de conteudo da mensagem pode ser 'plain' ou 'html' (default 'html').
|
64
68
|
``smtp_server: str`` - servidor a ser utilizado para conectar com a conta de email (default 'smtp.office365.com')
|
@@ -102,7 +106,20 @@ def send_email(
|
|
102
106
|
|
103
107
|
# Email Body Content
|
104
108
|
msg.attach(MIMEText(body_message, type_content))
|
105
|
-
|
109
|
+
|
110
|
+
# Add image Footer
|
111
|
+
if image_footer:
|
112
|
+
try:
|
113
|
+
with open(image_footer, 'rb') as img:
|
114
|
+
msg_image = MIMEImage(img.read())
|
115
|
+
msg_image.add_header('Content-ID', '<logo>')
|
116
|
+
# Notice: Content-ID correlact at "cid" on tag <img> at body mail
|
117
|
+
msg.attach(msg_image)
|
118
|
+
except FileNotFoundError as e:
|
119
|
+
alert_print(f'File Not Found! Error: {str(e)}')
|
120
|
+
except Exception as e:
|
121
|
+
error_print(f'An Error ocurred, during set image: <{image_footer}> as MIMEImage! Error: {str(e)}')
|
122
|
+
|
106
123
|
# Add Attachment
|
107
124
|
if attachments:
|
108
125
|
result['attchament'] = True
|
@@ -56,7 +56,7 @@ def count_files(
|
|
56
56
|
if file.endswith(f'.{type_extension}'):
|
57
57
|
result['qt'] += 1
|
58
58
|
result['success'] = True
|
59
|
-
success_print(f'Function: {count_files.__name__} counted {result[
|
59
|
+
success_print(f'Function: {count_files.__name__} counted {result["qt"]} files.')
|
60
60
|
|
61
61
|
except Exception as e:
|
62
62
|
result['success'] = False
|
@@ -12,7 +12,7 @@ def create_list_using_regex(origin_text: str, division_pattern: str) -> list[str
|
|
12
12
|
|
13
13
|
Description: pt-br
|
14
14
|
----------
|
15
|
-
Função responsável por buscar em uma string ``origin_text`` um padrão ``division_pattern`` e dividir o texto original em substrings gerando uma lista de strings, também faz a limpeza e tratamento para manter a lista com as strings originais, porem dividas
|
15
|
+
Função responsável por buscar em um texto de leitura humana uma string ``origin_text`` por um padrão ``division_pattern`` e dividir o texto original em substrings gerando uma lista de strings, também faz a limpeza e tratamento para manter a lista com as strings originais, porem dividas
|
16
16
|
|
17
17
|
Retorno:
|
18
18
|
----------
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: rpa-suite
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.7
|
4
4
|
Summary: Conjunto de ferramentas essenciais para Automação RPA com Python, que facilitam o dia a dia de desenvolvimento.
|
5
5
|
Author: Camilo Costa de Carvalho
|
6
6
|
Author-email: camilo.carvalho@triasoftware.com.br
|
@@ -150,9 +150,9 @@ O módulo principal do rpa-suite é dividido em categorias. Cada categoria cont
|
|
150
150
|
- **string_validator** - Funções para validação/varredura (strings, substrings, palavras)
|
151
151
|
|
152
152
|
## Release
|
153
|
-
Versão: **Alpha 0.8.
|
153
|
+
Versão: **Alpha 0.8.7**
|
154
154
|
|
155
|
-
Lançamento: *
|
155
|
+
Lançamento: *29/01/2024*
|
156
156
|
|
157
157
|
Status: Em desenvolvimento.
|
158
158
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='rpa_suite',
|
5
|
-
version='0.8.
|
5
|
+
version='0.8.7',
|
6
6
|
packages=find_packages(),
|
7
7
|
description='Conjunto de ferramentas essenciais para Automação RPA com Python, que facilitam o dia a dia de desenvolvimento.',
|
8
8
|
long_description_content_type='text/markdown',
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|