X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/blobdiff_plain/c8ad4de7c70926e41526f772eeb9dc0cbe79f7b6..f860589a4837b40755d334765cb167c1c4377999:/files/ts/tasks.py diff --git a/files/ts/tasks.py b/files/ts/tasks.py index 5e50693..e35b5e1 100644 --- a/files/ts/tasks.py +++ b/files/ts/tasks.py @@ -1,4 +1,6 @@ # This file is meant to sit in ~ for use from all shells. +# ln -s ~/dotfiles/files/ts/tasks.py ~/tasks.py + from invoke import task from datetime import datetime as dt @@ -7,21 +9,44 @@ import os HOME = os.path.expanduser('~') TODAY = dt.now().strftime('%Y.%m.%d') +MONTH = dt.now().strftime('%m') +YEAR = dt.now().strftime('%Y') +JOURNAL = f"{HOME}/Journal/{YEAR}" + +SECDEV_LIMITED=os.environ.get('SECDEV_LIMITED') + + +# Helper functions for a consistent experience + +@task +def journal(c): + code(c, f'{HOME}/Journal') + def browse(c, url): - c.run(f"firefox {url}") + c.run(f"firefox {url}", asynchronous=True) def code(c, path): c.run(f"codium {path}") +def folder(c, path): + c.run(f"nemo {path}") + + + @task def debug(c): result = c.run('which minetest') print(result.ok) +@task() +def dash(c): + c.run('wtfutil') + + @task def vasl(c): '''Submit time off''' @@ -35,11 +60,24 @@ def timesheets(c): browse(c, "https://outlook.office.com/calendar/view/month") code(c, f"{HOME}/src/Learn_RobotFramework_IllinoisPTR") +@task(journal) +def daily(c): + '''Open daily reminders file for this month''' + code(c, f'{JOURNAL}/{MONTH}-daily.md') -@task + + +@task() +def in_progress(c): + '''Show in progress items on the Kan-Ban board''' + browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/11') + + +@task(daily, in_progress, dash) def status(c): '''Check on status of priorities''' - browse('https://github.com/orgs/techservicesillinois/projects/10') + pass + @task @@ -47,15 +85,29 @@ def backlog(c): '''Prep for backlog grooming''' browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/7') -JOURNAL = f"{HOME}/Journal" -@task +@task(journal) def retro(c): + '''Prep for team retrospective meeting''' + # 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') + + # Shared folder for archiving Retro notes + browse(c, f'{SECDEV_LIMITED}') + + + +@task(journal) +def wins(c): + '''For recording team wins''' + code(c, f'{JOURNAL}/{YEAR}-Wins.md') + +