Make it cross-platform fit
This commit is contained in:
@@ -5,6 +5,7 @@ import locale
|
||||
import datetime
|
||||
import yaml
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
#TODO: Upload automatically!
|
||||
|
||||
@@ -52,12 +53,13 @@ def export_timesheet(csvexport_filename, ex: Export):
|
||||
else:
|
||||
print(f"File {file_path} contains data and was not deleted.")
|
||||
|
||||
locale.setlocale(locale.LC_ALL, 'de_DE')
|
||||
locale.setlocale(locale.LC_ALL, 'de_AT.UTF-8')
|
||||
|
||||
with open("./app/config.yaml", encoding='utf8') as f:
|
||||
cfg = yaml.load(f, Loader=yaml.FullLoader)
|
||||
|
||||
gc = gspread.service_account()
|
||||
home = Path.home()
|
||||
gc = gspread.service_account(home / "service_account.json")
|
||||
sh = gc.open(cfg['spreadsheet_name'])
|
||||
worksheet = sh.worksheet(cfg['worksheet_name'])
|
||||
week = cfg['week'] # 10, 11, 12 or None
|
||||
|
||||
Reference in New Issue
Block a user