]> us-delaporte.pagekite.me Git - dotfiles.git/commitdiff
Add invoke to edit local mod
authorEdward Delaporte <edward@delaporte.us>
Tue, 23 Dec 2025 04:54:41 +0000 (22:54 -0600)
committerEdward Delaporte <edward@delaporte.us>
Tue, 23 Dec 2025 04:54:41 +0000 (22:54 -0600)
invoke/luanti-remote/tasks.py

index cc305f39918c880154bb0340ce8f1e07d5ce0adf..61dc1a032fd9502b17fa0284b007f2bb881b80ba 100644 (file)
@@ -27,6 +27,9 @@ SERVE=f'screen -d -m {LUANTI}/bin/luantiserver --gameid minetest --worldname wor
 def browse(c, url):
     c.run(f"librewolf {url}")
 
 def browse(c, url):
     c.run(f"librewolf {url}")
 
+def codium(c, path):
+    c.run(f'codium {path}')
+
 @task
 def list_mods(c):
     c.run(f'{SSH} -C ls {MODS}')
 @task
 def list_mods(c):
     c.run(f'{SSH} -C ls {MODS}')
@@ -57,6 +60,11 @@ def unpack_mod(c, mod):
     c.run(f'cd {unpack}; tar xf {unpack}/{mod}.tar')
     c.run(f'ls {unpack}')
 
     c.run(f'cd {unpack}; tar xf {unpack}/{mod}.tar')
     c.run(f'ls {unpack}')
 
+@task
+def edit_mod(c, mod):
+    unpack = f'{LOCAL_BACKUPS}/mods/unpack'
+    codium(c, f'{unpack}/{mod}')
+
 updated_mods = f'{LOCAL_BACKUPS}/updated_mods'
 
 @task
 updated_mods = f'{LOCAL_BACKUPS}/updated_mods'
 
 @task