]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - files/pc/tasks.py
Ignore .env files
[dotfiles.git] / files / pc / tasks.py
index a2a5df7770c104c493529fe9f0f4e2e17c39c164..e2f786ad5be13ce993c1803133df9bc65ad4f217 100644 (file)
@@ -15,6 +15,11 @@ expect_URLs = [
 'allowance'
 ]
 
 'allowance'
 ]
 
+expect_PATHs = [
+'podcasts',
+]
+
+
 
 URLS = {}
 for url in expect_URLs:
 
 URLS = {}
 for url in expect_URLs:
@@ -24,6 +29,16 @@ for url in expect_URLs:
         raise ValueError(f'Missing expected {key} in environment.')
     URLS[url] = result
 
         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:
+        raise ValueError(f'Missing expected {key} in environment.')
+    PATHS[path] = result
+
+
 def browse(c, url):
     c.run(f"librefox {url}", asynchronous=True)
 
 def browse(c, url):
     c.run(f"librefox {url}", asynchronous=True)
 
@@ -34,6 +49,7 @@ def code(c, path):
 
 def folder(c, path):
     c.run(f"nemo {path}")
 
 def folder(c, path):
     c.run(f"nemo {path}")
+    c.run(f"dolphin {path}")
 
 @task
 def go(c, bookmark):
 
 @task
 def go(c, bookmark):
@@ -152,8 +168,8 @@ def mod_luanti(c):
 
 @task
 def budget(c):
 
 @task
 def budget(c):
-    browse(c, BUDGET_URL)
-    browse(c, CU_URL)
+    browse(c, URLS['budget'])
+    browse(c, URLS['cu'])
 
 
 @task
 
 
 @task
@@ -163,3 +179,7 @@ def get_drive_info(c):
     c.run('ls /dev/disk/by-label')
 
 
     c.run('ls /dev/disk/by-label')
 
 
+@task
+def podcasts(c):
+    folder(c, PATHS['podcasts'])
+