Update app.py
Browse files
app.py
CHANGED
|
@@ -942,7 +942,17 @@ def getdropdownValues(gc,spreadsheet_service,spreadsheetid):
|
|
| 942 |
return dropdownValues
|
| 943 |
|
| 944 |
def createGoogleSheet(LegendName):
|
| 945 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 946 |
|
| 947 |
# LegendName=getTitle(path)
|
| 948 |
spreadsheet_details = {
|
|
@@ -969,16 +979,6 @@ def createGoogleSheet(LegendName):
|
|
| 969 |
|
| 970 |
|
| 971 |
def legendGoogleSheets(path,SimilarAreaDictionary,colorsUsed,spreadsheetId,spreadsheet_service,gc):
|
| 972 |
-
# authorize uing json file
|
| 973 |
-
# SimilarAreaDictionary.drop(['Rounded', 'Width','Height','R','G','B'], axis=1, inplace=True)
|
| 974 |
-
SCOPES = [
|
| 975 |
-
'https://www.googleapis.com/auth/spreadsheets',
|
| 976 |
-
'https://www.googleapis.com/auth/drive'
|
| 977 |
-
]
|
| 978 |
-
credentials = service_account.Credentials.from_service_account_file('credentials.json', scopes=SCOPES)
|
| 979 |
-
spreadsheet_service = build('sheets', 'v4', credentials=credentials)
|
| 980 |
-
drive_service = build('drive', 'v3', credentials=credentials)
|
| 981 |
-
gc = pygsheets.authorize(custom_credentials=credentials, client_secret='credentials.json')
|
| 982 |
|
| 983 |
########
|
| 984 |
# legendTitle=getTitle(path)
|
|
|
|
| 942 |
return dropdownValues
|
| 943 |
|
| 944 |
def createGoogleSheet(LegendName):
|
| 945 |
+
# authorize uing json file
|
| 946 |
+
# SimilarAreaDictionary.drop(['Rounded', 'Width','Height','R','G','B'], axis=1, inplace=True)
|
| 947 |
+
SCOPES = [
|
| 948 |
+
'https://www.googleapis.com/auth/spreadsheets',
|
| 949 |
+
'https://www.googleapis.com/auth/drive'
|
| 950 |
+
]
|
| 951 |
+
credentials = service_account.Credentials.from_service_account_file('credentials.json', scopes=SCOPES)
|
| 952 |
+
spreadsheet_service = build('sheets', 'v4', credentials=credentials)
|
| 953 |
+
drive_service = build('drive', 'v3', credentials=credentials)
|
| 954 |
+
gc = pygsheets.authorize(custom_credentials=credentials, client_secret='credentials.json')
|
| 955 |
+
|
| 956 |
|
| 957 |
# LegendName=getTitle(path)
|
| 958 |
spreadsheet_details = {
|
|
|
|
| 979 |
|
| 980 |
|
| 981 |
def legendGoogleSheets(path,SimilarAreaDictionary,colorsUsed,spreadsheetId,spreadsheet_service,gc):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 982 |
|
| 983 |
########
|
| 984 |
# legendTitle=getTitle(path)
|