Spaces:
Sleeping
Sleeping
Update dxf__omar3_2.py
Browse files- dxf__omar3_2.py +11 -2
dxf__omar3_2.py
CHANGED
|
@@ -37,6 +37,7 @@ from ezdxf.math import Vec2
|
|
| 37 |
import random
|
| 38 |
import pandas as pd
|
| 39 |
import google_sheet_Legend
|
|
|
|
| 40 |
|
| 41 |
"""## Notes"""
|
| 42 |
|
|
@@ -428,6 +429,14 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,pdfpath,pdfname):
|
|
| 428 |
image_new1 = cv2.addWeighted(Correct_img, alpha, img, 1 - alpha, 0)
|
| 429 |
SimilarAreaDictionary = SimilarAreaDictionary.fillna(' ')
|
| 430 |
gc,spreadsheet_service,spreadsheetId, spreadsheet_url , namepathArr=google_sheet_Legend.legendGoogleSheets(SimilarAreaDictionary , pdfname,pdfpath)
|
| 431 |
-
|
| 432 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 433 |
|
|
|
|
| 37 |
import random
|
| 38 |
import pandas as pd
|
| 39 |
import google_sheet_Legend
|
| 40 |
+
import tsadropboxretrieval
|
| 41 |
|
| 42 |
"""## Notes"""
|
| 43 |
|
|
|
|
| 429 |
image_new1 = cv2.addWeighted(Correct_img, alpha, img, 1 - alpha, 0)
|
| 430 |
SimilarAreaDictionary = SimilarAreaDictionary.fillna(' ')
|
| 431 |
gc,spreadsheet_service,spreadsheetId, spreadsheet_url , namepathArr=google_sheet_Legend.legendGoogleSheets(SimilarAreaDictionary , pdfname,pdfpath)
|
| 432 |
+
# dbxTeam=tsadropboxretrieval.ADR_Access_DropboxTeam('user')
|
| 433 |
+
# md, res =dbxTeam.files_download(path= pdfpath+pdfname)
|
| 434 |
+
# data = res.content
|
| 435 |
+
# doc=fitz.open("pdf", data)
|
| 436 |
+
# list1=pd.DataFrame(columns=['content', 'creationDate', 'id', 'modDate', 'name', 'subject', 'title'])
|
| 437 |
+
list1=pd.DataFrame(columns=['content', 'id', 'subject'])
|
| 438 |
+
for page in doc:
|
| 439 |
+
for annot in page.annots():
|
| 440 |
+
list1.loc[len(list1)] =annot.info
|
| 441 |
+
return doc,image_new1, SimilarAreaDictionary ,spreadsheetId, spreadsheet_url , namepathArr , list1
|
| 442 |
|