]>
apps.delaporte.us Git - dotfiles.git/blob - 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
4 from invoke
import task
6 from datetime
import datetime
as dt
9 HOME
= os
.path
.expanduser('~')
11 TODAY
= dt
.now().strftime('%Y.%m.%d')
12 MONTH
= dt
.now().strftime('%m')
13 YEAR
= dt
.now().strftime('%Y')
14 JOURNAL
= f
"{HOME}/Journal/{YEAR}"
16 SECDEV_LIMITED
=os
.environ
.get('SECDEV_LIMITED')
17 SECDEV_MESSAGE_TEMPLATES
=os
.environ
.get('SECDEV_MESSAGE_TEMPLATES')
18 EPICS
=os
.environ
.get('URL_EPICS')
19 MESSAGE_TEMPLATES
=os
.environ
.get('URL_MESSAGE_TEMPLATES')
20 OLLAMA
=os
.environ
.get('OLLAMA')
22 # Helper functions for a consistent experience
26 code(c
, f
'{HOME}/Journal')
30 c
.run(f
"firefox {url}", asynchronous
=True)
34 c
.run(f
"codium {path}", asynchronous
=True)
44 result
= c
.run('which minetest')
54 browse(c
, "https://outlook.office.com/calendar/view/week")
60 browse(c
, "https://my.techservices.illinois.edu/vacation/submitdays.asp")
61 browse(c
, "https://outlook.office.com/calendar/view/week")
66 '''Reconcile time off between reporting systems'''
67 browse(c
, "https://outlook.office.com/calendar/view/month")
68 code(c
, f
"{HOME}/src/Learn_RobotFramework_IllinoisPTR")
69 browse(c
, "http://go.illinois.edu/techservtimeentry")
73 '''Open daily reminders file for this month'''
74 code(c
, f
'{JOURNAL}/{MONTH}-daily.md')
80 '''Show in progress items on the Kan-Ban board'''
81 browse(c
, 'https://github.com/orgs/techservicesillinois/projects/10/views/11')
84 @task(daily
, in_progress
)
86 '''Check on status of priorities'''
95 '''Prep for backlog grooming'''
96 browse(c
, 'https://github.com/orgs/techservicesillinois/projects/10/views/7')
101 '''Prep for team retrospective meeting'''
103 # Create and open retro notes file
104 retro_file
= f
'{JOURNAL}/{TODAY}.Retro.md'
105 if(not os
.path
.exists(retro_file
)):
106 c
.run(f
'{HOME}/envs/jinja/bin/jinja2 -D DATE={TODAY} {JOURNAL}/Retro.Template.md > {retro_file}')
109 # Close issues this sprint
110 browse(c
, 'https://github.com/orgs/techservicesillinois/projects/10/views/5')
112 # Shared folder for archiving Retro notes
113 browse(c
, SECDEV_LIMITED
)
117 def engagements_ods(c
):
118 '''For recording engagements'''
119 c
.run(f
'soffice {JOURNAL}/Data/engagements.ods', asynchronous
=True)
120 # TODO: Launch Jupyter container on this folder as well
124 raise NotImplementedError()
125 # TODO: Add GH command to gather latest data files.
128 @task(engagements_ods
)
130 '''For recording team wins'''
131 code(c
, f
'{JOURNAL}/{YEAR}-Wins.md')
135 browse(c
, 'https://github.com/orgs/techservicesillinois/projects/10?pane=info')
139 browse(c
, SECDEV_LIMITED
)
141 @task(engagements_ods
, calendar_week
)
143 # Cybersecrity Development Message Templates
144 browse(c
, SECDEV_MESSAGE_TEMPLATES
)
149 '''Run a copy of intentionally vulnerable OWASP Juice Shop web app, for demonstrations'''
150 c
.run('podman run -d -p 3000:3000 bkimminich/juice-shop', asynchronous
=True)
151 print('Visit localhost:3000 for juice shop.')
156 code(c
, f
'{JOURNAL}/bookmarks.md')
160 def message_templates(c
):
161 browse(c
, MESSAGE_TEMPLATES
)
165 print(f
'ssh -t {OLLAMA} "ollama run glm-4.7-flash"')