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