]> apps.delaporte.us Git - dotfiles.git/blobdiff - files/pc/tasks.py
No config, yo!
[dotfiles.git] / files / pc / tasks.py
index a6f0c05c2d3953de70c8db4b9b5130de04f0303f..b243ecc8175d30b60dc1b0e9229b38904a61736b 100644 (file)
@@ -15,15 +15,31 @@ expect_URLs = [
 'allowance'
 ]
 
+expect_PATHs = [
+'podcasts',
+]
+
+
 
 URLS = {}
 for url in expect_URLs:
     key = f'URL_{url.upper()}'
     result = os.environ.get(key)
     if not result:
-        raise ValueError(f'Missing expected {key} in environment.')
+        print(f'Missing expected {key} in environment.')
+        # raise ValueError(f'Missing expected {key} in environment.')
     URLS[url] = result
 
+
+PATHS = {}
+for path in expect_PATHs:
+    key = f'PATH_{path.upper()}'
+    result = os.environ.get(key)
+    if not result:
+        print(f'Missing expected {key} in environment.')
+    PATHS[path] = result
+
+
 def browse(c, url):
     c.run(f"librefox {url}", asynchronous=True)
 
@@ -34,6 +50,7 @@ def code(c, path):
 
 def folder(c, path):
     c.run(f"nemo {path}")
+    c.run(f"dolphin {path}")
 
 @task
 def go(c, bookmark):
@@ -94,28 +111,22 @@ def allowance(c):
     browse(c, URLS['allowance'])
 
 @task
-def payroll(c):
-
-    allowance(c)
-
+def payroll_folders(c):
     # For copying the latest file in
     folder(c, f"{HOME}/pixel7adocuments")
     folder(c, f"{PAYROLL}/data/payroll_inbox")
+    folder(c, f"{PAYROLL}")
 
-    # For editing files
-    folder_payroll(c)
-    payroll_jupyter(c)
 
 @task
-def payroll_jupyter(c):
+def payroll(c):
 
-    # For running the payroll scripts
-    c.run(f"cd {PAYROLL};{HOME}/envs/jupyter/bin/jupyter-lab")
+    allowance(c)
+    payroll_folders(c)
 
-@task
-def folder_payroll(c):
+    # For editing files
     code(c, f"{PAYROLL}")
-
+    print("Use Invoke")
 
 @task()
 def screenshare(c):
@@ -151,8 +162,8 @@ def mod_luanti(c):
 
 @task
 def budget(c):
-    browse(c, BUDGET_URL)
-    browse(c, CU_URL)
+    browse(c, URLS['budget'])
+    browse(c, URLS['cu'])
 
 
 @task
@@ -162,3 +173,10 @@ def get_drive_info(c):
     c.run('ls /dev/disk/by-label')
 
 
+@task
+def podcasts(c):
+    folder(c, PATHS['podcasts'])
+
+@task
+def matrix(c):
+    c.run('gomuks')