X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/blobdiff_plain/a2a690bd9c9901b004426240c384bbb40557d456..2e3a1e2b4230744933a3d39f5690b30bfb45207b:/files/tab/tasks.py diff --git a/files/tab/tasks.py b/files/tab/tasks.py index 488e80f..f1e6339 100644 --- a/files/tab/tasks.py +++ b/files/tab/tasks.py @@ -1,5 +1,3 @@ - - # This file is meant to sit in ~ for use from all shells. from invoke import task @@ -9,10 +7,14 @@ import os HOME = os.path.expanduser('~') TODAY = dt.now().strftime('%Y.%m.%d') -KIDS_ALLOWANCE_URL=os.environ.get('KIDS_ALLOWANCE_URL') +KIDS_ALLOWANCE_URL=os.environ.get('KIDS_CASH_URL') +PAYROLL = os.environ.get('PAYROLL') + +def term(c, path): + c.run(f'konsole --workdir {path}') def browse(c, url): - c.run(f"librefox {url}") + c.run(f"librewolf {url}", asynchronous=True) def code(c, path): @@ -20,7 +22,8 @@ def code(c, path): def folder(c, path): - c.run(f"nemo {path}") + c.run(f'dolphin {path}', asynchronous=True) + # c.run(f"nemo {path}") @task @@ -28,26 +31,27 @@ def debug(c): result = c.run('which minetest') print(result.ok) -PAYROLL = f"{HOME}/Nanny.Payroll" - -@task -def folder_payroll(c): - code(c, f"{HOME}/Nanny.Payroll") @task -def folder_allowance(c): +def allowance(c): browse(c, KIDS_ALLOWANCE_URL) -@task(folder_payroll) + +@task def payroll(c): + allowance() + # For copying the latest file in folder(c, f"{HOME}/pixel7adocuments") - folder(c, f"{HOME}/Nanny.Payroll/data/payroll_inbox") + folder(c, f"{PAYROLL}/data/payroll_inbox") + + # For editing files + code(c, f"{PAYROLL}") # For running the payroll scripts - c.run(f"cd {PAYROLL};{HOME}/envs/jupyter/bin/jupyter lab") + c.run(f"cd {PAYROLL};{HOME}/envs/jupyter/bin/jupyter-lab") @task() @@ -56,3 +60,16 @@ def screenshare(c): browse(c, 'https://app.screego.net/#/') c.run('dino') +@task() +def free_disk_space(c): + c.run('podman container cleanup --all --rm') + + +SCHOOL = f"{HOME}/School" + +@task +def assign_school(c): + term(c, f'{SCHOOL}') + # c.run(f"cd {SCHOOL};{HOME}/envs/jupyter/bin/jupyter lab", asynchronous=True) + +