Compare commits
No commits in common. "184e13b698cb174f5429834881b9f1d671ff5c26" and "e81c81c190216b07755f26d7c70054c11bc14323" have entirely different histories.
184e13b698
...
e81c81c190
15
main.py
15
main.py
@ -1,16 +1,13 @@
|
|||||||
import configparser
|
import configparser
|
||||||
from imaplib import IMAP4
|
from imaplib import IMAP4
|
||||||
import ssl
|
|
||||||
|
|
||||||
from sqlalchemy import create_engine
|
from sqlalchemy import create_engine
|
||||||
|
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser().read('config.ini')
|
||||||
config.read('config.ini')
|
db = create_engine(f"postgresql://{config['db'][1]}:{config['db'][2]}@{config['db'][0]}/{config['db'][3]}").connect()
|
||||||
|
mail = IMAP4(host=config['mail'][0])
|
||||||
|
|
||||||
db = create_engine(f"postgresql://{config['db']['username']}:{config['db']['password']}@{config['db']['host']}/{config['db']['database']}").connect()
|
|
||||||
|
|
||||||
mail = IMAP4(host=config['mail']['host'])
|
|
||||||
|
|
||||||
|
|
||||||
def init_database():
|
def init_database():
|
||||||
@ -19,15 +16,13 @@ def init_database():
|
|||||||
|
|
||||||
|
|
||||||
def get_gpx_files_from_mail():
|
def get_gpx_files_from_mail():
|
||||||
mail.starttls(ssl.create_default_context())
|
mail.login(config['mail'][1], config['mail'][2])
|
||||||
mail.login(config['mail']['username'], config['mail']['password'])
|
|
||||||
|
|
||||||
mail.logout()
|
mail.logout()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
init_database()
|
pass
|
||||||
get_gpx_files_from_mail()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user