Updated imports cassue moved project to PyCharm, and started EmailClient class
This commit is contained in:
parent
0fa3b06d43
commit
1f9ec59e64
|
@ -0,0 +1,3 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="jdk" jdkName="Python 3.12" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
<component name="PyDocumentationSettings">
|
||||||
|
<option name="format" value="PLAIN" />
|
||||||
|
<option name="myDocStringFormat" value="Plain" />
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Black">
|
||||||
|
<option name="sdkName" value="Python 3.12" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/MutiFunctionProgramProject.iml" filepath="$PROJECT_DIR$/.idea/MutiFunctionProgramProject.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -1,4 +1,4 @@
|
||||||
from ui.centered_window import CenteredWindow
|
from src.ui.centered_window import CenteredWindow
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
import imaplib
|
||||||
|
import smtplib
|
||||||
|
from email.mime.text import MIMEText
|
||||||
|
from email.mime.multipart import MIMEMultipart
|
||||||
|
|
||||||
|
class EmailClient:
|
||||||
|
def __init__(self, imap_server, smtp_server, email, password, imap_port=993, smtp_port=587):
|
||||||
|
self.imap_server = imap_server
|
||||||
|
self.smtp_server = smtp_server
|
||||||
|
self.email = email
|
||||||
|
self.password = password
|
||||||
|
self.imap_port = imap_port
|
||||||
|
self.smtp_port = smtp_port
|
||||||
|
self.imap_conn = None
|
||||||
|
self.smtp_conn = None
|
||||||
|
self.connect_imap()
|
||||||
|
self.connect_smtp()
|
||||||
|
|
||||||
|
def connect_imap(self):
|
||||||
|
"""Conexión del servidor IMAP"""
|
||||||
|
self.imap_conn = imaplib.IMAP4_SSL(self.imap_server, self.imap_port)
|
||||||
|
self.imap_conn.login(self.email, self.password)
|
||||||
|
|
||||||
|
def connect_smtp(self):
|
||||||
|
"""Conexión del servidor SMTP"""
|
||||||
|
self.smtp_conn = smtplib.SMTP(self.smtp_server, self.smtp_port)
|
||||||
|
self.smtp_conn.starttls()
|
||||||
|
self.smtp_conn.login(self.email, self.password)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import vlc
|
import vlc
|
||||||
import time
|
import time
|
||||||
from services.threaden_task import ThreadenTask
|
from src.services.threaden_task import ThreadenTask
|
||||||
|
|
||||||
class RadioPlayer:
|
class RadioPlayer:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,7 +4,7 @@ from bs4 import BeautifulSoup
|
||||||
from urllib.parse import urljoin
|
from urllib.parse import urljoin
|
||||||
import mysql.connector
|
import mysql.connector
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
from services.threaden_task import ThreadenTask
|
from src.services.threaden_task import ThreadenTask
|
||||||
|
|
||||||
#http://books.toscrape.com/ test scrap web
|
#http://books.toscrape.com/ test scrap web
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import datetime
|
import datetime
|
||||||
import time
|
|
||||||
import requests
|
|
||||||
import random
|
import random
|
||||||
|
import time
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
from src.services.Radio_Player import RadioPlayer
|
||||||
|
from src.services.scrapper import Scrapper
|
||||||
|
from src.services.threaden_task import ThreadenTask
|
||||||
|
|
||||||
from services.threaden_task import ThreadenTask
|
|
||||||
from services.system_monitor import SystemMonitor
|
|
||||||
from services.tetris_game import TetrisGame
|
|
||||||
from services.scrapper import Scrapper
|
|
||||||
from services.Radio_Player import RadioPlayer
|
|
||||||
|
|
||||||
class ThreadsManager:
|
class ThreadsManager:
|
||||||
"""Constructor"""
|
"""Constructor"""
|
||||||
|
|
Binary file not shown.
|
@ -1,16 +1,11 @@
|
||||||
import customtkinter as ctk
|
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
import webbrowser
|
|
||||||
import subprocess
|
|
||||||
import os
|
|
||||||
import threading
|
|
||||||
from tkinter import filedialog
|
|
||||||
|
|
||||||
from services.threads_manager import ThreadsManager
|
import customtkinter as ctk
|
||||||
from services.processes_manager import ProcessManager
|
|
||||||
from services.tetris_game import TetrisGame
|
from src.services.processes_manager import ProcessManager
|
||||||
from services.system_monitor import SystemMonitor
|
from src.services.system_monitor import SystemMonitor
|
||||||
from services.Radio_Player import RadioPlayer
|
from src.services.tetris_game import TetrisGame
|
||||||
|
from src.services.threads_manager import ThreadsManager
|
||||||
|
|
||||||
|
|
||||||
class CenteredWindow(ctk.CTk):
|
class CenteredWindow(ctk.CTk):
|
||||||
|
|
Loading…
Reference in New Issue