]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - files/ts/tasks.py
Fix for ability to create corrupt .yaml
[dotfiles.git] / files / ts / tasks.py
index d51d8ed98ed404c31cc463f6b2a8a535b8d4520b..9fdeffe3b9586cd367c71d612a7884c84cbe93b1 100644 (file)
@@ -15,21 +15,24 @@ JOURNAL = f"{HOME}/Journal/{YEAR}"
 
 SECDEV_LIMITED=os.environ.get('SECDEV_LIMITED')
 SECDEV_MESSAGE_TEMPLATES=os.environ.get('SECDEV_MESSAGE_TEMPLATES')
 
 SECDEV_LIMITED=os.environ.get('SECDEV_LIMITED')
 SECDEV_MESSAGE_TEMPLATES=os.environ.get('SECDEV_MESSAGE_TEMPLATES')
-BOX_EPICS=os.environ.get('BOX_EPICS')
+EPICS=os.environ.get('URL_EPICS')
+MESSAGE_TEMPLATES=os.environ.get('URL_MESSAGE_TEMPLATES')
+OLLAMA=os.environ.get('OLLAMA')
 
 # Helper functions for a consistent experience
 
 @task 
 def journal(c):
 
 # Helper functions for a consistent experience
 
 @task 
 def journal(c):
-    code(c, f'{HOME}/Journal')
+    editor(c, f'{HOME}/Journal')
 
 
 def browse(c, url):
     c.run(f"firefox {url}", asynchronous=True)
 
 
 
 
 def browse(c, url):
     c.run(f"firefox {url}", asynchronous=True)
 
 
-def code(c, path):
-    c.run(f"codium {path}", asynchronous=True)
+def editor(c, path):
+    # c.run(f"codium {path}", asynchronous=True)
+    c.run(f"vi {path}", pty=True)
 
 
 def folder(c, path):
 
 
 def folder(c, path):
@@ -57,18 +60,20 @@ def vasl(c):
     '''Submit time off'''
     browse(c, "https://my.techservices.illinois.edu/vacation/submitdays.asp")
     browse(c, "https://outlook.office.com/calendar/view/week")
     '''Submit time off'''
     browse(c, "https://my.techservices.illinois.edu/vacation/submitdays.asp")
     browse(c, "https://outlook.office.com/calendar/view/week")
+    print('Ctrl+G to repeat a search in FF')
 
 
 @task(vasl)
 def timesheets(c):
     '''Reconcile time off between reporting systems'''
     browse(c, "https://outlook.office.com/calendar/view/month")
 
 
 @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")
+    editor(c, f"{HOME}/src/Learn_RobotFramework_IllinoisPTR")
+    browse(c, "http://go.illinois.edu/techservtimeentry")
 
 
-@task(journal)
+@task()
 def daily(c):
     '''Open daily reminders file for this month'''
 def daily(c):
     '''Open daily reminders file for this month'''
-    code(c, f'{JOURNAL}/{MONTH}-daily.md')
+    editor(c, f'{JOURNAL}/{MONTH}-daily.md')
 
 
 
 
 
 
@@ -77,11 +82,14 @@ def in_progress(c):
     '''Show in progress items on the Kan-Ban board'''
     browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/11')
 
     '''Show in progress items on the Kan-Ban board'''
     browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/11')
 
+@task
+def epics(c):
+    browse(c, EPICS)
+
 
 
-@task(daily, in_progress)
+@task(daily, in_progress, epics)
 def status(c):
     '''Check on status of priorities'''
 def status(c):
     '''Check on status of priorities'''
-    browse(c, BOX_EPICS)
     dash(c)
     pass
 
     dash(c)
     pass
 
@@ -96,25 +104,23 @@ def backlog(c):
 @task(journal)
 def retro(c):
     '''Prep for team retrospective meeting'''
 @task(journal)
 def retro(c):
     '''Prep for team retrospective meeting'''
+    # Close issues this sprint
+    browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/5')
+
+    # Shared folder for archiving Retro notes
+    browse(c, SECDEV_LIMITED)
 
     # Create and open retro notes file
     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}')
 
     # Create and open retro notes file
     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)
-
-    # Close issues this sprint
-    browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/5')
+    editor(c, retro_file)
 
 
-    # Shared folder for archiving Retro notes
-    browse(c, SECDEV_LIMITED)
 
 
 
 
-@task(journal)
+@task
 def engagements_ods(c):
     '''For recording engagements'''
 def engagements_ods(c):
     '''For recording engagements'''
-    c.run(f'soffice {JOURNAL}/Data/engagements.ods', asynchronous=True)
-    # TODO: Launch Jupyter container on this folder as well
 
 @task
 def gather_data(c):
 
 @task
 def gather_data(c):
@@ -122,10 +128,12 @@ def gather_data(c):
     # TODO: Add GH command to gather latest data files.
 
 
     # TODO: Add GH command to gather latest data files.
 
 
-@task(engagements_ods)
+@task
 def wins(c):
     '''For recording team wins'''
 def wins(c):
     '''For recording team wins'''
-    code(c, f'{JOURNAL}/{YEAR}-Wins.md')
+    editor(c, f'{JOURNAL}/{YEAR}-Wins.md')
+    c.run(f'soffice {JOURNAL}/Data/engagements.ods', asynchronous=True)
+
 
 @task
 def co_authors(c):
 
 @task
 def co_authors(c):
@@ -150,7 +158,15 @@ def juice_shop(c):
 
 @task
 def bookmarks(c):
 
 @task
 def bookmarks(c):
-    code(c, f'{JOURNAL}/bookmarks.md')
+    editor(c, f'{JOURNAL}/bookmarks.md')
+
 
 
+@task
+def message_templates(c):
+    browse(c, MESSAGE_TEMPLATES)
+
+@task
+def ollama(c):
+    print(f'ssh -t {OLLAMA} "ollama run glm-4.7-flash"')