]>
apps.delaporte.us Git - dotfiles.git/blob - files/tab/tasks.py
1 # This file is meant to sit in ~ for use from all shells.
2 from invoke
import task
4 from datetime
import datetime
as dt
7 HOME
= os
.path
.expanduser('~')
8 TODAY
= dt
.now().strftime('%Y.%m.%d')
10 KIDS_ALLOWANCE_URL
=os
.environ
.get('KIDS_CASH_URL')
11 PAYROLL
= os
.environ
.get('PAYROLL')
12 BUDGET_URL
= os
.environ
.get('BUDGET_URL')
13 CU_URL
= os
.environ
.get('CU_URL')
16 c
.run(f
'konsole --separate --workdir {path}', asynchronous
=True)
19 c
.run(f
"librewolf {url}", asynchronous
=True)
23 c
.run(f
"codium {path}")
27 c
.run(f
'dolphin {path}', asynchronous
=True)
28 # c.run(f"nemo {path}")
33 result
= c
.run('which minetest')
39 browse(c
, KIDS_ALLOWANCE_URL
)
48 # For copying the latest file in
49 folder(c
, f
"{HOME}/pixel7adocuments")
50 folder(c
, f
"{PAYROLL}/data/payroll_inbox")
58 def payroll_jupyter(c
):
60 # For running the payroll scripts
61 c
.run(f
"cd {PAYROLL};{HOME}/envs/jupyter/bin/jupyter-lab")
67 browse(c
, 'https://app.screego.net/#/')
71 def show_free_space(c
):
72 c
.run('df -h | grep G') # We only care about disks measured in G
75 def free_disk_space(c
, ruthless
=False):
77 c
.run('podman container cleanup --all --rm')
78 # Dolphin Trash ...should regenerate
79 c
.run(f
'sudo rm -rf {HOME}/.local/share/Trash')
80 # c.run(f'rm {HOME}/Downloads/*.iso')
81 c
.run('sudo apt-get autoclean') # Remove useless apt cache
83 c
.run(f
'rm -rf {HOME}/Downloads/*')
84 c
.run('sudo apt-get clean') # Remove all apt cache
90 SCHOOL
= f
"{HOME}/School"
95 # c.run(f"cd {SCHOOL};{HOME}/envs/jupyter/bin/jupyter lab", asynchronous=True)
100 print("https://rubenwardy.com/minetest_modding_book/en/quality/luacheck.html")
101 term(c
, f
'{HOME}/.var/app/net.minetest.Minetest/.minetest')
106 browse(c
, BUDGET_URL
)