OB_Connector
This commit is contained in:
parent
82f885466e
commit
ef8b8f1fd2
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
lxml==5.1.0
|
||||
python-docx-2023==0.2.17
|
@ -7,4 +7,26 @@
|
||||
from imap_connector import 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()
|
Reference in New Issue
Block a user