]> apps.delaporte.us Git - dotfiles.git/blob - files/ts/tasks.py
Updates
[dotfiles.git] / files / ts / tasks.py
1 # This file is meant to sit in ~ for use from all shells.
2 from invoke import task
3
4 from datetime import datetime as dt
5 import os
6
7 HOME = os.path.expanduser('~')
8
9 TODAY = dt.now().strftime('%Y.%m.%d')
10
11 def browse(c, url):
12 c.run(f"firefox {url}")
13
14
15 def code(c, path):
16 c.run(f"codium {path}")
17
18
19 def folder(c, path):
20 c.run(f"nemo {path}")
21
22
23
24 @task
25 def debug(c):
26 result = c.run('which minetest')
27 print(result.ok)
28
29
30 @task
31 def vasl(c):
32 '''Submit time off'''
33 c.run(f"firefox https://my.techservices.illinois.edu/vacation/submitdays.asp")
34 browse(c, "https://outlook.office.com/calendar/view/week")
35
36
37 @task(vasl)
38 def timesheets(c):
39 '''Reconcile time off between reporting systems'''
40 browse(c, "https://outlook.office.com/calendar/view/month")
41 code(c, f"{HOME}/src/Learn_RobotFramework_IllinoisPTR")
42
43
44 @task
45 def status(c):
46 '''Check on status of priorities'''
47 browse('https://github.com/orgs/techservicesillinois/projects/10')
48
49
50 @task
51 def backlog(c):
52 '''Prep for backlog grooming'''
53 browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/7')
54
55 JOURNAL = f"{HOME}/Journal"
56
57 @task
58 def retro(c):
59
60 retro_file = f'{JOURNAL}/{TODAY}.Retro.md'
61 if(not os.path.exists(retro_file)):
62 c.run(f'{HOME}/envs/jinja/bin/jinja2 -D DATE={TODAY} {JOURNAL}/Retro.Template.md > {retro_file}')
63
64 code(c, retro_file)
65
66