Spaces:
Sleeping
Sleeping
Update google_sheet_Legend.py
Browse files- google_sheet_Legend.py +5 -4
google_sheet_Legend.py
CHANGED
|
@@ -72,9 +72,9 @@ def update_sheet(spreadsheetId, SimilarAreaDictionary, pdfpath):
|
|
| 72 |
splittedpdfpath = re.split(r'[`\-=~!@#$%^&*()_+\[\]{};\'\\:"|<,/<>?]', pdfpath)
|
| 73 |
if splittedpdfpath[-2].startswith('2.2') or splittedpdfpath[-2].startswith('2.1'):
|
| 74 |
worksheet.set_dataframe(start='A1', df=SimilarAreaDictionary)
|
| 75 |
-
if splittedpdfpath[-2].startswith('2.8')
|
| 76 |
-
|
| 77 |
-
|
| 78 |
|
| 79 |
else:
|
| 80 |
top_header_format = [
|
|
@@ -148,7 +148,7 @@ def update_sheet(spreadsheetId, SimilarAreaDictionary, pdfpath):
|
|
| 148 |
[SimilarAreaDictionary['R'].iloc[i], SimilarAreaDictionary['G'].iloc[i], SimilarAreaDictionary['B'].iloc[i]]
|
| 149 |
for i in range(len(SimilarAreaDictionary))
|
| 150 |
]
|
| 151 |
-
elif splittedpdfpath[-2].startswith('3.2') or splittedpdfpath[-2].startswith('3.3'):
|
| 152 |
colorsUsed = list(SimilarAreaDictionary['Color'])
|
| 153 |
rowsLen = len(SimilarAreaDictionary.values.tolist())
|
| 154 |
lastcell = worksheet.cell((rowsLen + 2, 1))
|
|
@@ -686,6 +686,7 @@ def deletefromlegend(deletedrows, SimilarAreaDictionarycopy, section, areaPermAr
|
|
| 686 |
|
| 687 |
#########################
|
| 688 |
def DoorsLegend(Dictionary,spreadsheetId):
|
|
|
|
| 689 |
global worksheetw
|
| 690 |
worksheetw.clear()
|
| 691 |
top_header_format = [
|
|
|
|
| 72 |
splittedpdfpath = re.split(r'[`\-=~!@#$%^&*()_+\[\]{};\'\\:"|<,/<>?]', pdfpath)
|
| 73 |
if splittedpdfpath[-2].startswith('2.2') or splittedpdfpath[-2].startswith('2.1'):
|
| 74 |
worksheet.set_dataframe(start='A1', df=SimilarAreaDictionary)
|
| 75 |
+
# if splittedpdfpath[-2].startswith('2.8'):
|
| 76 |
+
# DoorsLegend(SimilarAreaDictionary,spreadsheetId)
|
| 77 |
+
# return
|
| 78 |
|
| 79 |
else:
|
| 80 |
top_header_format = [
|
|
|
|
| 148 |
[SimilarAreaDictionary['R'].iloc[i], SimilarAreaDictionary['G'].iloc[i], SimilarAreaDictionary['B'].iloc[i]]
|
| 149 |
for i in range(len(SimilarAreaDictionary))
|
| 150 |
]
|
| 151 |
+
elif splittedpdfpath[-2].startswith('3.2') or splittedpdfpath[-2].startswith('3.3') or splittedpdfpath[-2].startswith('2.7'):
|
| 152 |
colorsUsed = list(SimilarAreaDictionary['Color'])
|
| 153 |
rowsLen = len(SimilarAreaDictionary.values.tolist())
|
| 154 |
lastcell = worksheet.cell((rowsLen + 2, 1))
|
|
|
|
| 686 |
|
| 687 |
#########################
|
| 688 |
def DoorsLegend(Dictionary,spreadsheetId):
|
| 689 |
+
print('id',spreadsheetId)
|
| 690 |
global worksheetw
|
| 691 |
worksheetw.clear()
|
| 692 |
top_header_format = [
|