Compare commits
3 Commits
57f4c5bb83
...
a476daa7ea
| Author | SHA1 | Date |
|---|---|---|
|
|
a476daa7ea | 4 years ago |
|
|
1e77a2787e | 4 years ago |
|
|
546ef9393b | 4 years ago |
5 changed files with 94 additions and 2 deletions
Binary file not shown.
@ -1,3 +1,10 @@ |
|||||||
# aspin-pmo |
## aspin-pmo ## |
||||||
|
|
||||||
Projeto de automação do Escritório de Projetos Aspin |
**Por Adriano Baumart** |
||||||
|
Projeto de automação do Escritório de Projetos Aspin. |
||||||
|
|
||||||
|
|
||||||
|
### RELEASE NOTES ### |
||||||
|
v1.0.0 |
||||||
|
- Construção da estrutura de arquivos. |
||||||
|
- |
||||||
@ -0,0 +1,40 @@ |
|||||||
|
### PROJETOS ASPIN ####################### |
||||||
|
### Por Adriano Baumart |
||||||
|
### Versão: 1.0.0 Data: 26/09/2022 |
||||||
|
########################################### |
||||||
|
menu = [ |
||||||
|
{ |
||||||
|
'cod': 1, |
||||||
|
'opcao': 'ASPINBOTS' |
||||||
|
}, |
||||||
|
{ |
||||||
|
'cod': 2, |
||||||
|
'opcao': 'ASPIN' |
||||||
|
}, |
||||||
|
{ |
||||||
|
'cod': 3, |
||||||
|
'opcao': 'Enviar e-mails' |
||||||
|
} |
||||||
|
] |
||||||
|
|
||||||
|
# Menu principal |
||||||
|
while True: |
||||||
|
print('='* 52) |
||||||
|
print('ASPIN BOTS - Sitema de automação do Setor de Projetos') |
||||||
|
print('=' * 52) |
||||||
|
print('MENU PRINCIPAL') |
||||||
|
# Imprime o Menu |
||||||
|
for item in menu: |
||||||
|
print(f'[ {item["cod"]} ] - {item["opcao"]}') |
||||||
|
|
||||||
|
op = int(input('Opção (999 para Sair): ')) |
||||||
|
if op == 1: |
||||||
|
print('ASPINBOTS') |
||||||
|
elif op == 2: |
||||||
|
print('ASPIN') |
||||||
|
elif op == 3: |
||||||
|
# Enviar e-mails. |
||||||
|
print('MENU - Envio de e-mails') |
||||||
|
|
||||||
|
elif op == 999: |
||||||
|
break |
||||||
@ -0,0 +1,15 @@ |
|||||||
|
# Manipulando arquivos de Excell |
||||||
|
import pandas as pd |
||||||
|
from time import sleep |
||||||
|
arquivo = 'Chatbots-Controle.xlsx' |
||||||
|
aba = 'Em andamento' |
||||||
|
header = 0 |
||||||
|
file = pd.read_excel(arquivo, sheet_name=aba, header=header) |
||||||
|
|
||||||
|
#print(file['PROJETO']) |
||||||
|
cod = int(input('Código do Projeto: ')) |
||||||
|
|
||||||
|
for c in range(0, len(file)): |
||||||
|
#print(file['CLIENTE'][c]) |
||||||
|
if file['PROJETO'][c] == cod: |
||||||
|
print(f'Cliente: {file["CLIENTE"][c]}') |
||||||
@ -0,0 +1,30 @@ |
|||||||
|
import smtplib |
||||||
|
import email.message |
||||||
|
|
||||||
|
def enviar_email(): |
||||||
|
corpo_email = """ |
||||||
|
<p>Olá Mundo!</p> |
||||||
|
<p>Testes com Python</p> |
||||||
|
""" |
||||||
|
|
||||||
|
msg = email.message.Message() |
||||||
|
msg['Subject'] = "Testes com Python" |
||||||
|
msg['From'] = 'adriano.baumart@aspin.inf.br' |
||||||
|
msg['To'] = "tcheweb@gmail.com; adriano@baumart.com.br" |
||||||
|
password = 'As1453!@' |
||||||
|
msg.add_header('Content-Type', 'text/html') |
||||||
|
msg.set_payload(corpo_email) |
||||||
|
|
||||||
|
s = smtplib.SMTP('email-ssl.com.br: 587') |
||||||
|
s.starttls() |
||||||
|
# Login Credentials for sending the mail |
||||||
|
s.login(msg['From'], password) |
||||||
|
s.sendmail(msg['From'], [msg['To']], msg.as_string().encode('utf-8')) |
||||||
|
print('Email enviado') |
||||||
|
|
||||||
|
|
||||||
|
# In[ ]: |
||||||
|
|
||||||
|
|
||||||
|
enviar_email() |
||||||
|
|
||||||
Loading…
Reference in new issue