about summary refs log tree commit diff stats
path: root/hm/soispha/pkgs/scripts.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-01-03 22:42:04 +0100
committerSoispha <soispha@vhack.eu>2024-01-03 22:42:04 +0100
commitea09ccf2e9b48b3aa870e90095a44fc8839ba9ff (patch)
tree6e9321f643940e7a687fd5472d308e1d31c7f1af /hm/soispha/pkgs/scripts.nix
parentfeat(hm/pkgs/scr): Add support for python based scripts (diff)
downloadnixos-config-ea09ccf2e9b48b3aa870e90095a44fc8839ba9ff.zip
feat(hm/pkgs/scr/ytcc): Add support for showing comments
Diffstat (limited to 'hm/soispha/pkgs/scripts.nix')
-rw-r--r--hm/soispha/pkgs/scripts.nix19
1 files changed, 17 insertions, 2 deletions
diff --git a/hm/soispha/pkgs/scripts.nix b/hm/soispha/pkgs/scripts.nix
index e0b5a086..84fdfb54 100644
--- a/hm/soispha/pkgs/scripts.nix
+++ b/hm/soispha/pkgs/scripts.nix
@@ -72,6 +72,14 @@
         '';
     };
   };
+  filter-comments-scr = sysLib.writeShellScriptWithLibrary {
+    name = "filter-comments";
+    src = ./scripts/specific/ytcc/filter_comments.sh;
+    dependencies = with pkgs; [jq fmt less locale] ++ [nest_comments-scr];
+    replacementStrings = {
+      JQ_PREPROCCESSOR_SCRIPT = ./scripts/specific/ytcc/filter_comments.jq;
+    };
+  };
   screenshot_persistent-scr = write_shell {
     name = "screenshot_persistent";
     path = "small_functions";
@@ -125,6 +133,11 @@
       TASK_PROJECT_FILE = "/home/soispha/repos/nix/nixos-config/hm/soispha/conf/taskwarrior/projects/default.nix";
     };
   };
+  nest_comments-scr = write_python {
+    name = "nest_comments.py";
+    path = "specific/ytcc";
+    dependencies_python = ps: [];
+  };
   update-sys-scr = write_shell {
     name = "update-sys";
     path = "small_functions";
@@ -219,7 +232,7 @@
   };
   ytc-scr = write_shell {
     name = "ytc";
-    path = "wrappers";
+    path = "specific/ytcc";
     dependencies = builtins.attrValues {
       inherit
         (pkgs)
@@ -241,7 +254,7 @@
   };
   yts-scr = write_shell {
     name = "yts";
-    path = "wrappers";
+    path = "specific/ytcc";
     keep_path = true; # We need neovim
     dependencies = builtins.attrValues {
       inherit (pkgs) ytcc jq gawk;
@@ -252,6 +265,7 @@ in [
   # llp-scr # TODO: see above
   aumo-scr
   con2pdf-scr
+  filter-comments-scr
   fupdate-scr
   hibernate-scr
   ll-scr
@@ -259,6 +273,7 @@ in [
   lyrics-scr
   mpc-rm-scr
   neorg-scr
+  nest_comments-scr
   screenshot_persistent-scr
   screenshot_temporary-scr
   spodi-scr