Merge branch 'dev' into refactor-configs

This commit is contained in:
msramalho
2022-06-02 17:30:47 +02:00
15 changed files with 512 additions and 43 deletions

View File

@@ -10,6 +10,7 @@ class GWorksheet:
"""
COLUMN_NAMES = {
'url': 'link',
'subfolder': 'sub folder',
'archive': 'archive location',
'date': 'archive date',
'status': 'archive status',
@@ -71,6 +72,15 @@ class GWorksheet:
return ''
return row[col_index]
def get_cell_or_default(self, row, col: str, default: str = None, fresh=False):
"""
return self.get_cell or default value on error (eg: column is missing)
"""
try:
return self.get_cell(row, col, fresh)
except:
return default
def set_cell(self, row: int, col: str, val):
# row is 1-based
col_index = self._col_index(col) + 1