AIEmailAutomationUtility 0.0.28__py3-none-any.whl → 0.0.30__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- AIEmailAutomationUtility/Process_Category.py +36 -40
- {AIEmailAutomationUtility-0.0.28.dist-info → AIEmailAutomationUtility-0.0.30.dist-info}/METADATA +3 -3
- {AIEmailAutomationUtility-0.0.28.dist-info → AIEmailAutomationUtility-0.0.30.dist-info}/RECORD +6 -6
- {AIEmailAutomationUtility-0.0.28.dist-info → AIEmailAutomationUtility-0.0.30.dist-info}/LICENCE.txt +0 -0
- {AIEmailAutomationUtility-0.0.28.dist-info → AIEmailAutomationUtility-0.0.30.dist-info}/WHEEL +0 -0
- {AIEmailAutomationUtility-0.0.28.dist-info → AIEmailAutomationUtility-0.0.30.dist-info}/top_level.txt +0 -0
@@ -105,51 +105,47 @@ class Process_Category:
|
|
105
105
|
logger.log(f"fileName 107::: {fileName}")
|
106
106
|
logger.log(f"document_type 108::: {document_type}")
|
107
107
|
|
108
|
-
if
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
order_folder = os.path.join(document_type, today_date)
|
113
|
-
|
114
|
-
email_upload_document = Email_DocumentUploader()
|
115
|
-
if len(fileName) != 0:
|
116
|
-
file_path = os.path.join(order_folder, fileName) # Correct file path
|
108
|
+
if responseMethod == "Upload_Document":
|
109
|
+
# Get today's date folder path
|
110
|
+
today_date = datetime.today().strftime('%Y-%m-%d')
|
111
|
+
order_folder = os.path.join(document_type, today_date)
|
117
112
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
logger.log(f"Updated Parameters ::: {parameters}")
|
122
|
-
response_status, restAPI_Result = email_upload_document.email_document_upload(file, parameters)
|
123
|
-
logger.log(f"email_upload_document_response ::: {restAPI_Result}")
|
124
|
-
else:
|
125
|
-
document_type = "Order Email"
|
126
|
-
# Get today's date folder path
|
127
|
-
today_date = datetime.today().strftime('%Y-%m-%d')
|
128
|
-
order_folder = os.path.join(document_type, today_date)
|
113
|
+
email_upload_document = Email_DocumentUploader()
|
114
|
+
if len(fileName) != 0 and document_type != '':
|
115
|
+
file_path = os.path.join(order_folder, fileName) # Correct file path
|
129
116
|
|
117
|
+
with open(file_path, "rb") as file:
|
130
118
|
parameters["DOCUMENT_TYPE"] = document_type
|
131
|
-
logger.log(f"Updated Parameters ::: {parameters}")
|
132
|
-
new_fileName = self.create_file_from_emailBody(email_body, sender_email_addr, parameters)
|
133
|
-
new_file_path = os.path.join(order_folder, new_fileName)
|
134
119
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
if response_status == "200":
|
140
|
-
logger.log(f"Attachment uploaded successfully against Document ID: '{restAPI_Result}'.")
|
141
|
-
csv_data_status="Success",
|
142
|
-
csv_data_response=f"Attachment uploaded successfully against Document ID: '{restAPI_Result}'"
|
143
|
-
else:
|
144
|
-
logger.log(restAPI_Result)
|
145
|
-
csv_data_status="Fail",
|
146
|
-
csv_data_response=f"Attachment uploaded Failed against Document ID: '{restAPI_Result}'"
|
120
|
+
logger.log(f"Updated Parameters ::: {parameters}")
|
121
|
+
response_status, restAPI_Result = email_upload_document.email_document_upload(file, parameters)
|
122
|
+
logger.log(f"email_upload_document_response ::: {restAPI_Result}")
|
147
123
|
else:
|
148
|
-
|
149
|
-
|
124
|
+
document_type = "Order Email"
|
125
|
+
# Get today's date folder path
|
126
|
+
today_date = datetime.today().strftime('%Y-%m-%d')
|
127
|
+
order_folder = os.path.join(document_type, today_date)
|
128
|
+
|
129
|
+
parameters["DOCUMENT_TYPE"] = document_type
|
130
|
+
logger.log(f"Updated Parameters ::: {parameters}")
|
131
|
+
new_fileName = self.create_file_from_emailBody(email_body, sender_email_addr, parameters)
|
132
|
+
new_file_path = os.path.join(order_folder, new_fileName)
|
133
|
+
|
134
|
+
with open(new_file_path, "rb") as file:
|
135
|
+
response_status, restAPI_Result = email_upload_document.email_document_upload(file, parameters)
|
136
|
+
logger.log(f"email_upload_document_response ::: {restAPI_Result}")
|
137
|
+
|
138
|
+
if response_status == "200":
|
139
|
+
logger.log(f"Attachment uploaded successfully against Document ID: '{restAPI_Result}'.")
|
140
|
+
csv_data_status="Success",
|
141
|
+
csv_data_response=f"Attachment uploaded successfully against Document ID: '{restAPI_Result}'"
|
142
|
+
else:
|
143
|
+
logger.log(restAPI_Result)
|
144
|
+
csv_data_status="Fail",
|
145
|
+
csv_data_response=f"Attachment uploaded Failed against Document ID: '{restAPI_Result}'"
|
150
146
|
else:
|
151
|
-
|
152
|
-
|
147
|
+
message = f"Invalid response method received '{responseMethod}' for category : '{category}'"
|
148
|
+
raise ValueError(message)
|
153
149
|
|
154
150
|
elif category == "Quotation":
|
155
151
|
action_taken = f"Mail drafted for products rate"
|
@@ -171,7 +167,7 @@ class Process_Category:
|
|
171
167
|
|
172
168
|
product_determination=products
|
173
169
|
|
174
|
-
db_connection = sqlite3.connect('
|
170
|
+
db_connection = sqlite3.connect('database/fetchprice.db')
|
175
171
|
for product in products:
|
176
172
|
item_no = product.get("item_no", "").strip()
|
177
173
|
make = product.get("make", "").strip()
|
{AIEmailAutomationUtility-0.0.28.dist-info → AIEmailAutomationUtility-0.0.30.dist-info}/METADATA
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: AIEmailAutomationUtility
|
3
|
-
Version: 0.0.
|
4
|
-
Summary:
|
3
|
+
Version: 0.0.30
|
4
|
+
Summary: Get database access from local path for any system.
|
5
5
|
Author: Proteus Technology PVT. LTD.
|
6
6
|
Author-email: <apps@baseinformation.com>
|
7
7
|
Keywords: python,first package
|
@@ -13,4 +13,4 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
13
13
|
Classifier: Operating System :: Microsoft :: Windows
|
14
14
|
License-File: LICENCE.txt
|
15
15
|
|
16
|
-
|
16
|
+
Get database access from local path for any system.
|
{AIEmailAutomationUtility-0.0.28.dist-info → AIEmailAutomationUtility-0.0.30.dist-info}/RECORD
RENAMED
@@ -4,12 +4,12 @@ AIEmailAutomationUtility/Email_DocumentUploader.py,sha256=YJu4tuTHr0K-5vuds9gZfj
|
|
4
4
|
AIEmailAutomationUtility/Email_Draft.py,sha256=DcyBeDaE8CReKHnHxLiz-o2tDxuUgwy91c4k0qhQbVw,7749
|
5
5
|
AIEmailAutomationUtility/Email_Read.py,sha256=pRqc9295r_qqdfWIFJFG2XH9J-VlvO1E0yP3iv_cRV4,27802
|
6
6
|
AIEmailAutomationUtility/Email_Upload_Document.py,sha256=3bdkxfDlwoeRp-46KPw2Gs1dqBhEIoA1yE5GCudpdV8,1320
|
7
|
-
AIEmailAutomationUtility/Process_Category.py,sha256=
|
7
|
+
AIEmailAutomationUtility/Process_Category.py,sha256=zijeYAIy5fj3hXmRQ_1CEPuikw-ELNolxuaEdyJj5OY,43745
|
8
8
|
AIEmailAutomationUtility/Save_Draft.py,sha256=yzLgFN14I_lXE6qL0I3tKNduvcnWdbsY9i2mKdTtio4,5348
|
9
9
|
AIEmailAutomationUtility/Save_Transaction.py,sha256=Gg1w6hhzHmEFjsuzYvkq-3-EsWReetjLHsYSv5YIGgM,3816
|
10
10
|
AIEmailAutomationUtility/__init__.py,sha256=Jad3IdPRsVMeLqEEh-FbCrc1lE2tzJO2DTG5Hgmxh5g,391
|
11
|
-
AIEmailAutomationUtility-0.0.
|
12
|
-
AIEmailAutomationUtility-0.0.
|
13
|
-
AIEmailAutomationUtility-0.0.
|
14
|
-
AIEmailAutomationUtility-0.0.
|
15
|
-
AIEmailAutomationUtility-0.0.
|
11
|
+
AIEmailAutomationUtility-0.0.30.dist-info/LICENCE.txt,sha256=2qX9IkEUBx0VJp1Vh9O2dsRwE-IpYId0lXDyn7OVsJ8,1073
|
12
|
+
AIEmailAutomationUtility-0.0.30.dist-info/METADATA,sha256=pzhpoUozUqOinZaKi0dn4qEi4md36AQa4lGD3wqJq94,603
|
13
|
+
AIEmailAutomationUtility-0.0.30.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
14
|
+
AIEmailAutomationUtility-0.0.30.dist-info/top_level.txt,sha256=3jTWrTUblVkaP7mpwY2UBSnrlfot5Ykpfsehyke-Uzw,25
|
15
|
+
AIEmailAutomationUtility-0.0.30.dist-info/RECORD,,
|
{AIEmailAutomationUtility-0.0.28.dist-info → AIEmailAutomationUtility-0.0.30.dist-info}/LICENCE.txt
RENAMED
File without changes
|
{AIEmailAutomationUtility-0.0.28.dist-info → AIEmailAutomationUtility-0.0.30.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|