]> us-delaporte.pagekite.me Git - dotfiles.git/blob - files/ts/tasks.py
Add invoke file for common tasks
[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 @task
20 def debug(c):
21 result = c.run('which minetest')
22 print(result.ok)
23
24
25 @task
26 def vasl(c):
27 '''Submit time off'''
28 c.run(f"firefox https://my.techservices.illinois.edu/vacation/submitdays.asp")
29 browse(c, "https://outlook.office.com/calendar/view/week")
30
31
32 @task(vasl)
33 def timesheets(c):
34 '''Reconcile time off between reporting systems'''
35 browse(c, "https://outlook.office.com/calendar/view/month")
36 code(c, f"{HOME}/src/Learn_RobotFramework_IllinoisPTR")
37
38
39 @task
40 def status(c):
41 '''Check on status of priorities'''
42 browse('https://github.com/orgs/techservicesillinois/projects/10')
43
44
45 @task
46 def backlog(c):
47 '''Prep for backlog grooming'''
48 browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/7')
49
50 JOURNAL = f"{HOME}/Journal"
51
52 @task
53 def retro(c):
54
55 retro_file = f'{JOURNAL}/{TODAY}.Retro.md'
56 if(not os.path.exists(retro_file)):
57 c.run(f'{HOME}/envs/jinja/bin/jinja2 -D DATE={TODAY} {JOURNAL}/Retro.Template.md > {retro_file}')
58
59 code(c, retro_file)
60
61