Compare commits
2 commits
3fdad99cd0
...
ec2e79b59f
Author | SHA1 | Date | |
---|---|---|---|
ec2e79b59f | |||
c43534df7d |
3 changed files with 17 additions and 2 deletions
9
example.settings.ini
Normal file
9
example.settings.ini
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[pomodoro]
|
||||||
|
logfile =
|
||||||
|
logpath = /home/example/Projects/agaric/pomodoroprompt/log/
|
||||||
|
latest_recorded =
|
||||||
|
second_latest_recorded =
|
||||||
|
|
||||||
|
[harvest]
|
||||||
|
profile_first_name = Given
|
||||||
|
profile_last_name = Surname
|
|
@ -287,8 +287,8 @@ unknown = tl[~tl.project.isin(replacement_project_names.keys())]
|
||||||
|
|
||||||
harvest = hrvst.rename(columns = {'date': 'Date', 'project': 'Project', 'subproject': 'Task', 'description': 'Notes'})
|
harvest = hrvst.rename(columns = {'date': 'Date', 'project': 'Project', 'subproject': 'Task', 'description': 'Notes'})
|
||||||
harvest["Hours"] = harvest["time"]/60
|
harvest["Hours"] = harvest["time"]/60
|
||||||
harvest["First name"] = "Benjamin"
|
harvest["First name"] = settings.harvest_get_profile_firstname()
|
||||||
harvest["Last name"] = "Melançon"
|
harvest["Last name"] = settings.harvest_get_profile_lastname()
|
||||||
project_client_mapping = settings.harvest_get_projects_clients_map()
|
project_client_mapping = settings.harvest_get_projects_clients_map()
|
||||||
harvest["Client"] = harvest["Project"].map(project_client_mapping)
|
harvest["Client"] = harvest["Project"].map(project_client_mapping)
|
||||||
harvest.drop(columns = ['started', 'recorded', 'time'], inplace=True)
|
harvest.drop(columns = ['started', 'recorded', 'time'], inplace=True)
|
||||||
|
|
|
@ -53,3 +53,9 @@ def harvest_get_projects_clients_map():
|
||||||
return json.loads(harvest['projects_clients'])
|
return json.loads(harvest['projects_clients'])
|
||||||
else:
|
else:
|
||||||
sys.exit("No project clients available; run fetch_clients_projects.py")
|
sys.exit("No project clients available; run fetch_clients_projects.py")
|
||||||
|
|
||||||
|
def harvest_get_profile_firstname():
|
||||||
|
return config['harvest']['profile_first_name']
|
||||||
|
|
||||||
|
def harvest_get_profile_lastname():
|
||||||
|
return config['harvest']['profile_last_name']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue