]> us-delaporte.pagekite.me Git - dotfiles.git/commitdiff
Add invoke file for common tasks
authorEdward <delaport@illinois.edu>
Wed, 26 Nov 2025 17:38:03 +0000 (11:38 -0600)
committerEdward <delaport@illinois.edu>
Wed, 26 Nov 2025 17:38:03 +0000 (11:38 -0600)
files/ts/bashrc
files/ts/tasks.py [new file with mode: 0644]

index 4300d7401acee3b84953dd50c9f6735eba600db5..56d0ff2eeea8facbdbdd654c350cbe385eb9bed8 100644 (file)
@@ -122,3 +122,8 @@ export PYENV_ROOT="$HOME/.pyenv"
 eval "$(pyenv init - bash)"
 eval "$(pyenv virtualenv-init -)"
 eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
+
+source $HOME/envs/invoke/bin/activate
+
+# from invoke --print-completion-script bash > ~/.invoke-complete.sh
+source $HOME/.invoke-complete.sh
diff --git a/files/ts/tasks.py b/files/ts/tasks.py
new file mode 100644 (file)
index 0000000..5e50693
--- /dev/null
@@ -0,0 +1,61 @@
+# This file is meant to sit in ~ for use from all shells.
+from invoke import task
+
+from datetime import datetime as dt
+import os
+
+HOME = os.path.expanduser('~')
+
+TODAY = dt.now().strftime('%Y.%m.%d')
+
+def browse(c, url):
+    c.run(f"firefox {url}")
+
+
+def code(c, path):
+    c.run(f"codium {path}")
+
+
+@task
+def debug(c):
+    result = c.run('which minetest')
+    print(result.ok)
+
+
+@task
+def vasl(c):
+    '''Submit time off'''
+    c.run(f"firefox https://my.techservices.illinois.edu/vacation/submitdays.asp")
+    browse(c, "https://outlook.office.com/calendar/view/week")
+
+
+@task(vasl)
+def timesheets(c):
+    '''Reconcile time off between reporting systems'''
+    browse(c, "https://outlook.office.com/calendar/view/month")
+    code(c, f"{HOME}/src/Learn_RobotFramework_IllinoisPTR")
+
+
+@task
+def status(c):
+    '''Check on status of priorities'''
+    browse('https://github.com/orgs/techservicesillinois/projects/10')
+
+
+@task
+def backlog(c):
+    '''Prep for backlog grooming'''
+    browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/7')
+
+JOURNAL = f"{HOME}/Journal"
+
+@task
+def retro(c):
+
+    retro_file = f'{JOURNAL}/{TODAY}.Retro.md'
+    if(not os.path.exists(retro_file)):
+       c.run(f'{HOME}/envs/jinja/bin/jinja2 -D DATE={TODAY} {JOURNAL}/Retro.Template.md > {retro_file}')
+
+    code(c, retro_file)
+
+