OB_Connector

This commit is contained in:
Fred Boniface 2024-02-18 00:02:24 +00:00
parent 82f885466e
commit ef8b8f1fd2
2 changed files with 25 additions and 1 deletions

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
lxml==5.1.0
python-docx-2023==0.2.17

View File

@ -7,4 +7,26 @@
from imap_connector import IMAPConnector from imap_connector import IMAPConnector
imap_connector = IMAPConnector() imap_connector = IMAPConnector()
imap_connector.fetch_filtered_emails("no-reply@owlboard.info")
def check_registration():
## First check env var `DGP_OB_UUID`
## Then run a test query, if not unauthorized return TRUE
## else FALSE.
uuid = os.environ.get('DGP_OB_UUID')
if not uuid:
return False
### Now run test query and if return not 200 return false.
return
def register():
## Send registration Req
## Keep checking IMAP until reg email received
## Submit Reg confirmation
## Save UUID to env var `DGP_OB_UUID`
return
## INIT
is_registered = check_registration()
if not is_registered:
register()