X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/blobdiff_plain/b6cf4f691b1a9f16dad2e2febb8d7ba77ec42161..8900458299fe6eb84828299e3a3ae46d6ad944f8:/files/ts/tasks.py?ds=sidebyside diff --git a/files/ts/tasks.py b/files/ts/tasks.py index 015b6c5..1a75292 100644 --- a/files/ts/tasks.py +++ b/files/ts/tasks.py @@ -14,7 +14,10 @@ YEAR = dt.now().strftime('%Y') JOURNAL = f"{HOME}/Journal/{YEAR}" SECDEV_LIMITED=os.environ.get('SECDEV_LIMITED') - +SECDEV_MESSAGE_TEMPLATES=os.environ.get('SECDEV_MESSAGE_TEMPLATES') +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 @@ -28,7 +31,7 @@ def browse(c, url): def code(c, path): - c.run(f"codium {path}") + c.run(f"codium {path}", asynchronous=True) def folder(c, path): @@ -46,12 +49,17 @@ def debug(c): def dash(c): c.run('wtfutil') +@task +def calendar_week(c): + browse(c, "https://outlook.office.com/calendar/view/week") + @task 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") + print('Ctrl+G to repeat a search in FF') @task(vasl) @@ -59,6 +67,7 @@ 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") + browse(c, "http://go.illinois.edu/techservtimeentry") @task(journal) def daily(c): @@ -73,9 +82,11 @@ def in_progress(c): browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/11') -@task(daily, in_progress, dash) +@task(daily, in_progress) def status(c): '''Check on status of priorities''' + browse(c, EPICS) + dash(c) pass @@ -100,22 +111,22 @@ def retro(c): browse(c, 'https://github.com/orgs/techservicesillinois/projects/10/views/5') # Shared folder for archiving Retro notes - browse(c, f'{SECDEV_LIMITED}') + browse(c, SECDEV_LIMITED) @task(journal) -def data(c): +def engagements_ods(c): '''For recording engagements''' - c.run(f'soffice {JOURNAL}/Data/engagements.ods') + c.run(f'soffice {JOURNAL}/Data/engagements.ods', asynchronous=True) # TODO: Launch Jupyter container on this folder as well @task -def gather-data(c): +def gather_data(c): raise NotImplementedError() # TODO: Add GH command to gather latest data files. -@task(data) +@task(engagements_ods) def wins(c): '''For recording team wins''' code(c, f'{JOURNAL}/{YEAR}-Wins.md') @@ -124,3 +135,34 @@ def wins(c): def co_authors(c): browse(c, 'https://github.com/orgs/techservicesillinois/projects/10?pane=info') +@task +def limited(c): + browse(c, SECDEV_LIMITED) + +@task(engagements_ods, calendar_week) +def engage(c): + # Cybersecrity Development Message Templates + browse(c, SECDEV_MESSAGE_TEMPLATES) + + +@task +def juice_shop(c): + '''Run a copy of intentionally vulnerable OWASP Juice Shop web app, for demonstrations''' + c.run('podman run -d -p 3000:3000 bkimminich/juice-shop', asynchronous=True) + print('Visit localhost:3000 for juice shop.') + + +@task +def bookmarks(c): + code(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"') + +