]> apps.delaporte.us Git - dotfiles.git/commitdiff
Sync
authorEdward Delaporte <edward@delaporte.us>
Wed, 26 Nov 2025 18:49:38 +0000 (12:49 -0600)
committerEdward Delaporte <edward@delaporte.us>
Wed, 26 Nov 2025 18:49:38 +0000 (12:49 -0600)
files/pc/tasks.py
files/ts/tasks.py

index 91f75036138b49ea6317495e6978fe5b3182f623..3ea73a2f9239668d6efcc99c52707e906c9ea5d3 100644 (file)
@@ -1,10 +1,25 @@
+
+
 # This file is meant to sit in ~ for use from all shells.
 from invoke import task
 
-import datetime
+from datetime import datetime as dt
 import os
 
 HOME = os.path.expanduser('~')
+TODAY = dt.now().strftime('%Y.%m.%d')
+
+def browse(c, url):
+    c.run(f"firefox {url}")
+
+
+def code(c, path):
+    c.run(f"codium {path}")
+
+
+def folder(c, path):
+    c.run(f"nemo {path}")
+
 
 @task
 def debug(c):
@@ -14,11 +29,15 @@ def debug(c):
 PAYROLL = f"{HOME}/Nanny.Payroll"
 
 @task
+def folder_payroll(c):
+    code(c, f"{HOME}/Nanny.Payroll")
+
+@task(folder_payroll)
 def payroll(c):
 
     # For copying the latest file in
-    c.run(f"files {HOME}/pixel7adocuments")
-    c.run(f"files {HOME}/Nanny.Payroll/data/payroll_inbox")
+    folder(c, f"{HOME}/pixel7adocuments")
+    folder(c, f"{HOME}/Nanny.Payroll/data/payroll_inbox")
 
     # For running the payroll scripts
     c.run(f"cd {PAYROLL};{HOME}/envs/jupyter/bin/jupyter lab")
index 5e506936178ffa3d71c84ce4fc79fb865fa6f75c..d6a6fdcd5c039d73ae02d92217ac98062089c5bd 100644 (file)
@@ -16,6 +16,11 @@ def code(c, path):
     c.run(f"codium {path}")
 
 
+def folder(c, path):
+    c.run(f"nemo {path}")
+
+
+
 @task
 def debug(c):
     result = c.run('which minetest')